Removed SOLiD option from BWA, cleaned up Bowtie and BWA wrapper interfaces, and changed name of BWA index loc file

This commit is contained in:
Kelly Vincent
2010-01-22 10:49:38 -05:00
parent b81088ed33
commit b5dab3a63f
7 changed files with 458 additions and 427 deletions
+1 -2
View File
@@ -21,6 +21,7 @@ LINKS="
/depot/data2/galaxy/blastdb.loc
/depot/data2/galaxy/bowtie_indices.loc
/depot/data2/galaxy/bowtie_indices_color.loc
/depot/data2/galaxy/bwa_index.loc
/depot/data2/galaxy/encode_datasets.loc
/galaxy/home/universe/encode_feature_partitions
/depot/data2/galaxy/lastz_seqs.loc
@@ -32,8 +33,6 @@ LINKS="
/depot/data2/galaxy/quality_scores.loc
/depot/data2/galaxy/regions.loc
/depot/data2/galaxy/sam_fa_indices.loc
/depot/data2/galaxy/sequence_index_base.loc
/depot/data2/galaxy/sequence_index_color.loc
/depot/data2/galaxy/taxonomy
/depot/data2/galaxy/twobit.loc
"
+29
View File
@@ -0,0 +1,29 @@
#This is a sample file distributed with Galaxy that enables tools
#to use a directory of BWA indexed sequences data files. You will need
#to create these data files and then create a bwa_index.loc file
#similar to this one (store it in this directory) that points to
#the directories in which those files are stored. The bwa_index.loc
#file has this format (white space characters are TAB characters):
#
#<build> <file_base>
#
#So, for example, if you had phiX indexed stored in
#/depot/data2/galaxy/phiX/base/,
#then the bwa_index.loc entry would look like this:
#
#phiX /depot/data2/galaxy/phiX/base/phiX.fa
#
#and your /depot/data2/galaxy/phiX/base/ directory
#would contain phiX.fa.* files:
#
#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 phiX.fa.amb
#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 phiX.fa.ann
#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 phiX.fa.bwt
#...etc...
#
#Your bwa_index.loc file should include an entry per line for each
#index set you have stored. The "file" in the path does not actually
#exist, but it is the prefix for the actual index files. For example:
#
#phiX /depot/data2/galaxy/phiX/base/phiX.fa
#hg18 /depot/data2/galaxy/hg18/base/hg18.fa
+96 -53
View File
@@ -205,9 +205,9 @@
</param>
</when>
<when value="history">
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" />
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
<conditional name="indexParams">
<param name="indexSettings" type="select" label="Choose whether to use default options for building indices or to set your own">
<param name="indexSettings" type="select" label="Choose whether to use Default options for building indices or to Set your own">
<option value="indexPreSet">Default</option>
<option value="indexFull">Set your own</option>
</param>
@@ -220,7 +220,7 @@
</param>
<when value="auto" />
<when value="set">
<param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (-p)">
<param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (--packed)">
<option value="unpacked">Use regular representation</option>
<option value="packed">Use packed representation</option>
</param>
@@ -229,7 +229,7 @@
<param name="dcv" type="integer" value="1024" label="The period for the difference-cover sample (--dcv)" />
</when>
</conditional>
<param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (a very repetitive reference)">
<param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (with a very repetitive reference)">
<option value="dc">Use difference-cover sample</option>
<option value="nodc">Disable difference-cover sample</option>
</param>
@@ -309,7 +309,7 @@
<param name="sSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
<param name="sSnpphred" type="integer" value="-1" label="SNP penalty (ratio of SNPs per base in the subject genome) (--snpphred)" help="Enter this OR Ratio of SNPs per base" />
<param name="sSnpfrac" type="float" value="0.001" label="Ratio of SNPs per base (estimated ratio for colorspace alignments) (--snpfrac)" help="Enter this OR SNP penalty" />
<param name="sKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--keepends)">
<param name="sKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--col-keepends)">
<option value="doKeepends">Keep ends</option>
<option value="noKeepends">Trim ends</option>
</param>
@@ -384,7 +384,7 @@
<param name="pSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
<param name="pSnpphred" type="integer" value="-1" label="SNP penalty (ratio of SNPs per base in the subject genome) (--snpphred)" help="Enter this OR Ratio of SNPs per base" />
<param name="pSnpfrac" type="float" value="0.001" label="Ratio of SNPs per base (estimated ratio for colorspace alignments) (--snpfrac)" help="Enter this OR SNP penalty" />
<param name="pKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--keepends)">
<param name="pKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--col-keepends)">
<option value="doKeepends">Keep ends</option>
<option value="noKeepends">Trim ends</option>
</param>
@@ -392,7 +392,7 @@
</conditional> <!-- cpParams -->
</when> <!-- cPaired -->
</conditional> <!-- cSinglePaired -->
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information" />
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
</inputs>
<outputs>
<data format="sam" name="output" />
@@ -533,6 +533,8 @@
Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. It is developed by Ben Langmead and Cole Trapnell. Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
This tool uses Bowtie version 0.12.1.
.. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
------
@@ -541,7 +543,7 @@ Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. I
.. class:: warningmark
There is no such thing (yet) as automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading `documentation`__ and experimenting. Fortunaly, Galaxy makes experimenting easy.
There is no such thing (yet) as an automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
.. __: http://bowtie-bio.sourceforge.net/index.shtml
@@ -549,7 +551,7 @@ There is no such thing (yet) as automated gearshift in short read mapping. It is
**Input formats**
Bowtie accepts files in Sanger FASTQ format.
Bowtie accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
------
@@ -605,52 +607,93 @@ All of the options have a default value. You can change any of them. Most of the
This is an exhaustive list of Bowtie options:
For indexing (bowtie-build)::
-a No auto behavior. Disable the default behavior where bowtie automatically selects values for --bmax/--dcv/--packed parameters according to the memory available. [off]
-p Packing. Use a packed representation for DNA strings. [auto]
--bmax &lt;int&gt; Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
--bmaxdivn &lt;int&gt; Suffix maximum fraction. The maximum number of suffixes allowed in a block expressed as a fraction of the length of the reference. [4]
--dcv &lt;int&gt; Difference-cover sample. Use &lt;int&gt; as the period for the difference-cover sample. [1024]
--nodc &lt;int&gt; No difference-cover sample. Disable the difference-cover sample. [off]
-r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions of the index, used only for paired-end alignment. [off]
-o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The indexer will mark every 2^&lt;int&gt; rows. The marked rows correspond to rows on the genome. [5]
-t &lt;int&gt; Ftab. The lookup table used to calculate an initial Burrows-Wheeler range with respect to the first &lt;int&gt; characters of the query. Ftab is 4^&lt;int&gt;+1 bytes. [10]
--ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are simply excluded from the index and Bowtie will not find alignments that overlap them. [off]
--big Endianness. Endianness to use when serializing integers to the index file. [off]
--little Endianness. [--little]
--seed &lt;int&gt; Random seed. Use &lt;int&gt; as the seed for the pseudo-random number generator. [off]
--cutoff &lt;int&gt; Cutoff. Index only the first &lt;int&gt; bases of the reference sequences (cumulative across sequences) and ignore the rest. [off]
-a No auto behavior. Disable the default behavior where bowtie automatically
selects values for --bmax/--bmaxdivn/--dcv/--packed parameters according
to the memory available. [off]
--packed Packing. Use a packed representation for DNA strings. [auto]
--bmax INT Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
--bmaxdivn INT Suffix maximum fraction. The maximum number of suffixes allowed in a block
expressed as a fraction of the length of the reference. [4]
--dcv INT Difference-cover sample. Use INT as the period for the difference-cover
sample. [1024]
--nodc INT No difference-cover sample. Disable the difference-cover sample. [off]
-r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions
of the index. Used only for paired-end alignment. [off]
-o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The
indexer will mark every 2^INT rows. The marked rows correspond to rows on
the genome. [5]
-t INT Ftab. The lookup table used to calculate an initial Burrows-Wheeler range
with respect to the first INT characters of the query. Ftab is 4^INT+1
bytes. [10]
--ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are
simply excluded from the index and Bowtie will not find alignments that
overlap them. [off]
--big Endianness. Endianness to use when serializing integers to the index file. [off]
--little Endianness. [--little]
--seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
--cutoff INT Cutoff. Index only the first INT bases of the reference sequences (cumulative
across sequences) and ignore the rest. [off]
For aligning (bowtie)::
-s &lt;int&gt; Skip. Do not align the first &lt;int&gt; reads or pairs in the input. [off]
-u &lt;int&gt; Align limit. Only align the first &lt;int&gt; reads/pairs from the input. [no limit]
-5 &lt;int&gt; High-quality trim. Trim &lt;int&gt; bases from the high-quality (left) end of each read before alignment. [0]
-3 &lt;int&gt; Low-quality trim. Trim &lt;int&gt; bases from the low-quality (right) end of each read before alignment. [0]
-n &lt;int&gt; Mismatch seed. Maximum number of mismatches permitted in the seed (defined with seed length option). Can be 0, 1, 2, or 3. [2]
-e &lt;int&gt; Mismatch quality. Maximum permitted total of quality values at mismatched read positions. Bowtie rounds quality values to the nearest 10 and saturates at 30. [70]
-l &lt;int&gt; Seed length. The number of bases on the high-quality end of the read to which the -n ceiling applies. Must be at least 5. [28]
--nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and saturate at 30. This options turns off that rounding. [off]
-v &lt;int&gt; MAQ- or SOAP-like alignment policy. This option turns off the default MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments with at most &lt;int&gt; mismatches. [off]
-I &lt;int&gt; Minimum insert. The minimum insert size for valid paired-end alignments. Does checking on untrimmed reads if -5 or -3 is used. [0]
--fr Mate orientation. The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. [--fr]
--rf Mate orientation. [off]
--ff Mate orientation. [off]
-X &lt;int&gt; Maximum insert. The maximum insert size for valid paired-end alignments. Does checking on untrimmed reads if -5 or -3 is used. [250]
--pairtries &lt;int&gt; Maximum alignment attempts for paired-end data. [100]
--nofw No forward aligning. Choosing this option means that Bowtie will not attempt to align against the forward reference strand. [off]
--norc No reverse-complement aligning. Setting this will mean that Bowtie will not attempt to align against the reverse-complement reference strand. [off]
--maxbts &lt;int&gt; Maximum backtracks. The maximum number of backtracks permitted when aligning a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
-y Try hard. Try as hard as possible to find valid alignments when they exist, including paired-end alignments. [off]
--chunkmbs &lt;int&gt; Thread memory. The number of megabytes of memory a given thread is given to store path descriptors in --best mode. [32]
-k &lt;int&gt; Valid alignments. The number of valid alignments per read or pair. [off]
-a All valid alignments. Choosing this means that all valid alignments per read or pair will be reported. [off]
-m &lt;int&gt; Suppress alignments. Suppress all alignments for a particular read or pair if more than &lt;int&gt; reportable alignments exist for it. [no limit]
--best Best mode. Make Bowtie guarantee that reported singleton alignments are "best" in terms of stratum (the number of mismatches) and quality values at mismatched position. [off]
--strata Best strata. When running in best mode, report alignments that fall into the best stratum if there are ones falling into more than one. [off]
-o &lt;int&gt; Offrate override. Override the offrate of the index with &lt;int&gt;. Some row markings are discarded when index read into memory. &lt;int&gt; must be greater than the value used to build the index (default: 5). [off]
--seed &lt;int&gt; Random seed. Use &lt;int&gt; as the seed for the pseudo-random number generator. [off]
--snpphred &lt;int&gt; Use &lt;int&gt; as the SNP penalty for decoding colorspace alignments. True ratio of SNPs per base in the subject genome. [see --snpfrac]
--snpfrac &lt;dec&gt; Use &lt;dec&gt; as the estimated ratio of SNPs per base when decoding colorspace alignments. [0.001]
--col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace alignments. [off]
-s INT Skip. Do not align the first INT reads or pairs in the input. [off]
-u INT Align limit. Only align the first INT reads/pairs from the input. [no limit]
-5 INT High-quality trim. Trim INT bases from the high-quality (left) end of each
read before alignment. [0]
-3 INT Low-quality trim. Trim INT bases from the low-quality (right) end of each
read before alignment. [0]
-n INT Mismatch seed. Maximum number of mismatches permitted in the seed (defined
with seed length option). Can be 0, 1, 2, or 3. [2]
-e INT Mismatch quality. Maximum permitted total of quality values at mismatched
read positions. Bowtie rounds quality values to the nearest 10 and saturates
at 30. [70]
-l INT Seed length. The number of bases on the high-quality end of the read to
which the -n ceiling applies. Must be at least 5. [28]
--nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and
saturate at 30. This options turns off that rounding. [off]
-v INT MAQ- or SOAP-like alignment policy. This option turns off the default
MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments
with at most INT mismatches. [off]
-I INT Minimum insert. The minimum insert size for valid paired-end alignments.
Does checking on untrimmed reads if -5 or -3 is used. [0]
-X INT Maximum insert. The maximum insert size for valid paired-end alignments.
Does checking on untrimmed reads if -5 or -3 is used. [250]
--fr Mate orientation. The upstream/downstream mate orientations for a valid
paired-end alignment against the forward reference strand. [--fr]
--rf Mate orientation. [off]
--ff Mate orientation. [off]
--pairtries INT Maximum alignment attempts for paired-end data. [100]
--nofw No forward aligning. Choosing this option means that Bowtie will not attempt
to align against the forward reference strand. [off]
--norc No reverse-complement aligning. Setting this will mean that Bowtie will not
attempt to align against the reverse-complement reference strand. [off]
--maxbts INT Maximum backtracks. The maximum number of backtracks permitted when aligning
a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
-y Try hard. Try as hard as possible to find valid alignments when they exist,
including paired-end alignments. [off]
--chunkmbs INT Thread memory. The number of megabytes of memory a given thread is given to
store path descriptors in --best mode. [32]
-k INT Valid alignments. The number of valid alignments per read or pair. [off]
-a All valid alignments. Choosing this means that all valid alignments per read
or pair will be reported. [off]
-m INT Suppress alignments. Suppress all alignments for a particular read or pair
if more than INT reportable alignments exist for it. [no limit]
--best Best mode. Make Bowtie guarantee that reported singleton alignments are
"best" in terms of stratum (the number of mismatches) and quality values at
mismatched position. [off]
--strata Best strata. When running in best mode, report alignments that fall into the
best stratum if there are ones falling into more than one. [off]
-o INT Offrate override. Override the offrate of the index with INT. Some row
markings are discarded when index read into memory. INT must be greater than
the value used to build the index (default: 5). [off]
--seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
--snpphred INT Use INT as the SNP penalty for decoding colorspace alignments. True ratio of
SNPs per base in the subject genome. [see --snpfrac]
--snpfrac DEC Use DEC as the estimated ratio of SNPs per base when decoding colorspace
alignments. [0.001]
--col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace
alignments. [off]
</help>
<code file="bowtie_wrapper_code.py" />
+5 -5
View File
@@ -186,7 +186,7 @@ def __main__():
inoref, options.ioffrate, iftab, intoa, iendian,
iseed, icutoff, colorspace )
except ValueError:
indexing_cmds = ''
indexing_cmds = '%s' % colorspace
try:
shutil.copy( options.ref, tmp_index_dir )
except Exception, e:
@@ -311,10 +311,10 @@ def __main__():
snpphred = '--snpphred %s' % options.snpphred
else:
snpphred = ''
if options.snpfrac != 'None' and float( options.snpfrac ) >= 0:
snpfrac = '--snpfrac %s' % options.snpfrac
else:
snpfrac = ''
if options.snpfrac != 'None' and float( options.snpfrac ) >= 0:
snpfrac = '--snpfrac %s' % options.snpfrac
else:
snpfrac = ''
if options.keepends != 'None' and options.keepends == 'doKeepends':
keepends = '--col-keepends'
else:
+94 -51
View File
@@ -199,9 +199,9 @@
</param>
</when>
<when value="history">
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" />
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
<conditional name="indexParams">
<param name="indexSettings" type="select" label="Choose whether to use default options for building indices or to set your own">
<param name="indexSettings" type="select" label="Choose whether to use Default options for building indices or to Set your own">
<option value="indexPreSet">Default</option>
<option value="indexFull">Set your own</option>
</param>
@@ -214,7 +214,7 @@
</param>
<when value="auto" />
<when value="set">
<param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (-p)">
<param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (--packed)">
<option value="unpacked">Use regular representation</option>
<option value="packed">Use packed representation</option>
</param>
@@ -223,7 +223,7 @@
<param name="dcv" type="integer" value="1024" label="The period for the difference-cover sample (--dcv)" />
</when>
</conditional>
<param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (a very repetitive reference)">
<param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (with a very repetitive reference)">
<option value="dc">Use difference-cover sample</option>
<option value="nodc">Disable difference-cover sample</option>
</param>
@@ -374,7 +374,7 @@
</conditional> <!-- pParams -->
</when> <!-- paired -->
</conditional> <!-- singlePaired -->
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information" />
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
</inputs>
<outputs>
<data format="sam" name="output" />
@@ -506,6 +506,8 @@
Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. It is developed by Ben Langmead and Cole Trapnell. Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
This tool uses Bowtie version 0.12.1.
.. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
------
@@ -514,7 +516,7 @@ Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. I
.. class:: warningmark
There is no such thing (yet) as automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading `documentation`__ and experimenting. Fortunaly, Galaxy makes experimenting easy.
There is no such thing (yet) as an automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
.. __: http://bowtie-bio.sourceforge.net/index.shtml
@@ -522,7 +524,7 @@ There is no such thing (yet) as automated gearshift in short read mapping. It is
**Input formats**
Bowtie accepts files in Sanger FASTQ format.
Bowtie accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
------
@@ -578,52 +580,93 @@ All of the options have a default value. You can change any of them. Most of the
This is an exhaustive list of Bowtie options:
For indexing (bowtie-build)::
-a No auto behavior. Disable the default behavior where bowtie automatically selects values for --bmax/--dcv/--packed parameters according to the memory available. [off]
-p Packing. Use a packed representation for DNA strings. [auto]
--bmax &lt;int&gt; Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
--bmaxdivn &lt;int&gt; Suffix maximum fraction. The maximum number of suffixes allowed in a block expressed as a fraction of the length of the reference. [4]
--dcv &lt;int&gt; Difference-cover sample. Use &lt;int&gt; as the period for the difference-cover sample. [1024]
--nodc &lt;int&gt; No difference-cover sample. Disable the difference-cover sample. [off]
-r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions of the index, used only for paired-end alignment. [off]
-o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The indexer will mark every 2^&lt;int&gt; rows. The marked rows correspond to rows on the genome. [5]
-t &lt;int&gt; Ftab. The lookup table used to calculate an initial Burrows-Wheeler range with respect to the first &lt;int&gt; characters of the query. Ftab is 4^&lt;int&gt;+1 bytes. [10]
--ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are simply excluded from the index and Bowtie will not find alignments that overlap them. [off]
--big Endianness. Endianness to use when serializing integers to the index file. [off]
--little Endianness. [--little]
--seed &lt;int&gt; Random seed. Use &lt;int&gt; as the seed for the pseudo-random number generator. [off]
--cutoff &lt;int&gt; Cutoff. Index only the first &lt;int&gt; bases of the reference sequences (cumulative across sequences) and ignore the rest. [off]
-a No auto behavior. Disable the default behavior where bowtie automatically
selects values for --bmax/--bmaxdivn/--dcv/--packed parameters according
to the memory available. [off]
--packed Packing. Use a packed representation for DNA strings. [auto]
--bmax INT Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
--bmaxdivn INT Suffix maximum fraction. The maximum number of suffixes allowed in a block
expressed as a fraction of the length of the reference. [4]
--dcv INT Difference-cover sample. Use INT as the period for the difference-cover
sample. [1024]
--nodc INT No difference-cover sample. Disable the difference-cover sample. [off]
-r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions
of the index. Used only for paired-end alignment. [off]
-o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The
indexer will mark every 2^INT rows. The marked rows correspond to rows on
the genome. [5]
-t INT Ftab. The lookup table used to calculate an initial Burrows-Wheeler range
with respect to the first INT characters of the query. Ftab is 4^INT+1
bytes. [10]
--ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are
simply excluded from the index and Bowtie will not find alignments that
overlap them. [off]
--big Endianness. Endianness to use when serializing integers to the index file. [off]
--little Endianness. [--little]
--seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
--cutoff INT Cutoff. Index only the first INT bases of the reference sequences (cumulative
across sequences) and ignore the rest. [off]
For aligning (bowtie)::
-s &lt;int&gt; Skip. Do not align the first &lt;int&gt; reads or pairs in the input. [off]
-u &lt;int&gt; Align limit. Only align the first &lt;int&gt; reads/pairs from the input. [no limit]
-5 &lt;int&gt; High-quality trim. Trim &lt;int&gt; bases from the high-quality (left) end of each read before alignment. [0]
-3 &lt;int&gt; Low-quality trim. Trim &lt;int&gt; bases from the low-quality (right) end of each read before alignment. [0]
-n &lt;int&gt; Mismatch seed. Maximum number of mismatches permitted in the seed (defined with seed length option). Can be 0, 1, 2, or 3. [2]
-e &lt;int&gt; Mismatch quality. Maximum permitted total of quality values at mismatched read positions. Bowtie rounds quality values to the nearest 10 and saturates at 30. [70]
-l &lt;int&gt; Seed length. The number of bases on the high-quality end of the read to which the -n ceiling applies. Must be at least 5. [28]
--nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and saturate at 30. This options turns off that rounding. [off]
-v &lt;int&gt; MAQ- or SOAP-like alignment policy. This option turns off the default MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments with at most &lt;int&gt; mismatches. [off]
-I &lt;int&gt; Minimum insert. The minimum insert size for valid paired-end alignments. Does checking on untrimmed reads if -5 or -3 is used. [0]
--fr Mate orientation. The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. [--fr]
--rf Mate orientation. [off]
--ff Mate orientation. [off]
-X &lt;int&gt; Maximum insert. The maximum insert size for valid paired-end alignments. Does checking on untrimmed reads if -5 or -3 is used. [250]
--pairtries &lt;int&gt; Maximum alignment attempts for paired-end data. [100]
--nofw No forward aligning. Choosing this option means that Bowtie will not attempt to align against the forward reference strand. [off]
--norc No reverse-complement aligning. Setting this will mean that Bowtie will not attempt to align against the reverse-complement reference strand. [off]
--maxbts &lt;int&gt; Maximum backtracks. The maximum number of backtracks permitted when aligning a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
-y Try hard. Try as hard as possible to find valid alignments when they exist, including paired-end alignments. [off]
--chunkmbs &lt;int&gt; Thread memory. The number of megabytes of memory a given thread is given to store path descriptors in --best mode. [32]
-k &lt;int&gt; Valid alignments. The number of valid alignments per read or pair. [off]
-a All valid alignments. Choosing this means that all valid alignments per read or pair will be reported. [off]
-m &lt;int&gt; Suppress alignments. Suppress all alignments for a particular read or pair if more than &lt;int&gt; reportable alignments exist for it. [no limit]
--best Best mode. Make Bowtie guarantee that reported singleton alignments are "best" in terms of stratum (the number of mismatches) and quality values at mismatched position. [off]
--strata Best strata. When running in best mode, report alignments that fall into the best stratum if there are ones falling into more than one. [off]
-o &lt;int&gt; Offrate override. Override the offrate of the index with &lt;int&gt;. Some row markings are discarded when index read into memory. &lt;int&gt; must be greater than the value used to build the index (default: 5). [off]
--seed &lt;int&gt; Random seed. Use &lt;int&gt; as the seed for the pseudo-random number generator. [off]
--snpphred &lt;int&gt; Use &lt;int&gt; as the SNP penalty for decoding colorspace alignments. True ratio of SNPs per base in the subject genome. [see --snpfrac]
--snpfrac &lt;dec&gt; Use &lt;dec&gt; as the estimated ratio of SNPs per base when decoding colorspace alignments. [0.001]
--col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace alignments. [off]
-s INT Skip. Do not align the first INT reads or pairs in the input. [off]
-u INT Align limit. Only align the first INT reads/pairs from the input. [no limit]
-5 INT High-quality trim. Trim INT bases from the high-quality (left) end of each
read before alignment. [0]
-3 INT Low-quality trim. Trim INT bases from the low-quality (right) end of each
read before alignment. [0]
-n INT Mismatch seed. Maximum number of mismatches permitted in the seed (defined
with seed length option). Can be 0, 1, 2, or 3. [2]
-e INT Mismatch quality. Maximum permitted total of quality values at mismatched
read positions. Bowtie rounds quality values to the nearest 10 and saturates
at 30. [70]
-l INT Seed length. The number of bases on the high-quality end of the read to
which the -n ceiling applies. Must be at least 5. [28]
--nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and
saturate at 30. This options turns off that rounding. [off]
-v INT MAQ- or SOAP-like alignment policy. This option turns off the default
MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments
with at most INT mismatches. [off]
-I INT Minimum insert. The minimum insert size for valid paired-end alignments.
Does checking on untrimmed reads if -5 or -3 is used. [0]
-X INT Maximum insert. The maximum insert size for valid paired-end alignments.
Does checking on untrimmed reads if -5 or -3 is used. [250]
--fr Mate orientation. The upstream/downstream mate orientations for a valid
paired-end alignment against the forward reference strand. [--fr]
--rf Mate orientation. [off]
--ff Mate orientation. [off]
--pairtries INT Maximum alignment attempts for paired-end data. [100]
--nofw No forward aligning. Choosing this option means that Bowtie will not attempt
to align against the forward reference strand. [off]
--norc No reverse-complement aligning. Setting this will mean that Bowtie will not
attempt to align against the reverse-complement reference strand. [off]
--maxbts INT Maximum backtracks. The maximum number of backtracks permitted when aligning
a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
-y Try hard. Try as hard as possible to find valid alignments when they exist,
including paired-end alignments. [off]
--chunkmbs INT Thread memory. The number of megabytes of memory a given thread is given to
store path descriptors in --best mode. [32]
-k INT Valid alignments. The number of valid alignments per read or pair. [off]
-a All valid alignments. Choosing this means that all valid alignments per read
or pair will be reported. [off]
-m INT Suppress alignments. Suppress all alignments for a particular read or pair
if more than INT reportable alignments exist for it. [no limit]
--best Best mode. Make Bowtie guarantee that reported singleton alignments are
"best" in terms of stratum (the number of mismatches) and quality values at
mismatched position. [off]
--strata Best strata. When running in best mode, report alignments that fall into the
best stratum if there are ones falling into more than one. [off]
-o INT Offrate override. Override the offrate of the index with INT. Some row
markings are discarded when index read into memory. INT must be greater than
the value used to build the index (default: 5). [off]
--seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
--snpphred INT Use INT as the SNP penalty for decoding colorspace alignments. True ratio of
SNPs per base in the subject genome. [see --snpfrac]
--snpfrac DEC Use DEC as the estimated ratio of SNPs per base when decoding colorspace
alignments. [0.001]
--col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace
alignments. [off]
</help>
<code file="bowtie_wrapper_code.py" />
+110 -86
View File
@@ -3,6 +3,35 @@
"""
Runs BWA on single-end or paired-end data.
Produces a SAM file containing the mappings.
Works with BWA version 0.5.3.
usage: bwa_wrapper.py [options]
-t, --threads=t: The number of threads to use
-r, --ref=r: The reference genome to use or index
-f, --fastq=f: The (forward) fastq file to use for the mapping
-F, --rfastq=F: The reverse fastq file to use for mapping if paired-end data
-u, --output=u: The file to save the output (SAM format)
-g, --genAlignType=g: The type of pairing (single or paired)
-p, --params=p: Parameter setting to use (pre_set or full)
-s, --fileSource=s: Whether to use a previously indexed reference sequence or one from history (indexed or history)
-n, --maxEditDist=n: Maximum edit distance if integer
-m, --fracMissingAligns=m: Fraction of missing alignments given 2% uniform base error rate if fraction
-o, --maxGapOpens=o: Maximum number of gap opens
-e, --maxGapExtens=e: Maximum number of gap extensions
-d, --disallowLongDel=d: Disallow a long deletion within specified bps
-i, --disallowIndel=i: Disallow indel within specified bps
-l, --seed=l: Take the first specified subsequences
-k, --maxEditDistSeed=k: Maximum edit distance to the seed
-M, --mismatchPenalty=M: Mismatch penalty
-O, --gapOpenPenalty=O: Gap open penalty
-E, --gapExtensPenalty=E: Gap extension penalty
-R, --suboptAlign=R: Proceed with suboptimal alignments even if the top hit is a repeat
-N, --noIterSearch=N: Disable iterative search
-T, --outputTopN=T: Output top specified hits
-S, --maxInsertSize=S: Maximum insert size for a read pair to be considered mapped good
-P, --maxOccurPairing=P: Maximum occurrences of a read for pairings
-D, --dbkey=D: Dbkey for reference genome
-H, --suppressHeader=h: Suppress header
"""
import optparse, os, shutil, sys, tempfile
@@ -14,138 +43,133 @@ def stop_err( msg ):
def __main__():
#Parse Command Line
parser = optparse.OptionParser()
parser.add_option('', '--threads', dest='threads', help='The number of threads to use')
parser.add_option('', '--ref', dest='ref', help='The reference genome to use or index')
parser.add_option('', '--fastq', dest='fastq', help='The (forward) fastq file to use for the mapping')
parser.add_option('', '--rfastq', dest='rfastq', help='The reverse fastq file to use for mapping if paired-end data')
parser.add_option('', '--output', dest='output', help='The file to save the output (SAM format)')
parser.add_option('', '--genAlignType', dest='genAlignType', help='The type of pairing (single or paired)')
parser.add_option('', '--params', dest='params', help='Parameter setting to use (pre_set or full)')
parser.add_option('', '--fileType', dest='fileType', help='Type of reference sequence file (solid or solexa)')
parser.add_option('', '--fileSource', dest='fileSource', help='Whether to use a previously indexed reference sequence or one form history (indexed or history)')
parser.add_option('-n', '--maxEditDist', dest='maxEditDist', help='Maximum edit distance if integer')
parser.add_option('', '--fracMissingAligns', dest='fracMissingAligns', help='Fraction of missing alignments given 2% uniform base error rate if fraction')
parser.add_option('-o', '--maxGapOpens', dest='maxGapOpens', help='Maximum number of gap opens')
parser.add_option('-e', '--maxGapExtens', dest='maxGapExtens', help='Maximum number of gap extensions')
parser.add_option('-d', '--disallowLongDel', dest='disallowLongDel', help='Disallow a long deletion within specified bps')
parser.add_option('-i', '--disallowIndel', dest='disallowIndel', help='Disallow indel within specified bps')
parser.add_option('-l', '--seed', dest='seed', help='Take the first specified subsequences')
parser.add_option('-k', '--maxEditDistSeed', dest='maxEditDistSeed', help='Maximum edit distance to the seed')
parser.add_option('-M', '--mismatchPenalty', dest='mismatchPenalty', help='Mismatch penalty')
parser.add_option('-O', '--gapOpenPenalty', dest='gapOpenPenalty', help='Gap open penalty')
parser.add_option('-E', '--gapExtensPenalty', dest='gapExtensPenalty', help='Gap extension penalty')
parser.add_option('-c', '--colorSpaceRev', dest='colorSpaceRev', help="Reverse query but don't complement it")
parser.add_option('-R', '--suboptAlign', dest='suboptAlign', help='Proceed with suboptimal alignments even if the top hit is a repeat')
parser.add_option('-N', '--noIterSearch', dest='noIterSearch', help='Disable iterative search')
parser.add_option('', '--outputTopN', dest='outputTopN', help='Output top specified hits')
parser.add_option('', '--maxInsertSize', dest='maxInsertSize', help='Maximum insert size for a read pair to be considered mapped good')
parser.add_option('', '--maxOccurPairing', dest='maxOccurPairing', help='Maximum occurrences of a read for pairings')
parser.add_option('', '--dbkey', dest='dbkey', help='')
parser.add_option('', '--suppressHeader', dest='suppressHeader', help='Suppress header')
parser.add_option( '-t', '--threads', dest='threads', help='The number of threads to use' )
parser.add_option( '-r', '--ref', dest='ref', help='The reference genome to use or index' )
parser.add_option( '-f', '--fastq', dest='fastq', help='The (forward) fastq file to use for the mapping' )
parser.add_option( '-F', '--rfastq', dest='rfastq', help='The reverse fastq file to use for mapping if paired-end data' )
parser.add_option( '-u', '--output', dest='output', help='The file to save the output (SAM format)' )
parser.add_option( '-g', '--genAlignType', dest='genAlignType', help='The type of pairing (single or paired)' )
parser.add_option( '-p', '--params', dest='params', help='Parameter setting to use (pre_set or full)' )
parser.add_option( '-s', '--fileSource', dest='fileSource', help='Whether to use a previously indexed reference sequence or one form history (indexed or history)' )
parser.add_option( '-n', '--maxEditDist', dest='maxEditDist', help='Maximum edit distance if integer' )
parser.add_option( '-m', '--fracMissingAligns', dest='fracMissingAligns', help='Fraction of missing alignments given 2% uniform base error rate if fraction' )
parser.add_option( '-o', '--maxGapOpens', dest='maxGapOpens', help='Maximum number of gap opens' )
parser.add_option( '-e', '--maxGapExtens', dest='maxGapExtens', help='Maximum number of gap extensions' )
parser.add_option( '-d', '--disallowLongDel', dest='disallowLongDel', help='Disallow a long deletion within specified bps' )
parser.add_option( '-i', '--disallowIndel', dest='disallowIndel', help='Disallow indel within specified bps' )
parser.add_option( '-l', '--seed', dest='seed', help='Take the first specified subsequences' )
parser.add_option( '-k', '--maxEditDistSeed', dest='maxEditDistSeed', help='Maximum edit distance to the seed' )
parser.add_option( '-M', '--mismatchPenalty', dest='mismatchPenalty', help='Mismatch penalty' )
parser.add_option( '-O', '--gapOpenPenalty', dest='gapOpenPenalty', help='Gap open penalty' )
parser.add_option( '-E', '--gapExtensPenalty', dest='gapExtensPenalty', help='Gap extension penalty' )
parser.add_option( '-R', '--suboptAlign', dest='suboptAlign', help='Proceed with suboptimal alignments even if the top hit is a repeat' )
parser.add_option( '-N', '--noIterSearch', dest='noIterSearch', help='Disable iterative search' )
parser.add_option( '-T', '--outputTopN', dest='outputTopN', help='Output top specified hits' )
parser.add_option( '-S', '--maxInsertSize', dest='maxInsertSize', help='Maximum insert size for a read pair to be considered mapped good' )
parser.add_option( '-P', '--maxOccurPairing', dest='maxOccurPairing', help='Maximum occurrences of a read for pairings' )
parser.add_option( '-D', '--dbkey', dest='dbkey', help='Dbkey for reference genome' )
parser.add_option( '-H', '--suppressHeader', dest='suppressHeader', help='Suppress header' )
(options, args) = parser.parse_args()
# make temp directory for placement of indices and copy reference file there
tmp_index_dir = tempfile.mkdtemp()
# index if necessary
if options.fileSource == 'history':
try:
shutil.copy(options.ref, tmp_index_dir)
except Exception, erf:
stop_err('Error creating temp directory for indexing purposes\n' + str(erf))
shutil.copy( options.ref, tmp_index_dir )
except Exception, e:
stop_err( 'Error creating temp directory for indexing purposes\n' + str( e ) )
try:
size = os.stat(options.ref).st_size
size = os.stat( options.ref ).st_size
if size <= 2**30:
indexingAlg = 'is'
else:
indexingAlg = 'bwtsw'
except:
indexingAlg = 'is'
if options.fileType == 'solid':
indexing_cmds = '-c -a %s' % indexingAlg
else:
indexing_cmds = '-a %s' % indexingAlg
options.ref = os.path.join(tmp_index_dir,os.path.split(options.ref)[1])
cmd1 = 'bwa index %s %s 2> /dev/null' % (indexing_cmds, options.ref)
indexing_cmds = '-a %s' % indexingAlg
options.ref = os.path.join( tmp_index_dir, os.path.split( options.ref )[1] )
cmd1 = 'bwa index %s %s 2> /dev/null' % ( indexing_cmds, options.ref )
try:
os.chdir(tmp_index_dir)
os.system(cmd1)
except Exception, erf:
stop_err('Error indexing reference sequence\n' + str(erf))
os.chdir( tmp_index_dir )
os.system( cmd1 )
except Exception, e:
stop_err( 'Error indexing reference sequence\n' + str( e ) )
# set up aligning and generate aligning command options
if options.params == 'pre_set':
if options.fileType == 'solid':
aligning_cmds = '-c -t %s' % options.threads
else:
aligning_cmds = '-t %s' % options.threads
aligning_cmds = '-t %s' % options.threads
gen_alignment_cmds = ''
else:
aligning_cmds = '-n %s -o %s -e %s -d %s -i %s %s -k %s -t %s -M %s -O %s -E %s %s %s %s' % \
((options.fracMissingAligns, options.maxEditDist)[options.maxEditDist != '0'],
options.maxGapOpens, options.maxGapExtens, options.disallowLongDel,
options.disallowIndel, ('',' -l %s'%options.seed)[options.seed!='-1'],
options.maxEditDistSeed, options.threads, options.mismatchPenalty,
options.gapOpenPenalty, options.gapExtensPenalty, ('',' -c')[options.colorSpaceRev=='true'],
('',' -R')[options.suboptAlign=='true'], ('',' -N')[options.noIterSearch=='true'])
if options.maxEditDist != '0':
editDist = options.maxEditDist
else:
editDist = options.fracMissingAligns
if options.seed != '-1':
seed = '-l %s' % options.seed
else:
seed = ''
if options.suboptAlign == 'true':
suboptAlign = '-R'
else:
suboptAlign = ''
if options.noIterSearch == 'true':
noIterSearch = '-N'
else:
noIterSearch = ''
aligning_cmds = '-n %s -o %s -e %s -d %s -i %s %s -k %s -t %s -M %s -O %s -E %s %s %s' % \
( editDist, options.maxGapOpens, options.maxGapExtens, options.disallowLongDel,
options.disallowIndel, seed, options.maxEditDistSeed, options.threads,
options.mismatchPenalty, options.gapOpenPenalty, options.gapExtensPenalty,
suboptAlign, noIterSearch )
if options.genAlignType == 'single':
gen_alignment_cmds = '-n %s' % options.outputTopN
elif options.genAlignType == 'paired':
gen_alignment_cmds = '-a %s -o %s' % (options.maxInsertSize, options.maxOccurPairing)
gen_alignment_cmds = '-a %s -o %s' % ( options.maxInsertSize, options.maxOccurPairing )
# print 'options.genAlignType: %s and commands: %s' % (options.genAlignType, gen_alignment_cmds)
# set up output files
tmp_align_out = tempfile.NamedTemporaryFile()
tmp_align_out2 = tempfile.NamedTemporaryFile()
# prepare actual aligning and generate aligning commands
cmd2 = 'bwa aln %s %s %s > %s 2> /dev/null' % (aligning_cmds, options.ref, options.fastq, tmp_align_out.name)
cmd2 = 'bwa aln %s %s %s > %s 2> /dev/null' % ( aligning_cmds, options.ref, options.fastq, tmp_align_out.name )
cmd2b = ''
if options.genAlignType == 'paired':
cmd2b = 'bwa aln %s %s %s > %s 2> /dev/null' % (aligning_cmds, options.ref, options.rfastq, tmp_align_out2.name)
cmd3 = 'bwa sampe %s %s %s %s %s %s >> %s 2> /dev/null' % (gen_alignment_cmds, options.ref, tmp_align_out.name, tmp_align_out2.name, options.fastq, options.rfastq, options.output)
cmd2b = 'bwa aln %s %s %s > %s 2> /dev/null' % ( aligning_cmds, options.ref, options.rfastq, tmp_align_out2.name )
cmd3 = 'bwa sampe %s %s %s %s %s %s >> %s 2> /dev/null' % ( gen_alignment_cmds, options.ref, tmp_align_out.name, tmp_align_out2.name, options.fastq, options.rfastq, options.output )
else:
cmd3 = 'bwa samse %s %s %s %s >> %s 2> /dev/null' % (gen_alignment_cmds, options.ref, tmp_align_out.name, options.fastq, options.output)
cmd3 = 'bwa samse %s %s %s %s >> %s 2> /dev/null' % ( gen_alignment_cmds, options.ref, tmp_align_out.name, options.fastq, options.output )
# align
try:
os.system(cmd2)
except Exception, erf:
stop_err("Error aligning sequence\n" + str(erf))
os.system( cmd2 )
except Exception, e:
stop_err( 'Error aligning sequence\n' + str( e ) )
# and again if paired data
try:
if cmd2b:
os.system(cmd2b)
os.system( cmd2b )
except Exception, erf:
stop_err("Error aligning second sequence\n" + str(erf))
stop_err( 'Error aligning second sequence\n' + str( e ) )
# generate align
try:
os.system(cmd3)
except Exception, erf:
stop_err("Error sequence aligning sequence\n" + str(erf))
os.system( cmd3 )
except Exception, e:
stop_err( 'Error sequence aligning sequence\n' + str( e ) )
# clean up temp files
tmp_align_out.close()
tmp_align_out2.close()
# remove header if necessary
if options.suppressHeader == 'true':
tmp_out = tempfile.NamedTemporaryFile()
cmd4 = 'cp %s %s' % (options.output, tmp_out.name)
try:
os.system(cmd4)
except Exception, erf:
stop_err("Error copying output file before removing headers\n" + str(erf))
output = file(tmp_out.name, 'r')
fout = file(options.output, 'w')
header = True
line = output.readline()
while line.strip() != '':
if header:
if line.startswith('@HD') or line.startswith('@SQ') or line.startswith('@RG') or line.startswith('@PG') or line.startswith('@CO'):
pass
else:
header = False
fout.write(line)
else:
fout.write(line)
line = output.readline()
shutil.move( options.output, tmp_out.name )
except Exception, e:
stop_err( 'Error moving output file before removing headers\n' + str( e ) )
fout = file( options.output, 'w' )
for line in file( tmp_out.name, 'r' ):
if not ( line.startswith( '@HD' ) or line.startswith( '@SQ' ) or line.startswith( '@RG' ) or line.startswith( '@PG' ) or line.startswith( '@CO' ) ):
fout.write( line )
fout.close()
tmp_out.close()
# clean up temp dir
if os.path.exists(tmp_index_dir):
shutil.rmtree(tmp_index_dir)
if os.path.exists( tmp_index_dir ):
shutil.rmtree( tmp_index_dir )
if __name__=="__main__": __main__()
+123 -230
View File
@@ -1,112 +1,48 @@
<tool id="bwa_wrapper" name="Map with BWA" version="1.0.1">
<tool id="bwa_wrapper" name="Map with BWA" version="1.0.3">
<description></description>
<command interpreter="python">
bwa_wrapper.py
--threads="4"
#if $solidOrSolexa.solidRefGenomeSource.refGenomeSource == "history":
--ref=$solidOrSolexa.solidRefGenomeSource.ownFile
#else:
--ref=$solidOrSolexa.solidRefGenomeSource.indices.value
#end if
--fastq=$paired.input1
#if $paired.sPaired == "paired":
--rfastq=$paired.input2
#else:
--rfastq="None"
#end if
--output=$output
--genAlignType=$paired.sPaired
--params=$params.source_select
--fileType=$solidOrSolexa.solidSolexa
--fileSource=$solidOrSolexa.solidRefGenomeSource.refGenomeSource
#if $params.source_select == "pre_set":
--maxEditDist="None"
--fracMissingAligns="None"
--maxGapOpens="None"
--maxGapExtens="None"
--disallowLongDel="None"
--disallowIndel="None"
--seed="None"
--maxEditDistSeed="None"
--mismatchPenalty="None"
--gapOpenPenalty="None"
--gapExtensPenalty="None"
--colorSpaceRev="None"
--suboptAlign="None"
--noIterSearch="None"
--outputTopN="None"
--maxInsertSize="None"
--maxOccurPairing="None"
#else:
--maxEditDist=$params.maxEditDist
--fracMissingAligns=$params.fracMissingAligns
--maxGapOpens=$params.maxGapOpens
--maxGapExtens=$params.maxGapExtens
--disallowLongDel=$params.disallowLongDel
--disallowIndel=$params.disallowIndel
--seed=$params.seed
--maxEditDistSeed=$params.maxEditDistSeed
--mismatchPenalty=$params.mismatchPenalty
--gapOpenPenalty=$params.gapOpenPenalty
--gapExtensPenalty=$params.gapExtensPenalty
--colorSpaceRev=$params.colorSpaceRev
--suboptAlign=$params.suboptAlign
--noIterSearch=$params.noIterSearch
--outputTopN=$params.outputTopN
--maxInsertSize=$params.maxInsertSize
--maxOccurPairing=$params.maxOccurPairing
#end if
#if $solidOrSolexa.solidRefGenomeSource.refGenomeSource == "history":
--dbkey=$dbkey
#else:
--dbkey="None"
#end if
--suppressHeader=$suppressHeader
<command interpreter="python">bwa_wrapper.py
--threads="4"
#if $genomeSource.refGenomeSource == "history":
--ref=$genomeSource.ownFile
#else:
--ref=$genomeSource.indices.value
#end if
--fastq=$paired.input1
#if $paired.sPaired == "paired":
--rfastq=$paired.input2
#else:
--rfastq="None"
#end if
--output=$output --genAlignType=$paired.sPaired --params=$params.source_select --fileSource=$genomeSource.refGenomeSource
#if $params.source_select == "pre_set":
--maxEditDist="None" --fracMissingAligns="None" --maxGapOpens="None" --maxGapExtens="None" --disallowLongDel="None" --disallowIndel="None" --seed="None" --maxEditDistSeed="None" --mismatchPenalty="None" --gapOpenPenalty="None" --gapExtensPenalty="None" --suboptAlign="None" --noIterSearch="None" --outputTopN="None" --maxInsertSize="None" --maxOccurPairing="None"
#else:
--maxEditDist=$params.maxEditDist --fracMissingAligns=$params.fracMissingAligns --maxGapOpens=$params.maxGapOpens --maxGapExtens=$params.maxGapExtens --disallowLongDel=$params.disallowLongDel --disallowIndel=$params.disallowIndel --seed=$params.seed --maxEditDistSeed=$params.maxEditDistSeed --mismatchPenalty=$params.mismatchPenalty --gapOpenPenalty=$params.gapOpenPenalty --gapExtensPenalty=$params.gapExtensPenalty --suboptAlign=$params.suboptAlign --noIterSearch=$params.noIterSearch --outputTopN=$params.outputTopN --maxInsertSize=$params.maxInsertSize --maxOccurPairing=$params.maxOccurPairing
#end if
#if $genomeSource.refGenomeSource == "history":
--dbkey=$dbkey
#else:
--dbkey="None"
#end if
--suppressHeader=$suppressHeader
</command>
<inputs>
<conditional name="solidOrSolexa">
<param name="solidSolexa" type="select" label="Select SOLiD or Solexa format for the original dataset">
<option value="solexa">Illumina</option>
<option value="solid">SOLiD</option>
<conditional name="genomeSource">
<param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
<option value="indexed">Use a built-in index</option>
<option value="history">Use one from the history</option>
</param>
<when value="solid">
<conditional name="solidRefGenomeSource">
<param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
<option value="indexed">Use a built-in index</option>
<option value="history">Use one from the history</option>
</param>
<when value="indexed">
<param name="indices" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team">
<options from_file="sequence_index_color.loc">
<column name="value" index="1" />
<column name="name" index="0" />
</options>
</param>
</when>
<when value="history">
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" />
</when>
</conditional>
</when>
<when value="solexa">
<conditional name="solidRefGenomeSource">
<param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
<option value="indexed">Use a built-in index</option>
<option value="history">Use one from the history</option>
</param>
<when value="indexed">
<param name="indices" type="select" label="Select a reference genome">
<options from_file="sequence_index_base.loc">
<column name="value" index="1" />
<column name="name" index="0" />
</options>
</param>
</when>
<when value="history">
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
</when>
</conditional>
</when>
<when value="indexed">
<param name="indices" type="select" label="Select a reference genome">
<options from_file="bwa_index.loc">
<column name="value" index="1" />
<column name="name" index="0" />
</options>
</param>
</when>
<when value="history">
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
</when>
</conditional>
<conditional name="paired">
<param name="sPaired" type="select" label="Is this library mate-paired?">
@@ -122,32 +58,28 @@
</when>
</conditional>
<conditional name="params">
<param name="source_select" type="select" label="BWA settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full List">
<option value="pre_set">Commonly used</option>
<param name="source_select" type="select" label="BWA settings to use" help="For most mapping needs use Commonly Used settings. If you want full control use Full Parameter List">
<option value="pre_set">Commonly Used</option>
<option value="full">Full Parameter List</option>
</param>
<when value="pre_set" />
<when value="full">
<param name="maxEditDist" type="integer" value="0" label="Maximum edit distance" help="Enter this value OR a fraction of missing alignments, not both" />
<param name="fracMissingAligns" type="float" value="0.04" label="Fraction of missing alignments given 2% uniform base error rate" help="Enter this value OR maximum edit distance, not both" />
<param name="maxGapOpens" type="integer" value="1" label="Maximum number of gap opens" />
<param name="maxGapExtens" type="integer" value="-1" label="Maximum number of gap extensions" help="-1 for k-difference mode (disallowing long gaps)" />
<param name="disallowLongDel" type="integer" value="16" label="Disallow long deletion within [value] towards the 3'-end" />
<param name="disallowIndel" type="integer" value="5" label="Disallow insertion/deletion within [value] bp towards the end" />
<param name="seed" type="integer" value="-1" label="Number of first subsequences to take as seed" help="Enter -1 for infinity" />
<param name="maxEditDistSeed" type="integer" value="2" label="Maximum edit distance in the seed" />
<param name="mismatchPenalty" type="integer" value="3" label="Mismatch penalty" help="BWA will not search for suboptimal hits with a score lower than [value]" />
<param name="gapOpenPenalty" type="integer" value="11" label="Gap open penalty" />
<param name="gapExtensPenalty" type="integer" value="4" label="Gap extension penalty" />
<param name="colorSpaceRev" type="select" label="Reverse query but don't complement it" help="Reverse query for all alignment in color space">
<option value="false">Don't reverse query</option>
<option value="true">Reverse query</option>
</param>
<param name="suboptAlign" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Proceed with suboptimal alignments even if the top hit is a repeat" help="By default, BWA only searches for suboptimal alignments if the top hit is unique. Using this option has no effect on accuracy for single-end reads. It is mainly designed for improving the alignment accuracy of paired-end reads. However, the pairing procedure will be slowed down, especially for very short reads (~32bp)" />
<param name="noIterSearch" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Disable iterative search" help="All hits with no more than maxDiff differences will be found. This mode is much slower than the default." />
<param name="outputTopN" type="integer" value="-1" label="Output top [value] hits" help="For single-end reads only. Enter -1 to disable outputting multiple hits" />
<param name="maxInsertSize" type="integer" value="500" label="Maximum insert size for a read pair to be considered as being mapped properly" help="For paired-end reads only. Only used when there are not enough good alignment to infer the distribution of insert sizes" />
<param name="maxOccurPairing" type="integer" value="100000" label="Maximum occurrences of a read for pairing" help="For paired-end reads only. A read with more occurrences will be treated as a single-end read. Reducing this parameter helps faster pairing" />
<param name="maxEditDist" type="integer" value="0" label="Maximum edit distance (-n)" help="Enter this value OR a fraction of missing alignments, not both" />
<param name="fracMissingAligns" type="float" value="0.04" label="Fraction of missing alignments given 2% uniform base error rate (-n)" help="Enter this value OR maximum edit distance, not both" />
<param name="maxGapOpens" type="integer" value="1" label="Maximum number of gap opens (-o)" />
<param name="maxGapExtens" type="integer" value="-1" label="Maximum number of gap extensions (-e)" help="-1 for k-difference mode (disallowing long gaps)" />
<param name="disallowLongDel" type="integer" value="16" label="Disallow long deletion within [value] towards the 3'-end (-d)" />
<param name="disallowIndel" type="integer" value="5" label="Disallow insertion/deletion within [value] bp towards the end (-i)" />
<param name="seed" type="integer" value="-1" label="Number of first subsequences to take as seed (-l)" help="Enter -1 for infinity" />
<param name="maxEditDistSeed" type="integer" value="2" label="Maximum edit distance in the seed (-k)" />
<param name="mismatchPenalty" type="integer" value="3" label="Mismatch penalty (-M)" help="BWA will not search for suboptimal hits with a score lower than [value]" />
<param name="gapOpenPenalty" type="integer" value="11" label="Gap open penalty (-O)" />
<param name="gapExtensPenalty" type="integer" value="4" label="Gap extension penalty (-E)" />
<param name="suboptAlign" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Proceed with suboptimal alignments even if the top hit is a repeat" help="By default, BWA only searches for suboptimal alignments if the top hit is unique. Using this option has no effect on accuracy for single-end reads. It is mainly designed for improving the alignment accuracy of paired-end reads. However, the pairing procedure will be slowed down, especially for very short reads (~32bp) (-R)" />
<param name="noIterSearch" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Disable iterative search" help="All hits with no more than maxDiff differences will be found. This mode is much slower than the default (-N)" />
<param name="outputTopN" type="integer" value="-1" label="Output top [value] hits" help="For single-end reads only. Enter -1 to disable outputting multiple hits. NOTE: If you put in a positive value here, your output will NOT be in SAM format (-n)" />
<param name="maxInsertSize" type="integer" value="500" label="Maximum insert size for a read pair to be considered as being mapped properly" help="For paired-end reads only. Only used when there are not enough good alignment to infer the distribution of insert sizes (-a)" />
<param name="maxOccurPairing" type="integer" value="100000" label="Maximum occurrences of a read for pairing" help="For paired-end reads only. A read with more occurrences will be treated as a single-end read. Reducing this parameter helps faster pairing (-o)" />
</when>
</conditional>
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="BWA produces SAM with several lines of header information" />
@@ -157,85 +89,32 @@
</outputs>
<tests>
<test>
<param name="solidSolexa" value="solexa" />
<!--
BWA commands:
bwa aln -t 4 phiX test-data/bwa_wrapper_in1.fastq > bwa_wrapper_out1.sai
bwa samse phiX bwa_wrapper_out1.sai test-data/bwa_wrapper_in1.fastq >> bwa_wrapper_out1.sam
phiX.fasta is the prefix for the reference
-->
<param name="refGenomeSource" value="indexed" />
<param name="indices" value="phiX" />
<param name="sPaired" value="single" />
<param name="input1" value="bwa_wrapper_in1.fastq" ftype="fastqsanger" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out0.sam" ftype="sam" />
<output name="output" file="bwa_wrapper_out1.sam" ftype="sam" sort="true" />
</test>
<test>
<param name="solidSolexa" value="solid" />
<!--
BWA commands:
cp test-data/phiX.fasta phiX.fasta
bwa index -a is phiX.fasta
bwa aln -n 0.04 -o 1 -e -1 -d 16 -i 5 -k 2 -t 4 -M 3 -O 11 -E 4 -R -N phiX.fasta test-data/bwa_wrapper_in1.fastq > bwa_wrapper_out1.sai
bwa samse phiX.fasta bwa_wrapper_out1.sai test-data/bwa_wrapper_in1.fastq >> bwa_wrapper_out2.sam
phiX.fasta is the prefix for the reference
-->
<param name="refGenomeSource" value="history" />
<param name="ownFile" value="phiX.fasta" />
<param name="sPaired" value="single" />
<param name="input1" value="bwa_wrapper_in0.fastq" ftype="fastqsanger" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out0b.sam" ftype="sam" />
</test>
<test>
<param name="solidSolexa" value="solid" />
<param name="refGenomeSource" value="indexed" />
<param name="indices" value="phiX" />
<param name="sPaired" value="single" />
<param name="input1" value="bwa_wrapper_in2.fastq" ftype="fastqsanger" />
<param name="source_select" value="full" />
<param name="maxEditDist" value="0" />
<param name="fracMissingAligns" value="0.04" />
<param name="maxGapOpens" value="1" />
<param name="maxGapExtens" value="-1" />
<param name="disallowLongDel" value="16" />
<param name="disallowIndel" value="5" />
<param name="seed" value="-1" />
<param name="maxEditDistSeed" value="2" />
<param name="mismatchPenalty" value="3" />
<param name="gapOpenPenalty" value="11" />
<param name="gapExtensPenalty" value="4" />
<param name="colorSpaceRev" value="true" />
<param name="suboptAlign" value="true" />
<param name="noIterSearch" value="true" />
<param name="outputTopN" value="-1" />
<param name="maxInsertSize" value="500" />
<param name="maxOccurPairing" value="100000" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out1.sam" ftype="sam" />
</test>
<test>
<param name="solidSolexa" value="solid" />
<param name="refGenomeSource" value="indexed" />
<param name="indices" value="phiX" />
<param name="sPaired" value="paired" />
<param name="input1" value="bwa_wrapper_in3.fastq" ftype="fastqsanger" />
<param name="input2" value="bwa_wrapper_in4.fastq" ftype="fastqsanger" />
<param name="source_select" value="full" />
<param name="maxEditDist" value="0" />
<param name="fracMissingAligns" value="0.04" />
<param name="maxGapOpens" value="1" />
<param name="maxGapExtens" value="-1" />
<param name="disallowLongDel" value="16" />
<param name="disallowIndel" value="5" />
<param name="seed" value="-1" />
<param name="maxEditDistSeed" value="2" />
<param name="mismatchPenalty" value="3" />
<param name="gapOpenPenalty" value="11" />
<param name="gapExtensPenalty" value="4" />
<param name="colorSpaceRev" value="true" />
<param name="suboptAlign" value="true" />
<param name="noIterSearch" value="true" />
<param name="outputTopN" value="-1" />
<param name="maxInsertSize" value="500" />
<param name="maxOccurPairing" value="100000" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out2.sam" ftype="sam" />
</test>
<test>
<param name="solidSolexa" value="solexa" />
<param name="refGenomeSource" value="indexed" />
<param name="indices" value="phiX" />
<param name="sPaired" value="single" />
<param name="input1" value="bwa_wrapper_in1.fastq" ftype="fastqsanger" />
<param name="source_select" value="full" />
<param name="maxEditDist" value="0" />
@@ -249,22 +128,27 @@
<param name="mismatchPenalty" value="3" />
<param name="gapOpenPenalty" value="11" />
<param name="gapExtensPenalty" value="4" />
<param name="colorSpaceRev" value="false" />
<param name="suboptAlign" value="true" />
<param name="noIterSearch" value="true" />
<param name="outputTopN" value="-1" />
<param name="maxInsertSize" value="500" />
<param name="maxOccurPairing" value="100000" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out3.sam" ftype="sam" />
<output name="output" file="bwa_wrapper_out2.sam" ftype="sam" sort="true" />
</test>
<test>
<param name="solidSolexa" value="solexa" />
<!--
BWA commands:
bwa aln -n 0.04 -o 1 -e -1 -d 16 -i 5 -k 2 -t 4 -M 3 -O 11 -E 4 -R -N phiX.fasta test-data/bwa_wrapper_in2.fastq > bwa_wrapper_out3a.sai
bwa aln -n 0.04 -o 1 -e -1 -d 16 -i 5 -k 2 -t 4 -M 3 -O 11 -E 4 -R -N phiX.fasta test-data/bwa_wrapper_in3.fastq > bwa_wrapper_out3b.sai
bwa sampe -a 500 -o 100000 phiX.fasta bwa_wrapper_out3a.sai bwa_wrapper_out3b.sai test-data/bwa_wrapper_in2.fastq test-data/bwa_wrapper_in3.fastq >> bwa_wrapper_out3.sam
phiX.fasta is the prefix for the reference
-->
<param name="refGenomeSource" value="indexed" />
<param name="indices" value="phiX" />
<param name="sPaired" value="paired" />
<param name="input1" value="bwa_wrapper_in5.fastq" ftype="fastqsanger" />
<param name="input2" value="bwa_wrapper_in6.fastq" ftype="fastqsanger" />
<param name="input1" value="bwa_wrapper_in2.fastq" ftype="fastqsanger" />
<param name="input2" value="bwa_wrapper_in3.fastq" ftype="fastqsanger" />
<param name="source_select" value="full" />
<param name="maxEditDist" value="0" />
<param name="fracMissingAligns" value="0.04" />
@@ -277,21 +161,22 @@
<param name="mismatchPenalty" value="3" />
<param name="gapOpenPenalty" value="11" />
<param name="gapExtensPenalty" value="4" />
<param name="colorSpaceRev" value="false" />
<param name="suboptAlign" value="true" />
<param name="noIterSearch" value="true" />
<param name="outputTopN" value="-1" />
<param name="maxInsertSize" value="500" />
<param name="maxOccurPairing" value="100000" />
<param name="suppressHeader" value="true" />
<output name="output" file="bwa_wrapper_out4.sam" ftype="sam" />
<output name="output" file="bwa_wrapper_out3.sam" ftype="sam" sort="true" />
</test>
</tests>
<help>
**What it does**
BWA is a fast light-weighted tool that aligns relatively short sequences (queries) to a sequence database (large), such as the human reference genome. It is developed by Heng Li at the Sanger Insitute.
BWA is a fast light-weighted tool that aligns relatively short sequences (queries) to a sequence database (large), such as the human reference genome. It is developed by Heng Li at the Sanger Insitute. Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25, 1754-60.
This tool uses BWA version 0.5.3.
------
@@ -299,7 +184,7 @@ BWA is a fast light-weighted tool that aligns relatively short sequences (querie
.. class:: warningmark
There is no such thing (yet) as automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading `documentation`__ and experimenting. Fortunaly, Galaxy makes experimenting easy.
There is no such thing (yet) as an automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
.. __: http://bio-bwa.sourceforge.net/
@@ -307,7 +192,7 @@ There is no such thing (yet) as automated gearshift in short read mapping. It is
**Input formats**
BWA accepts files in Sanger FASTQ format.
BWA accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
------
@@ -315,31 +200,35 @@ BWA accepts files in Sanger FASTQ format.
The output is in SAM format, and has the following columns::
1 QNAME - Query (pair) NAME
2 FLAG - bitwise FLAG
3 RNAME - Reference sequence NAME
4 POS - 1-based leftmost POSition/coordinate of clipped sequence
5 MAPQ - MAPping Quality (Phred-scaled)
6 CIGAR - extended CIGAR string
7 MRNM - Mate Reference sequence NaMe ('=' if same as RNAME)
8 MPOS - 1-based Mate POSition
9 ISIZE - Inferred insert SIZE
10 SEQ - query SEQuence on the same strand as the reference
11 QUAL - query QUALity (ASCII-33 gives the Phred base quality)
12 OPT - variable OPTional fields in the format TAG:VTYPE:VALU
Column Description
-------- --------------------------------------------------------
1 QNAME Query (pair) NAME
2 FLAG bitwise FLAG
3 RNAME Reference sequence NAME
4 POS 1-based leftmost POSition/coordinate of clipped sequence
5 MAPQ MAPping Quality (Phred-scaled)
6 CIGAR extended CIGAR string
7 MRNM Mate Reference sequence NaMe ('=' if same as RNAME)
8 MPOS 1-based Mate POSition
9 ISIZE Inferred insert SIZE
10 SEQ query SEQuence on the same strand as the reference
11 QUAL query QUALity (ASCII-33 gives the Phred base quality)
12 OPT variable OPTional fields in the format TAG:VTYPE:VALU
The flags are as follows::
Flag - Description
0x0001 - the read is paired in sequencing
0x0002 - the read is mapped in a proper pair
0x0004 - the query sequence itself is unmapped
0x0008 - the mate is unmapped
0x0010 - strand of the query (1 for reverse)
0x0020 - strand of the mate
0x0040 - the read is the first read in a pair
0x0080 - the read is the second read in a pair
0x0100 - the alignment is not primary
Flag Description
------ -------------------------------------
Flag Description
0x0001 the read is paired in sequencing
0x0002 the read is mapped in a proper pair
0x0004 the query sequence itself is unmapped
0x0008 the mate is unmapped
0x0010 strand of the query (1 for reverse)
0x0020 strand of the mate
0x0040 the read is the first read in a pair
0x0080 the read is the second read in a pair
0x0100 the alignment is not primary
It looks like this (scroll sideways to see the entire example)::
@@ -393,13 +282,17 @@ For **aln**::
For **samse**::
-n INT Output up to INT top hits. Value -1 to disable outputting multiple
hits. [-1]
hits. NOTE: Entering a value other than -1 will result in output that
is not in SAM format, and therefore not usable further down the
pipeline. Check the BWA documentation for details on the format of
the output. [-1]
For **sampe**::
-a INT Maximum insert size for a read pair to be considered as being mapped
properly. Since 0.4.5, this option is only used when there are not
enough good alignment to infer the distribution of insert sizes. [500]
properly. Since version 0.4.5, this option is only used when there
are not enough good alignment to infer the distribution of insert
sizes. [500]
-o INT Maximum occurrences of a read for pairing. A read with more
occurrences will be treated as a single-end read. Reducing this
parameter helps faster pairing. [100000]