changeset 11:fed4aa48ba09 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_stats commit cd62639660bef041ba14ecff337fb98e84e75d8a
author iuc
date Mon, 20 Nov 2023 22:17:08 +0000
parents 3a0efe14891f
children 541082d03bef
files macros.xml samtools_stats.xml
diffstat 2 files changed, 32 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Wed Jun 22 07:48:55 2022 +0000
+++ b/macros.xml	Mon Nov 20 22:17:08 2023 +0000
@@ -5,7 +5,14 @@
             <yield/>
         </requirements>
     </xml>
-    <token name="@TOOL_VERSION@">1.13</token>
+    <!-- NOTE: for some tools only the version of the requirement but not the
+        tool's version is controlled by the TOOL_VERSION token 
+        (because their version is ahead of the requirement version .. 
+         please only bump the minor version in order to let the requirement
+         version catch up eventually). To find the tools check:
+        `grep "<tool" . -r | grep -v VERSION_SUFFIX | cut -d":" -f 1` -->
+    <token name="@TOOL_VERSION@">1.15.1</token>
+    <token name="@VERSION_SUFFIX@">2</token>
     <token name="@PROFILE@">20.05</token>
     <token name="@FLAGS@"><![CDATA[
         #set $flags = 0
@@ -103,7 +110,7 @@
         #end if
     ]]></token>
 
-    <xml name="optional_reference">
+    <xml name="optional_reference" token_help="" token_argument="">
         <conditional name="addref_cond">
             <param name="addref_select" type="select" label="Use a reference sequence">
                 <help>@HELP@</help>
@@ -212,37 +219,7 @@
 
     <xml name="citations">
         <citations>
-            <citation type="bibtex">
-                @misc{SAM_def,
-                title={Definition of SAM/BAM format},
-                url = {https://samtools.github.io/hts-specs/},}
-            </citation>
-            <citation type="doi">10.1093/bioinformatics/btp352</citation>
-            <citation type="doi">10.1093/bioinformatics/btr076</citation>
-            <citation type="doi">10.1093/bioinformatics/btr509</citation>
-            <citation type="bibtex">
-                @misc{Danecek_et_al,
-                Author={Danecek, P., Schiffels, S., Durbin, R.},
-                title={Multiallelic calling model in bcftools (-m)},
-                url = {http://samtools.github.io/bcftools/call-m.pdf},}
-            </citation>
-            <citation type="bibtex">
-                @misc{Durbin_VCQC,
-                Author={Durbin, R.},
-                title={Segregation based metric for variant call QC},
-                url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},}
-            </citation>
-            <citation type="bibtex">
-                @misc{Li_SamMath,
-                Author={Li, H.},
-                title={Mathematical Notes on SAMtools Algorithms},
-                url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},}
-            </citation>
-            <citation type="bibtex">
-                @misc{SamTools_github,
-                title={SAMTools GitHub page},
-                url = {https://github.com/samtools/samtools},}
-            </citation>
+            <citation type="doi">10.1093/gigascience/giab008</citation>
         </citations>
     </xml>
     <xml name="version_command">
--- a/samtools_stats.xml	Wed Jun 22 07:48:55 2022 +0000
+++ b/samtools_stats.xml	Mon Nov 20 22:17:08 2023 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_stats" name="Samtools stats" version="2.0.4" profile="@PROFILE@">
+<tool id="samtools_stats" name="Samtools stats" version="2.0.5" profile="@PROFILE@">
     <description>generate statistics for BAM dataset</description>
     <macros>
         <import>macros.xml</import>
@@ -45,7 +45,7 @@
             #if $use_ref:
                 --ref-seq "\$reffa"
             #end if
-            ## TODO currently not implemented in Galaxy
+            ## currently not implemented in Galaxy
             ## generates STR_VALUE.bamstat where STR is given by -P and VALUE is a value of the TAG given by -S
             ## needs some discover data sets action...
             ## -P, --split-prefix STR
@@ -84,7 +84,7 @@
                 <param name="coverage_step" type="integer" value="1" label="Coverage step" help="Step value for coverage" />
             </when>
         </conditional>
-        <param name="remove_dups" argument="--remove-dups" type="boolean" truevalue="--remove-dups" falsevalue="" checked="False" label="Exclude reads marked as duplicates" />
+        <param argument="--remove-dups" type="boolean" truevalue="--remove-dups" falsevalue="" checked="False" label="Exclude reads marked as duplicates" />
         <conditional name="split_output_cond">
             <param name="split_output_selector" type="select" label="Output" help="Select between one single output or separate outputs for each statistics">
                 <option value="no" selected="True">One single summary file</option>
@@ -131,16 +131,16 @@
         </conditional>
         <!-- TODO I would like to set the default values of float and int parameters as on the samtools stats help page, but then the tests don't work. Hence I leave the optional and give the defaults in the help -->
         <param name="gc_depth" argument="--GC-depth" type="float" optional="True" label="Size of GC-depth bins" help="Decreasing bin size increases memory requirement. default=2e4" />
-        <param name="insert_size" argument="--insert-size" type="integer" optional="True" label="Maximum insert size" help="default=8000" />
+        <param argument="--insert-size" type="integer" optional="True" label="Maximum insert size" help="default=8000" />
         <!-- TOOD https://github.com/samtools/samtools/issues/1489 -->    
         <param name="read_group" argument="--id" type="select" optional="true" label="Limit to a specific read group name" >
             <options>
                 <filter type="data_meta" ref="input" key="read_groups" />
             </options>
         </param>
-        <param name="read_length" argument="--read-length" type="integer" optional="true" label="Minimum read length to generate statistics for" help="No cutoff if left empty" />
-        <param name="most_inserts" argument="--most-inserts" type="float" optional="true" label="Report only the main part of inserts" help="default=0.99" />
-        <param name="trim_quality" argument="--trim-quality" type="integer" optional="true" label="BWA trim parameter" help="default=0" />
+        <param argument="--read-length" type="integer" optional="true" label="Minimum read length to generate statistics for" help="No cutoff if left empty" />
+        <param argument="--most-inserts" type="float" optional="true" label="Report only the main part of inserts" help="default=0.99" />
+        <param argument="--trim-quality" type="integer" optional="true" label="BWA trim parameter" help="default=0" />
 
         <expand macro="optional_reference" argument="--ref-seq" help="Required for GC-depth and mismatches-per-cycle calculation"/>
         <!-- unfortunately -t takes tabular and not bed like view (otherwise a macro might have simplified this) -->
@@ -153,18 +153,17 @@
     </inputs>
 
     <outputs>
-        <data name="output" format="tabular" label="${tool.name} on ${on_string}">
-            <discover_datasets directory="split" pattern="(?P&lt;designation&gt;.+)\.tab" format="tabular" visible="true" assign_primary_output="true"/>
+        <data name="output" format="tabular">
             <filter>split_output_cond['split_output_selector'] == 'no'</filter>
         </data>
-        <collection name="output_collection" type="list" label="${tool.name} on ${on_string}">
+        <collection name="output_collection" type="list" label="${tool.name} on ${on_string}: separate statistics">
             <discover_datasets directory="split" pattern="(?P&lt;designation&gt;.+)\.tab" format="tabular" visible="false"/>
             <filter>split_output_cond['split_output_selector'] == 'yes'</filter>
         </collection>
     </outputs>
     <tests>
         <!-- https://github.com/samtools/samtools/blob/9ce8c64493f7ea3fa69bc5c1ac980b1a8e3dcf1f/test/test.pl#L2402 -->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="1_map_cigar.sam" ftype="sam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="history" />
@@ -173,7 +172,7 @@
             <output name="output" file="1.stats.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/1.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/1_map_cigar.sam | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="2_equal_cigar_full_seq.sam" ftype="sam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="history" />
@@ -185,7 +184,7 @@
         <!-- test_cmd($opts,out=>'stat/3.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/3_map_cigar_equal_seq.sam | tail -n+4", exp_fix=>$efix);-->
         <!-- test_cmd($opts,out=>'stat/4.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/4_X_cigar_full_seq.sam | tail -n+4", exp_fix=>$efix);-->
         <!-- test_cmd($opts,out=>'stat/5.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/5_insert_cigar.sam | tail -n+4", exp_fix=>$efix); -->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="5_insert_cigar.sam" ftype="sam" />
             <param name="insert_size" value="0" />
             <conditional name="addref_cond">
@@ -199,7 +198,7 @@
         <!-- test_cmd($opts,out=>'stat/8.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/8_secondary.sam | tail -n+4", exp_fix=>$efix);-->
         <!-- test_cmd($opts,out=>'stat/9.stats.expected',cmd=>"$$opts{bin}/samtools stats -S RG -r $$opts{path}/stat/test.fa $$opts{path}/stat/1_map_cigar.sam | tail -n+4", exp_fix=>$efix,out_map=>{"stat/1_map_cigar.sam_s1_a_1.bamstat"=>"stat/1_map_cigar.sam_s1_a_1.expected.bamstat"},hskip=>3);-->
         <!-- test_cmd($opts,out=>'stat/10.stats.expected',cmd=>"$$opts{bin}/samtools stats -S RG -r $$opts{path}/stat/test.fa $$opts{path}/stat/10_map_cigar.sam | tail -n+4", exp_fix=>$efix,out_map=>{"stat/10_map_cigar.sam_s1_a_1.bamstat"=>"stat/10_map_cigar.sam_s1_a_1.expected.bamstat", "stat/10_map_cigar.sam_s1_b_1.bamstat"=>"stat/10_map_cigar.sam_s1_b_1.expected.bamstat"},hskip=>3);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="11_target.sam" ftype="sam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -212,7 +211,7 @@
         </test>
         <!-- test_cmd($opts,out=>'stat/11.stats.expected',cmd=>"$$opts{bin}/samtools stats -t $$opts{path}/stat/11.stats.targets $$opts{path}/stat/11_target.sam | tail -n+4", exp_fix=>$efix); -->
 
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="11_target.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -227,7 +226,7 @@
         </test>
         <!-- test_cmd($opts,out=>'stat/11.stats.expected',cmd=>"$$opts{bin}/samtools stats $$opts{path}/stat/11_target.bam ref1:10-24 ref1:30-46 ref1:39-56 | tail -n+4", exp_fix=>$efix);
 -->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="11_target.sam" ftype="sam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -240,7 +239,7 @@
             <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/11.stats.g4.expected',cmd=>"$$opts{bin}/samtools stats -g 4 -t $$opts{path}/stat/11.stats.targets $$opts{path}/stat/11_target.sam | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="11_target.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -255,7 +254,7 @@
             <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/11.stats.g4.expected',cmd=>"$$opts{bin}/samtools stats -g 4 $$opts{path}/stat/11_target.bam ref1:10-24 ref1:30-46 ref1:39-56 | tail -n+4", exp_fix=>$efix); -->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="12_overlaps.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -267,7 +266,7 @@
             <output name="output" file="12.3reads.overlap.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/12.3reads.overlap.expected',cmd=>"$$opts{bin}/samtools stats $$opts{path}/stat/12_overlaps.bam -t $$opts{path}/stat/12_3reads.bed | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="12_overlaps.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -280,7 +279,7 @@
             <output name="output" file="12.3reads.nooverlap.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/12.3reads.nooverlap.expected',cmd=>"$$opts{bin}/samtools stats $$opts{path}/stat/12_overlaps.bam -p -t $$opts{path}/stat/12_3reads.bed | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="12_overlaps.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -292,7 +291,7 @@
             <output name="output" file="12.2reads.overlap.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/12.2reads.overlap.expected',cmd=>"$$opts{bin}/samtools stats $$opts{path}/stat/12_overlaps.bam -t $$opts{path}/stat/12_2reads.bed | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="12_overlaps.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="no" />
@@ -305,7 +304,7 @@
             <output name="output" file="12.2reads.nooverlap.expected" ftype="tabular" lines_diff="4" />
         </test>
         <!-- test_cmd($opts,out=>'stat/12.2reads.nooverlap.expected',cmd=>"$$opts{bin}/samtools stats $$opts{path}/stat/12_overlaps.bam -p -t $$opts{path}/stat/12_2reads.bed | tail -n+4", exp_fix=>$efix);-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="samtools_stats_input.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="history" />
@@ -313,7 +312,7 @@
             </conditional>
             <output name="output" file="samtools_stats_out1.tab" ftype="tabular" lines_diff="4" />
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="samtools_stats_input.bam" ftype="bam" />
             <conditional name="addref_cond">
                 <param name="addref_select" value="history" />