comparison samtools_markdup.xml @ 1:83b8e36e9cbe draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_markdup commit 91b28adf44f425970469cc52fc5c13e75409ed27"
author iuc
date Fri, 06 Sep 2019 06:35:26 -0400
parents 046cbf29795a
children a312a0fdaf31
comparison
equal deleted inserted replaced
0:046cbf29795a 1:83b8e36e9cbe
1 <tool id="samtools_markdup" name="Samtools markdup" version="@TOOL_VERSION@"> 1 <tool id="samtools_markdup" name="Samtools markdup" version="@TOOL_VERSION@+galaxy2">
2 <description>marks duplicate alignments</description> 2 <description>marks duplicate alignments</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
9 <command><![CDATA[ 9 <command><![CDATA[
10 @ADDTHREADS@ 10 @ADDTHREADS@
11 ## coordinate sort input 11 ## coordinate sort input
12 #if not $bamfile.is_of_type('bam'): 12 #if not $bamfile.is_of_type('bam'):
13 samtools sort 13 samtools sort
14 -@ \$addthreads -m \${GALAXY_MEMORY_MB:-768}M -T sorttemp 14 -@ \$addthreads -m \${GALAXY_MEMORY_MB:-768}M -T "\${TMPDIR:-.}"
15 -O sam 15 -O sam
16 -o coordsort.sam 16 -o coordsort.sam
17 '$bamfile' && 17 '$bamfile' &&
18 #else: 18 #else:
19 ln -s '$bamfile' coordsort.sam && 19 ln -s '$bamfile' coordsort.sam &&
28 $remove 28 $remove
29 $stats 29 $stats
30 $supp 30 $supp
31 coordsort.sam 31 coordsort.sam
32 '$output' 32 '$output'
33 #if $stats
34 2> '$stats_output'
35 #end if
33 ]]></command> 36 ]]></command>
34 <inputs> 37 <inputs>
35 <param name="bamfile" type="data" format="sam,bam,cram" optional="false" label="Alignment" /> 38 <param name="bamfile" type="data" format="sam,bam,cram" optional="false" label="Alignment" />
36 <param name="remove" type="boolean" argument="-r" truevalue="-r" falsevalue="" label="Remove duplicate reads" /> 39 <param name="remove" type="boolean" argument="-r" truevalue="-r" falsevalue="" label="Remove duplicate reads" />
37 <param name="maxlen" type="integer" optional="true" argument="-l" min="0" label="Expected maximum read length of INT bases. (default 300)"/> 40 <param name="maxlen" type="integer" optional="true" argument="-l" min="0" label="Expected maximum read length of INT bases. (default 300)"/>
38 <param name="stats" type="boolean" argument="-s" truevalue="-s" falsevalue="" label="Print basic statistics" /> 41 <param name="stats" type="boolean" argument="-s" truevalue="-s" falsevalue="" label="Print basic statistics" />
39 <param name="supp" type="boolean" argument="-S" truevalue="-S" falsevalue="" label="Mark supplementary reads of duplicates as duplicates" /> 42 <param name="supp" type="boolean" argument="-S" truevalue="-S" falsevalue="" label="Mark supplementary reads of duplicates as duplicates" />
40 </inputs> 43 </inputs>
41 <outputs> 44 <outputs>
42 <!-- output bam, if input was name sorted then restore this sorting order --> 45 <!-- output bam, if input was name sorted then restore this sorting order -->
43 <data name="output" format="bam"/> 46 <data name="output" format="bam"/>
47 <data name="stats_output" format="txt">
48 <filter>stats</filter>
49 </data>
44 </outputs> 50 </outputs>
45 <tests> 51 <tests>
46 <!-- tests and data extracted from 52 <!-- tests and data extracted from
47 https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2616 53 https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2616
48 TODO the 1st 4 tests are negative, I do not know how to test for the error code 54 TODO the 1st 4 tests are negative, I do not know how to test for the error code
49 --> 55 -->
50 <!-- test_cmd($opts, out=>'markdup/1_name_sort.expected.sam', err=>'1_name_sort.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/1_name_sort.sam -", expect_fail=>1); 56 <!-- test_cmd($opts, out=>'markdup/1_name_sort.expected.sam', err=>'1_name_sort.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/1_name_sort.sam -", expect_fail=>1);
51 test_cmd($opts, out=>'markdup/2_bad_order.expected.sam', err=>'2_bad_order.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/2_bad_order.sam -", expect_fail=>1); 57 test_cmd($opts, out=>'markdup/2_bad_order.expected.sam', err=>'2_bad_order.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/2_bad_order.sam -", expect_fail=>1);
52 test_cmd($opts, out=>'markdup/3_missing_mc.expected.sam', err=>'3_missing_mc.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/3_missing_mc.sam -", expect_fail=>1); 58 test_cmd($opts, out=>'markdup/3_missing_mc.expected.sam', err=>'3_missing_mc.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/3_missing_mc.sam -", expect_fail=>1);
53 test_cmd($opts, out=>'markdup/4_missing_ms.expected.sam', err=>'4_missing_ms.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/4_missing_ms.sam -", expect_fail=>1);--> 59 test_cmd($opts, out=>'markdup/4_missing_ms.expected.sam', err=>'4_missing_ms.expected.sam.err', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/4_missing_ms.sam -", expect_fail=>1);-->
54 <test> 60 <!-- test_cmd($opts, out=>'markdup/5_markdup.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/5_markdup.sam -");-->
61 <test expect_num_outputs="1">
55 <param name="bamfile" value="5_markdup.sam" /> 62 <param name="bamfile" value="5_markdup.sam" />
56 <output name="output" file="5_markdup.expected.bam" /> 63 <output name="output" file="5_markdup.expected.bam" />
57 </test> 64 </test>
58 <!-- test_cmd($opts, out=>'markdup/5_markdup.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam $$opts{path}/markdup/5_markdup.sam -");--> 65 <!-- test_cmd($opts, out=>'markdup/6_remove_dups.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam -r $$opts{path}/markdup/6_remove_dups.sam -");-->
59 <test> 66 <test expect_num_outputs="1">
60 <param name="bamfile" value="6_remove_dups.sam" /> 67 <param name="bamfile" value="6_remove_dups.sam" />
61 <param name="remove" value="-r" /> 68 <param name="remove" value="-r" />
62 <output name="output" file="6_remove_dups.expected.bam" /> 69 <output name="output" file="6_remove_dups.expected.bam" />
63 </test> 70 </test>
64 <!-- test_cmd($opts, out=>'markdup/6_remove_dups.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -O sam -r $$opts{path}/markdup/6_remove_dups.sam -");--> 71 <!-- test_cmd($opts, out=>'markdup/7_mark_supp_dup.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -S -O sam $$opts{path}/markdup/7_mark_supp_dup.sam -");-->
65 <test> 72 <test expect_num_outputs="1">
66 <param name="bamfile" value="7_mark_supp_dup.bam" /> 73 <param name="bamfile" value="7_mark_supp_dup.bam" />
67 <param name="supp" value="-S" /> 74 <param name="supp" value="-S" />
68 <output name="output" file="7_mark_supp_dup.expected.bam" /> 75 <output name="output" file="7_mark_supp_dup.expected.bam" />
69 </test> 76 </test>
70 <!-- 77 <!-- test stats output -->
71 test_cmd($opts, out=>'markdup/7_mark_supp_dup.expected.sam', cmd=>"$$opts{bin}/samtools markdup${threads} -S -O sam $$opts{path}/markdup/7_mark_supp_dup.sam -");--> 78 <test expect_num_outputs="2">
79 <param name="bamfile" value="5_markdup.sam" />
80 <param name="stats" value="-s" />
81 <output name="output" file="5_markdup.expected.bam" />
82 <output name="stats_output" file="stats.txt" />
83 </test>
72 </tests> 84 </tests>
73 <help> 85 <help>
74 Mark duplicate alignments from a coordinate sorted file that has been run through fixmate with the -m option. This program relies on the MC and ms tags that fixmate provides. 86 Mark duplicate alignments from a coordinate sorted file that has been run through fixmate with the -m option. This program relies on the MC and ms tags that fixmate provides.
75 87
76 Note: The Galaxy tool sorts the data automatically if the input is SAM or query name sorted. 88 Note: The Galaxy tool sorts the data automatically if the input is SAM or query name sorted.
77 The output is BAM (which is query name sorted again if the input is). 89 The output is BAM (which is query name sorted again if the input is).
78 </help> 90
91 The optional basic statistics output of samtools markdup can be visualized with MultiQC.
92
93 </help>
79 <expand macro="citations"/> 94 <expand macro="citations"/>
80 </tool> 95 </tool>