annotate samtools_calmd.xml @ 0:1ebb4ecdc1ef draft

Uploaded
author devteam
date Tue, 21 Apr 2015 15:13:37 -0400
parents
children 33208952b99d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
1 <tool id="samtools_calmd" name="CalMD" version="2.0">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
2 <description>recalculate MD/NM tags</description>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
3 <macros>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
4 <import>macros.xml</import>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
5 </macros>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
6 <expand macro="requirements"></expand>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
7 <expand macro="stdio"></expand>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
8 <expand macro="version_command"></expand>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
9 <command><![CDATA[
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
10 #if str( $reference_source.reference_source_selector ) == "history":
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
11 #set ref_fa = 'ref.fa'
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
12 ln -s "${reference_source.ref_fasta}" ref.fa && samtools faidx ref.fa &&
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
13 #else:
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
14 #set ref_fa = str( $reference_source.ref_fasta.fields.path )
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
15 #end if
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
16 samtools calmd
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
17 #if str($option_set.option_sets) == 'advanced':
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
18 $option_set.change_identical $option_set.modify_quality $option_set.compute_cap $option_set.extended_baq
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
19 #end if
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
20 -b "$input_bam" "$ref_fa" > "$calmd_output" ]]>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
21 </command>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
22 <inputs>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
23 <param format="bam" name="input_bam" type="data" label="BAM file to recalculate" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
24 <conditional name="reference_source">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
25 <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
26 <option value="cached">Use a built-in genome</option>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
27 <option value="history">Use a genome from the history</option>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
28 </param>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
29 <when value="cached">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
30 <param name="ref_fasta" type="select" label="Using reference genome">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
31 <options from_data_table="fasta_indexes">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
32 <filter type="data_meta" column="0" key="dbkey" ref="input_bam" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
33 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
34 </options>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
35 </param>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
36 </when>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
37 <when value="history">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
38 <param name="ref_fasta" type="data" format="fasta" label="Using reference file" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
39 </when>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
40 </conditional>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
41 <conditional name="option_set">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
42 <param name="option_sets" type="select" label="Options">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
43 <option value="default">Use defaults</option>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
44 <option value="advanced">Advanced options</option>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
45 </param>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
46 <when value="default" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
47 <when value="advanced">
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
48 <param name="change_identical" type="boolean" truevalue="-e" falsevalue="" checked="False" label="Change identical bases to '='" help="-e"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
49 <param name="modify_quality" type="boolean" truevalue="-A" falsevalue="" checked="False" label="Modify the quality string" help="-A"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
50 <param name="compute_cap" type="boolean" truevalue="-r" falsevalue="" checked="False" label="Compute BQ or cap baseQ by BAQ" help="-r"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
51 <param name="extended_baq" type="boolean" truevalue="-E" falsevalue="" checked="False" label="Extended BAQ for better sensitivity" help="-E"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
52 </when>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
53 </conditional>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
54 </inputs>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
55 <outputs>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
56 <data format="bam" name="calmd_output" label="${tool.name} on ${on_string}" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
57 </outputs>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
58 <tests>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
59 <test>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
60 <param name="option_sets" value="default" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
61 <param name="input_bam" value="phiX.bam"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
62 <param name="reference_source_selector" value="history" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
63 <param name="ref_fasta" value="phiX.fasta" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
64 <output name="calmd_output" file="samtools_calmd_out_1.bam" ftype="bam" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
65 </test>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
66 <test>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
67 <param name="option_sets" value="advanced" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
68 <param name="change_identical" value="true" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
69 <param name="extended_baq" value="true" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
70 <param name="input_bam" value="phiX.bam"/>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
71 <param name="reference_source_selector" value="history" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
72 <param name="ref_fasta" value="phiX.fasta" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
73 <output name="calmd_output" file="samtools_calmd_out_2.bam" ftype="bam" />
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
74 </test>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
75 </tests>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
76 <help>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
77 **What it does**
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
78
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
79 Generates the MD tag using ``samtools calmd`` command. If the MD tag (see SAM format refernce below for explanation of SAM/BAM tags) is already present, this command will give a warning if the MD tag generated is different from the existing tag. Outputs a BAM file. The command has the following options::
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
80
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
81 -e change identical bases to '='
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
82 -A modify the quality string
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
83 -r compute the BQ tag (without -A) or cap baseQ by BAQ (with -A)
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
84 -E extended BAQ for better sensitivity but lower specificity
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
85
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
86 -----
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
87
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
88 **NM and MD tags**
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
89
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
90 From SAM format specification::
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
91
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
92 MD (string) String for mismatching positions. Regex : [0-9]+(([A-Z]|\^[A-Z]+)[0-9]+)*7
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
93 NM (indeger) Edit distance to the reference, including ambiguous bases but excluding clipping
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
94
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
95 See refernces for more information about SAM format tags.
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
96
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
97 </help>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
98 <expand macro="citations"></expand>
1ebb4ecdc1ef Uploaded
devteam
parents:
diff changeset
99 </tool>