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