This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository fastaq.

commit 3817361055b2a68787a63f52a7eb57a73d9457ad
Author: Sascha Steinbiss <sas...@steinbiss.name>
Date:   Mon Nov 16 19:18:26 2015 +0000

    Imported Upstream version 3.10.1
---
 README.md                              |  1 -
 pyfastaq/common.py                     |  2 +-
 pyfastaq/runners/long_read_simulate.py | 49 ----------------------------------
 pyfastaq/runners/to_tiling_bam.py      |  3 ++-
 scripts/fastaq                         |  1 -
 setup.py                               |  2 +-
 6 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/README.md b/README.md
index af92b95..269ddc8 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,6 @@ Available commands
 | get_ids               | Get the ID of each sequence                          
                |
 | get_seq_flanking_gaps | Gets the sequences flanking gaps                     
                |
 | interleave            | Interleaves two files, output is alternating between 
fwd/rev reads   |
-| long_read_simulate    | Simulates long reads from reference                  
                |
 | make_random_contigs   | Make contigs of random sequence                      
                |
 | merge                 | Converts multi sequence file to a single sequence    
                |
 | replace_bases         | Replaces all occurences of one letter with another   
                |
diff --git a/pyfastaq/common.py b/pyfastaq/common.py
index 63b3d84..b951f1c 100644
--- a/pyfastaq/common.py
+++ b/pyfastaq/common.py
@@ -1 +1 @@
-version = '3.10.0'
+version = '3.10.1'
diff --git a/pyfastaq/runners/long_read_simulate.py 
b/pyfastaq/runners/long_read_simulate.py
deleted file mode 100644
index ad8da23..0000000
--- a/pyfastaq/runners/long_read_simulate.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import argparse
-from pyfastaq import tasks
-
-def run(description):
-    parser = argparse.ArgumentParser(
-        description = 'Simulates long reads from a sequence file. Can 
optionally make insertions into the reads, like pacbio does. If insertions 
made, coverage calculation is done before the insertions (so total read length 
may appear longer then expected).',
-        usage = 'fastaq long_read_simulate [options] <infile> <outfile>')
-
-    parser.add_argument('infile', help='Name of input file')
-    parser.add_argument('outfile', help='Name of output FASTA file')
-
-    parser.add_argument('--method', help='How to sample the read positions and 
lengths. Choose from 1) "tiling", where reads of fixed length are taken at 
equal intervals from the reference. 2) "unfiform", where reads of fixed length 
taken at positions sampled uniformly. 3) "gamma", where reads lengths are taken 
from a gamma distribution, and positions sampled uniformly. [%(default)s]', 
default='tiling', choices=['tiling', 'uniform', 'gamma'], 
metavar='tiling|uniform|gamma')
-    parser.add_argument('--seed', type=int, help='Seed for random number 
generator [default: use python\'s default]', metavar='INT')
-    parser.add_argument('--qual', help='Write a file of fake quality scores 
called outfile.qual, all bases same quality [%(default)s]', metavar='INT')
-    parser.add_argument('--fixed_read_length', type=int, help='Length of each 
read. Only applies if method is tile or uniform. [%(default)s]', default=20000, 
metavar='INT')
-    parser.add_argument('--coverage', type=float, help='Read coverage. Only 
applies if method is gamma or uniform. [%(default)s]', default=2, 
metavar='FLOAT')
-
-
-    tiling_group = parser.add_argument_group('tiling options')
-    tiling_group.add_argument('--tile_step', type=int, help='Distance between 
start of each read [%(default)s]', default=10000, metavar='INT')
-
-    gamma_group = parser.add_argument_group('gamma options')
-    gamma_group.add_argument('--gamma_shape', type=float, help='Shape 
parameter of gamma distribution [%(default)s]', default=1.2, metavar='FLOAT')
-    gamma_group.add_argument('--gamma_scale', type=float, help='Scale 
parameter of gamma distribution [%(default)s]', default=6000, metavar='FLOAT')
-    gamma_group.add_argument('--gamma_min_length', type=int, help='Minimum 
read length [%(default)s]', default=20000, metavar='INT')
-
-    ins_group = parser.add_argument_group('options to add insertions to reads')
-    ins_group.add_argument('--ins_skip', type=int, help='Insert a random base 
every --skip bases plus or minus --ins_window. If this option is used, must 
also use --ins_window.', metavar='INT')
-    ins_group.add_argument('--ins_window', type=int, help='See --ins_skip. If 
this option is used, must also use --ins_skip.', metavar='INT')
-
-
-    options = parser.parse_args()
-    tasks.make_long_reads(
-        options.infile,
-        options.outfile,
-        method=options.method,
-        fixed_read_length=options.fixed_read_length,
-        coverage=options.coverage,
-        tile_step=options.tile_step,
-        gamma_shape=options.gamma_shape,
-        gamma_scale=options.gamma_scale,
-        gamma_min_length=options.gamma_min_length,
-        seed=options.seed,
-        ins_skip=options.ins_skip,
-        ins_window=options.ins_window
-    )
-
-    if options.qual:
-        tasks.fastaq_to_fake_qual(options.outfile, options.outfile + '.qual', 
q=options.qual)
diff --git a/pyfastaq/runners/to_tiling_bam.py 
b/pyfastaq/runners/to_tiling_bam.py
index ab37e65..df098c1 100644
--- a/pyfastaq/runners/to_tiling_bam.py
+++ b/pyfastaq/runners/to_tiling_bam.py
@@ -13,6 +13,7 @@ def run(description):
     parser.add_argument('read_step', type=int, help='Distance between start of 
each read')
     parser.add_argument('read_prefix', help='Prefix of read names')
     parser.add_argument('outfile', help='Name of output BAM file')
+    parser.add_argument('--qual_char', help='Character to use for quality 
score [%(default)s]', default='I')
     parser.add_argument('--read_group', help='Add the given read group ID to 
all reads [%(default)s]' ,default='42')
     options = parser.parse_args()
 
@@ -56,7 +57,7 @@ def run(description):
                     end  = len(seq) - 1
                     start = end - options.read_length + 1
 
-            read = sequences.Fastq(options.read_prefix + ':' + seq.id + ':' + 
str(start + 1) + ':' + str(end + 1), seq[start:end+1], 'I' * (end - start + 1))
+            read = sequences.Fastq(options.read_prefix + ':' + seq.id + ':' + 
str(start + 1) + ':' + str(end + 1), seq[start:end+1], options.qual_char * (end 
- start + 1))
 
             print ('\t'.join([read.id,
                              '0',
diff --git a/scripts/fastaq b/scripts/fastaq
index 3198b2d..b264517 100755
--- a/scripts/fastaq
+++ b/scripts/fastaq
@@ -17,7 +17,6 @@ tasks = {
     'get_ids':                'Get the ID of each sequence',
     'get_seq_flanking_gaps':  'Gets the sequences flanking gaps',
     'interleave':             'Interleaves two files, output is alternating 
between fwd/rev reads',
-    'long_read_simulate':     'Simulates long reads from reference',
     'make_random_contigs':    'Make contigs of random sequence',
     'merge':                  'Converts multi sequence file to a single 
sequence',
     'replace_bases':          'Replaces all occurences of one letter with 
another',
diff --git a/setup.py b/setup.py
index 012b341..baa05ba 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
 
 setup(
     name='pyfastaq',
-    version='3.10.0',
+    version='3.10.1',
     description='Script to manipulate FASTA and FASTQ files, plus API for 
developers',
     packages = find_packages(),
     author='Martin Hunt',

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/debian-med/fastaq.git

_______________________________________________
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to