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