/tools/sr_mapping/bwa_color_wrapper.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 482 lines · 396 code · 45 blank · 41 comment · 0 complexity · ceee640c702a104d2fd2ed2270644256 MD5 · raw file

  1. <tool id="bwa_color_wrapper" name="Map with BWA for SOLiD" version="1.0.1">
  2. <description></description>
  3. <parallelism method="basic"></parallelism>
  4. <command interpreter="python">
  5. bwa_wrapper.py
  6. --threads="4"
  7. --color-space
  8. ## reference source
  9. --fileSource=$genomeSource.refGenomeSource
  10. #if $genomeSource.refGenomeSource == "history":
  11. ##build index on the fly
  12. --ref="${genomeSource.ownFile}"
  13. --dbkey=$dbkey
  14. #else:
  15. ##use precomputed indexes
  16. --ref="${ filter( lambda x: str( x[0] ) == str( $genomeSource.indices ), $__app__.tool_data_tables[ 'bwa_indexes_color' ].get_fields() )[0][-1] }"
  17. --do_not_build_index
  18. #end if
  19. ## input file(s)
  20. --input1=$paired.input1
  21. #if $paired.sPaired == "paired":
  22. --input2=$paired.input2
  23. #end if
  24. ## output file
  25. --output=$output
  26. ## run parameters
  27. --genAlignType=$paired.sPaired
  28. --params=$params.source_select
  29. #if $params.source_select != "pre_set":
  30. --maxEditDist=$params.maxEditDist
  31. --fracMissingAligns=$params.fracMissingAligns
  32. --maxGapOpens=$params.maxGapOpens
  33. --maxGapExtens=$params.maxGapExtens
  34. --disallowLongDel=$params.disallowLongDel
  35. --disallowIndel=$params.disallowIndel
  36. --seed=$params.seed
  37. --maxEditDistSeed=$params.maxEditDistSeed
  38. --mismatchPenalty=$params.mismatchPenalty
  39. --gapOpenPenalty=$params.gapOpenPenalty
  40. --gapExtensPenalty=$params.gapExtensPenalty
  41. --suboptAlign=$params.suboptAlign
  42. --noIterSearch=$params.noIterSearch
  43. --outputTopN=$params.outputTopN
  44. --outputTopNDisc=$params.outputTopNDisc
  45. --maxInsertSize=$params.maxInsertSize
  46. --maxOccurPairing=$params.maxOccurPairing
  47. #if $params.readGroup.specReadGroup == "yes"
  48. --rgid="$params.readGroup.rgid"
  49. --rgcn="$params.readGroup.rgcn"
  50. --rgds="$params.readGroup.rgds"
  51. --rgdt="$params.readGroup.rgdt"
  52. --rgfo="$params.readGroup.rgfo"
  53. --rgks="$params.readGroup.rgks"
  54. --rglb="$params.readGroup.rglb"
  55. --rgpg="$params.readGroup.rgpg"
  56. --rgpi="$params.readGroup.rgpi"
  57. --rgpl="$params.readGroup.rgpl"
  58. --rgpu="$params.readGroup.rgpu"
  59. --rgsm="$params.readGroup.rgsm"
  60. #end if
  61. #end if
  62. ## suppress output SAM header
  63. --suppressHeader=$suppressHeader
  64. </command>
  65. <requirements>
  66. <requirement type="package">bwa</requirement>
  67. </requirements>
  68. <inputs>
  69. <conditional name="genomeSource">
  70. <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
  71. <option value="indexed">Use a built-in index</option>
  72. <option value="history">Use one from the history</option>
  73. </param>
  74. <when value="indexed">
  75. <param name="indices" type="select" label="Select a reference genome">
  76. <options from_data_table="bwa_indexes_color">
  77. <filter type="sort_by" column="2" />
  78. <validator type="no_options" message="No indexes are available for the selected input dataset" />
  79. </options>
  80. </param>
  81. </when>
  82. <when value="history">
  83. <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
  84. </when>
  85. </conditional>
  86. <conditional name="paired">
  87. <param name="sPaired" type="select" label="Is this library mate-paired?">
  88. <option value="single">Single-end</option>
  89. <option value="paired">Paired-end</option>
  90. </param>
  91. <when value="single">
  92. <param name="input1" type="data" format="fastqcssanger" label="FASTQ file (Nucleotide-space recoded from color-space)">
  93. <help>Convert color-space data to nucleotide-space (see help section below for steps). Must have Sanger-scaled quality values with ASCII offset 33</help>
  94. </param>
  95. </when>
  96. <when value="paired">
  97. <param name="input1" type="data" format="fastqcssanger" label="Forward FASTQ file (Nucleotide-space recoded from color-space)" help="Must have Sanger-scaled quality values with ASCII offset 33">
  98. <help>Convert color-space data to nucleotide-space (see help section below for steps). Must have Sanger-scaled quality values with ASCII offset 33</help>
  99. </param>
  100. <param name="input2" type="data" format="fastqcssanger" label="Reverse FASTQ file (Nucleotide-space recoded from color-space)" help="Must have Sanger-scaled quality values with ASCII offset 33">
  101. <help>Convert color-space data to nucleotide-space (see help section below for steps). Must have Sanger-scaled quality values with ASCII offset 33</help>
  102. </param>
  103. </when>
  104. </conditional>
  105. <conditional name="params">
  106. <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">
  107. <option value="pre_set">Commonly Used</option>
  108. <option value="full">Full Parameter List</option>
  109. </param>
  110. <when value="pre_set" />
  111. <when value="full">
  112. <param name="maxEditDist" type="integer" value="0" label="Maximum edit distance (aln -n)" help="Enter this value OR a fraction of missing alignments, not both" />
  113. <param name="fracMissingAligns" type="float" value="0.04" label="Fraction of missing alignments given 2% uniform base error rate (aln -n)" help="Enter this value OR maximum edit distance, not both" />
  114. <param name="maxGapOpens" type="integer" value="1" label="Maximum number of gap opens (aln -o)" />
  115. <param name="maxGapExtens" type="integer" value="-1" label="Maximum number of gap extensions (aln -e)" help="-1 for k-difference mode (disallowing long gaps)" />
  116. <param name="disallowLongDel" type="integer" value="16" label="Disallow long deletion within [value] bp towards the 3'-end (aln -d)" />
  117. <param name="disallowIndel" type="integer" value="5" label="Disallow insertion/deletion within [value] bp towards the end (aln -i)" />
  118. <param name="seed" type="integer" value="-1" label="Number of first subsequences to take as seed (aln -l)" help="Enter -1 for infinity" />
  119. <param name="maxEditDistSeed" type="integer" value="2" label="Maximum edit distance in the seed (aln -k)" />
  120. <param name="mismatchPenalty" type="integer" value="3" label="Mismatch penalty (aln -M)" help="BWA will not search for suboptimal hits with a score lower than [value]" />
  121. <param name="gapOpenPenalty" type="integer" value="11" label="Gap open penalty (aln -O)" />
  122. <param name="gapExtensPenalty" type="integer" value="4" label="Gap extension penalty (aln -E)" />
  123. <param name="suboptAlign" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Proceed with suboptimal alignments even if the top hit is a repeat (aln -R)" help="For paired-end reads only. 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)" />
  124. <param name="noIterSearch" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Disable iterative search (aln -N)" help="All hits with no more than maxDiff differences will be found. This mode is much slower than the default" />
  125. <param name="outputTopN" type="integer" value="3" label="Maximum number of alignments to output in the XA tag for reads paired properly (samse/sampe -n)" help="If a read has more than INT hits, the XA tag will not be written" />
  126. <param name="outputTopNDisc" type="integer" value="10" label="Maximum number of alignments to output in the XA tag for disconcordant read pairs (excluding singletons) (sampe -N)" help="For paired-end reads only. If a read has more than INT hits, the XA tag will not be written" />
  127. <param name="maxInsertSize" type="integer" value="500" label="Maximum insert size for a read pair to be considered as being mapped properly (sampe -a)" help="For paired-end reads only. Only used when there are not enough good alignments to infer the distribution of insert sizes" />
  128. <param name="maxOccurPairing" type="integer" value="100000" label="Maximum occurrences of a read for pairing (sampe -o)" 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" />
  129. <conditional name="readGroup">
  130. <param name="specReadGroup" type="select" label="Specify the read group for this file? (samse/sampe -r)">
  131. <option value="yes">Yes</option>
  132. <option value="no" selected="True">No</option>
  133. </param>
  134. <when value="yes">
  135. <param name="rgid" type="text" size="25" label="Read group identi?er (ID). Each @RG line must have a unique ID. The value of ID is used in the RG
  136. tags of alignment records. Must be unique among all read groups in header section." help="Required if RG specified. Read group
  137. IDs may be modi?ed when merging SAM ?les in order to handle collisions." />
  138. <param name="rgcn" type="text" size="25" label="Sequencing center that produced the read (CN)" help="Optional" />
  139. <param name="rgds" type="text" size="25" label="Description (DS)" help="Optional" />
  140. <param name="rgdt" type="text" size="25" label="Date that run was produced (DT)" help="Optional. ISO8601 format date or date/time, like YYYY-MM-DD" />
  141. <param name="rgfo" type="text" size="25" label="Flow order (FO). The array of nucleotide bases that correspond to the nucleotides used for each
  142. ?ow of each read." help="Optional. Multi-base ?ows are encoded in IUPAC format, and non-nucleotide ?ows by
  143. various other characters. Format : /\*|[ACMGRSVTWYHKDBN]+/" />
  144. <param name="rgks" type="text" size="25" label="The array of nucleotide bases that correspond to the key sequence of each read (KS)" help="Optional" />
  145. <param name="rglb" type="text" size="25" label="Library name (LB)" help="Required if RG specified" />
  146. <param name="rgpg" type="text" size="25" label="Programs used for processing the read group (PG)" help="Optional" />
  147. <param name="rgpi" type="text" size="25" label="Predicted median insert size (PI)" help="Optional" />
  148. <param name="rgpl" type="text" size="25" label="Platform/technology used to produce the reads (PL)" help="Required if RG specified. Valid values : CAPILLARY, LS454, ILLUMINA,
  149. SOLID, HELICOS, IONTORRENT and PACBIO" />
  150. <param name="rgpu" type="text" size="25" label="Platform unit (PU)" help="Optional. Unique identi?er (e.g. ?owcell-barcode.lane for Illumina or slide for SOLiD)" />
  151. <param name="rgsm" type="text" size="25" label="Sample (SM)" help="Required if RG specified. Use pool name where a pool is being sequenced" />
  152. </when>
  153. <when value="no" />
  154. </conditional>
  155. </when>
  156. </conditional>
  157. <param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Suppress the header in the output SAM file" help="BWA produces SAM with several lines of header information" />
  158. </inputs>
  159. <outputs>
  160. <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
  161. <actions>
  162. <conditional name="genomeSource.refGenomeSource">
  163. <when value="indexed">
  164. <action type="metadata" name="dbkey">
  165. <option type="from_data_table" name="bwa_indexes_color" column="1">
  166. <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
  167. <filter type="param_value" ref="genomeSource.indices" column="0" />
  168. </option>
  169. </action>
  170. </when>
  171. <when value="history">
  172. <action type="metadata" name="dbkey">
  173. <option type="from_param" name="genomeSource.ownFile" param_attribute="dbkey" />
  174. </action>
  175. </when>
  176. </conditional>
  177. </actions>
  178. </data>
  179. </outputs>
  180. <tests>
  181. <test>
  182. <!--
  183. BWA commands:
  184. cp test-data/hg19chrX_midpart.fasta hg19chrX_midpart.fasta
  185. bwa index -c -a is hg19chrX_midpart.fasta
  186. bwa aln -t 4 -c hg19chrX_midpart.fasta test-data/bwa_wrapper_in4.fastqcssanger > bwa_wrapper_out4.sai
  187. bwa samse hg19chrX_midpart.fasta bwa_wrapper_out4.sai test-data/bwa_wrapper_in4.fastqcssanger > bwa_wrapper_out4.u.sam
  188. hg19chrX_midpart.fasta is the prefix for the reference files (hg19chrX_midpart.fasta.amb, hg19chrX_midpart.fasta.ann, hg19chrX_midpart.fasta.bwt, ...)
  189. It's just part of hg19 chrX, from the middle of the chromosome
  190. plain old sort doesn't handle underscores like python:
  191. python -c "import sys; lines=file(sys.argv[1],'rb').readlines(); lines.sort(); file(sys.argv[2],'wb').write(''.join(lines))" bwa_wrapper_out4.u.sam bwa_wrapper_out4.sam
  192. -->
  193. <param name="refGenomeSource" value="history" />
  194. <param name="ownFile" value="hg19chrX_midpart.fasta" />
  195. <param name="sPaired" value="single" />
  196. <param name="input1" value="bwa_wrapper_in4.fastqcssanger" ftype="fastqcssanger" />
  197. <param name="source_select" value="pre_set" />
  198. <param name="suppressHeader" value="false" />
  199. <output name="output" file="bwa_wrapper_out4.sam" ftype="sam" sort="True" lines_diff="2" />
  200. </test>
  201. <test>
  202. <!--
  203. BWA commands:
  204. bwa aln -t 4 -c equCab2chrM_cs.fa test-data/bwa_wrapper_in5.fastqcssanger > bwa_wrapper_out5a.sai
  205. bwa aln -t 4 -c equCab2chrM_cs.fa test-data/bwa_wrapper_in6.fastqcssanger > bwa_wrapper_out5b.sai
  206. bwa sampe equCab2chrM_cs.fa bwa_wrapper_out5a.sai bwa_wrapper_out5b.sai test-data/bwa_wrapper_in5.fastqcssanger test-data/bwa_wrapper_in6.fastqcssanger > bwa_wrapper_out5.u.sam
  207. equCab2chrM_cs.fa is the prefix of the index files (equCab2chrM_cs.fa.amb, equCab2chrM_cs.fa.ann, ...)
  208. remove the comment lines (beginning with '@') from the resulting sam file
  209. plain old sort doesn't handle underscores like python:
  210. python -c "import sys; lines=file(sys.argv[1],'rb').readlines(); lines.sort(); file(sys.argv[2],'wb').write(''.join(lines))" bwa_wrapper_out5.u.sam bwa_wrapper_out5.sam
  211. -->
  212. <param name="refGenomeSource" value="indexed" />
  213. <param name="indices" value="equCab2chrM" />
  214. <param name="sPaired" value="paired" />
  215. <param name="input1" value="bwa_wrapper_in5.fastqcssanger" ftype="fastqcssanger" />
  216. <param name="input2" value="bwa_wrapper_in6.fastqcssanger" ftype="fastqcssanger" />
  217. <param name="source_select" value="pre_set" />
  218. <param name="suppressHeader" value="true" />
  219. <output name="output" file="bwa_wrapper_out5.sam" ftype="sam" sort="True" />
  220. </test>
  221. <test>
  222. <!--
  223. BWA commands:
  224. 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 -c hg19chrX_midpart.fasta test-data/bwa_wrapper_in4.fastqcssanger > bwa_wrapper_out6.sai
  225. bwa samse -n 3 -r "@RG\tID:474747\tDS:description\tDT:2011-03-14\tLB:lib-child-1-A\tPI:200\tPL:SOLID\tSM:child-1" hg19chrX_midpart.fasta bwa_wrapper_out6.sai test-data/bwa_wrapper_in4.fastqcssanger > bwa_wrapper_out6.u.sam
  226. hg19chrX_midpart_cs.fa is the prefix of the index files (hg19chrX_midpart.fa.amb, hg19chrX_midpart.fa.ann, ...)
  227. (It's just part of hg19 chrX, from the middle of the chromosome)
  228. plain old sort doesn't handle underscores like python:
  229. python -c "import sys; lines=file(sys.argv[1],'rb').readlines(); lines.sort(); file(sys.argv[2],'wb').write(''.join(lines))" bwa_wrapper_out6.u.sam bwa_wrapper_out6.sam
  230. -->
  231. <param name="refGenomeSource" value="indexed" />
  232. <param name="indices" value="hg19chrX_midpart" />
  233. <param name="sPaired" value="single" />
  234. <param name="input1" value="bwa_wrapper_in4.fastqcssanger" ftype="fastqcssanger" />
  235. <param name="source_select" value="full" />
  236. <param name="maxEditDist" value="0" />
  237. <param name="fracMissingAligns" value="0.04" />
  238. <param name="maxGapOpens" value="1" />
  239. <param name="maxGapExtens" value="-1" />
  240. <param name="disallowLongDel" value="16" />
  241. <param name="disallowIndel" value="5" />
  242. <param name="seed" value="-1" />
  243. <param name="maxEditDistSeed" value="2" />
  244. <param name="mismatchPenalty" value="3" />
  245. <param name="gapOpenPenalty" value="11" />
  246. <param name="gapExtensPenalty" value="4" />
  247. <param name="suboptAlign" value="true" />
  248. <param name="noIterSearch" value="true" />
  249. <param name="outputTopN" value="3" />
  250. <param name="outputTopNDisc" value="10" />
  251. <param name="maxInsertSize" value="500" />
  252. <param name="maxOccurPairing" value="100000" />
  253. <param name="specReadGroup" value="yes" />
  254. <param name="rgid" value="474747" />
  255. <param name="rgcn" value="" />
  256. <param name="rgds" value="description" />
  257. <param name="rgdt" value="2011-03-14" />
  258. <param name="rgfo" value="" />
  259. <param name="rgks" value="" />
  260. <param name="rglb" value="lib-child-1-A" />
  261. <param name="rgpg" value="" />
  262. <param name="rgpi" value="200" />
  263. <param name="rgpl" value="SOLID" />
  264. <param name="rgpu" value="" />
  265. <param name="rgsm" value="child-1" />
  266. <param name="suppressHeader" value="false" />
  267. <output name="output" file="bwa_wrapper_out6.sam" ftype="sam" sort="True" lines_diff="2" />
  268. </test>
  269. <test>
  270. <!--
  271. BWA commands:
  272. cp test-data/chr_m.fasta chr_m.fasta
  273. bwa index -c -a is chr_m.fasta
  274. 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 -c chr_m.fasta test-data/bwa_wrapper_in5.fastqcssanger > bwa_wrapper_out7a.sai
  275. 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 -c chr_m.fasta test-data/bwa_wrapper_in6.fastqcssanger > bwa_wrapper_out7b.sai
  276. bwa sampe -a 100 -o 2 -n 3 -N 10 chr_m.fasta bwa_wrapper_out7a.sai bwa_wrapper_out7b.sai test-data/bwa_wrapper_in5.fastqcssanger test-data/bwa_wrapper_in6.fastqcssanger > bwa_wrapper_out7.u.sam
  277. chr_m.fasta is the prefix of the index files (chr_m.fasta.amb, chr_m.fasta.ann, ...)
  278. plain old sort doesn't handle underscores like python:
  279. python -c "import sys; lines=file(sys.argv[1],'rb').readlines(); lines.sort(); file(sys.argv[2],'wb').write(''.join(lines))" bwa_wrapper_out7.u.sam bwa_wrapper_out7.sam
  280. -->
  281. <param name="refGenomeSource" value="history" />
  282. <param name="ownFile" value="chr_m.fasta" />
  283. <param name="sPaired" value="paired" />
  284. <param name="input1" value="bwa_wrapper_in5.fastqcssanger" ftype="fastqcssanger" />
  285. <param name="input2" value="bwa_wrapper_in6.fastqcssanger" ftype="fastqcssanger" />
  286. <param name="source_select" value="full" />
  287. <param name="maxEditDist" value="0" />
  288. <param name="fracMissingAligns" value="0.04" />
  289. <param name="maxGapOpens" value="1" />
  290. <param name="maxGapExtens" value="-1" />
  291. <param name="disallowLongDel" value="16" />
  292. <param name="disallowIndel" value="5" />
  293. <param name="seed" value="-1" />
  294. <param name="maxEditDistSeed" value="2" />
  295. <param name="mismatchPenalty" value="3" />
  296. <param name="gapOpenPenalty" value="11" />
  297. <param name="gapExtensPenalty" value="4" />
  298. <param name="suboptAlign" value="true" />
  299. <param name="noIterSearch" value="true" />
  300. <param name="outputTopN" value="3" />
  301. <param name="outputTopNDisc" value="10" />
  302. <param name="maxInsertSize" value="100" />
  303. <param name="maxOccurPairing" value="2" />
  304. <param name="specReadGroup" value="no" />
  305. <param name="suppressHeader" value="false" />
  306. <output name="output" file="bwa_wrapper_out7.sam" ftype="sam" sort="True" lines_diff="2" />
  307. </test>
  308. </tests>
  309. <help>
  310. **What it does**
  311. 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.
  312. ------
  313. **Know what you are doing**
  314. .. class:: warningmark
  315. 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.
  316. .. __: http://bio-bwa.sourceforge.net/
  317. ------
  318. **Input formats**
  319. BWA accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files, set to either FASTQ Sanger or FASTQ Color Space Sanger as appropriate.
  320. If you have Color Space Sanger, it must be converted to nucleotide-space first. To do this, use the Manipulate FASTQ tool under NGS: QC and manipulation, with the following settings:
  321. Manipulate reads on Sequence Content, choosing Change Adapter Base, and having the text box empty.
  322. Manipulate reads on Sequence Content, doing a String Translate from "01234." to "ACGTN".
  323. ------
  324. **A Note on Built-in Reference Genomes**
  325. Some genomes have multiple variants. If only one "type" of genome is listed, it is the Full version, which means that everything that came in the original genome data download (possibly with mitochondrial and plasmid DNA added if it wasn't already included). The Full version is available for every genome. Some genomes also come in the Canonical variant, which contains only the "canonical" (well-defined) chromosomes or segments, such as chr1-chr22, chrX, chrY, and chrM for human. Other variations include gender. These will come in the canonical form only, so the general Canonical variant is actually Canonical Female and the other is Canonical Male (identical to female excluding chrX).
  326. ------
  327. **Outputs**
  328. The output is in SAM format, and has the following columns::
  329. Column Description
  330. -------- --------------------------------------------------------
  331. 1 QNAME Query (pair) NAME
  332. 2 FLAG bitwise FLAG
  333. 3 RNAME Reference sequence NAME
  334. 4 POS 1-based leftmost POSition/coordinate of clipped sequence
  335. 5 MAPQ MAPping Quality (Phred-scaled)
  336. 6 CIGAR extended CIGAR string
  337. 7 MRNM Mate Reference sequence NaMe ('=' if same as RNAME)
  338. 8 MPOS 1-based Mate POSition
  339. 9 ISIZE Inferred insert SIZE
  340. 10 SEQ query SEQuence on the same strand as the reference
  341. 11 QUAL query QUALity (ASCII-33 gives the Phred base quality)
  342. 12 OPT variable OPTional fields in the format TAG:VTYPE:VALU
  343. The flags are as follows::
  344. Flag Description
  345. ------ -------------------------------------
  346. 0x0001 the read is paired in sequencing
  347. 0x0002 the read is mapped in a proper pair
  348. 0x0004 the query sequence itself is unmapped
  349. 0x0008 the mate is unmapped
  350. 0x0010 strand of the query (1 for reverse)
  351. 0x0020 strand of the mate
  352. 0x0040 the read is the first read in a pair
  353. 0x0080 the read is the second read in a pair
  354. 0x0100 the alignment is not primary
  355. It looks like this (scroll sideways to see the entire example)::
  356. QNAME FLAG RNAME POS MAPQ CIAGR MRNM MPOS ISIZE SEQ QUAL OPT
  357. HWI-EAS91_1_30788AAXX:1:1:1761:343 4 * 0 0 * * 0 0 AAAAAAANNAAAAAAAAAAAAAAAAAAAAAAAAAAACNNANNGAGTNGNNNNNNNGCTTCCCACAGNNCTGG hhhhhhh;;hhhhhhhhhhh^hOhhhhghhhfhhhgh;;h;;hhhh;h;;;;;;;hhhhhhghhhh;;Phhh
  358. HWI-EAS91_1_30788AAXX:1:1:1578:331 4 * 0 0 * * 0 0 GTATAGANNAATAAGAAAAAAAAAAATGAAGACTTTCNNANNTCTGNANNNNNNNTCTTTTTTCAGNNGTAG hhhhhhh;;hhhhhhhhhhhhhhhhhhhhhhhhhhhh;;h;;hhhh;h;;;;;;;hhhhhhhhhhh;;hhVh
  359. -------
  360. **BWA settings**
  361. All of the options have a default value. You can change any of them. All of the options in BWA have been implemented here.
  362. ------
  363. **BWA parameter list**
  364. This is an exhaustive list of BWA options:
  365. For **aln**::
  366. -n NUM Maximum edit distance if the value is INT, or the fraction of missing
  367. alignments given 2% uniform base error rate if FLOAT. In the latter
  368. case, the maximum edit distance is automatically chosen for different
  369. read lengths. [0.04]
  370. -o INT Maximum number of gap opens [1]
  371. -e INT Maximum number of gap extensions, -1 for k-difference mode
  372. (disallowing long gaps) [-1]
  373. -d INT Disallow a long deletion within INT bp towards the 3'-end [16]
  374. -i INT Disallow an indel within INT bp towards the ends [5]
  375. -l INT Take the first INT subsequence as seed. If INT is larger than the
  376. query sequence, seeding will be disabled. For long reads, this option
  377. is typically ranged from 25 to 35 for '-k 2'. [inf]
  378. -k INT Maximum edit distance in the seed [2]
  379. -t INT Number of threads (multi-threading mode) [1]
  380. -M INT Mismatch penalty. BWA will not search for suboptimal hits with a score
  381. lower than (bestScore-misMsc). [3]
  382. -O INT Gap open penalty [11]
  383. -E INT Gap extension penalty [4]
  384. -c Reverse query but not complement it, which is required for alignment
  385. in the color space.
  386. -R Proceed with suboptimal alignments even if the top hit is a repeat. By
  387. default, BWA only searches for suboptimal alignments if the top hit is
  388. unique. Using this option has no effect on accuracy for single-end
  389. reads. It is mainly designed for improving the alignment accuracy of
  390. paired-end reads. However, the pairing procedure will be slowed down,
  391. especially for very short reads (~32bp).
  392. -N Disable iterative search. All hits with no more than maxDiff
  393. differences will be found. This mode is much slower than the default.
  394. For **samse**::
  395. -n INT Maximum number of alignments to output in the XA tag for reads paired
  396. properly. If a read has more than INT hits, the XA tag will not be
  397. written. [3]
  398. -r STR Specify the read group in a format like '@RG\tID:foo\tSM:bar' [null]
  399. For **sampe**::
  400. -a INT Maximum insert size for a read pair to be considered as being mapped
  401. properly. Since version 0.4.5, this option is only used when there
  402. are not enough good alignment to infer the distribution of insert
  403. sizes. [500]
  404. -n INT Maximum number of alignments to output in the XA tag for reads paired
  405. properly. If a read has more than INT hits, the XA tag will not be
  406. written. [3]
  407. -N INT Maximum number of alignments to output in the XA tag for disconcordant
  408. read pairs (excluding singletons). If a read has more than INT hits,
  409. the XA tag will not be written. [10]
  410. -o INT Maximum occurrences of a read for pairing. A read with more
  411. occurrences will be treated as a single-end read. Reducing this
  412. parameter helps faster pairing. [100000]
  413. -r STR Specify the read group in a format like '@RG\tID:foo\tSM:bar' [null]
  414. For specifying the read group in **samse** or **sampe**, use the following::
  415. @RG Read group. Unordered multiple @RG lines are allowed.
  416. ID Read group identi?er. Each @RG line must have a unique ID. The value of
  417. ID is used in the RG tags of alignment records. Must be unique among all
  418. read groups in header section. Read group IDs may be modi?ed when
  419. merging SAM ?les in order to handle collisions.
  420. CN Name of sequencing center producing the read.
  421. DS Description.
  422. DT Date the run was produced (ISO8601 date or date/time).
  423. FO Flow order. The array of nucleotide bases that correspond to the
  424. nucleotides used for each flow of each read. Multi-base flows are encoded
  425. in IUPAC format, and non-nucleotide flows by various other characters.
  426. Format : /\*|[ACMGRSVTWYHKDBN]+/
  427. KS The array of nucleotide bases that correspond to the key sequence of each read.
  428. LB Library.
  429. PG Programs used for processing the read group.
  430. PI Predicted median insert size.
  431. PL Platform/technology used to produce the reads. Valid values : CAPILLARY,
  432. LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO.
  433. PU Platform unit (e.g. flowcell-barcode.lane for Illumina or slide for
  434. SOLiD). Unique identi?er.
  435. SM Sample. Use pool name where a pool is being sequenced.
  436. </help>
  437. </tool>