changeset 13:c03b52838177 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tool_collections/samtools/samtools_stats commit 26763d398d563ccafd2d66ab325f50f5708b5ebc
author iuc
date Fri, 06 Mar 2026 10:39:57 +0000
parents 8fecc86e574a
children
files macros.xml samtools_stats.xml test-data/fasta_indexes.loc test-data/test.fa.fai tool_data_table_conf.xml.test
diffstat 5 files changed, 43 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Sun Sep 08 03:23:56 2024 +0000
+++ b/macros.xml	Fri Mar 06 10:39:57 2026 +0000
@@ -11,9 +11,9 @@
          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.20</token>
-    <token name="@VERSION_SUFFIX@">2</token>
-    <token name="@PROFILE@">22.05</token>
+    <token name="@TOOL_VERSION@">1.22</token>
+    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@PROFILE@">24.0</token>
     <token name="@FLAGS@"><![CDATA[
         #set $flags = 0
         #if $filter
@@ -167,6 +167,18 @@
     <xml name="seed_input">
        <param name="seed" type="integer" optional="True" label="Seed for random number generator" help="If empty a random seed is used." />
     </xml>
+
+    <!-- Include/exclude by flags + flag options -->
+    <xml name="inclusive_filter_macro" token_argument="">
+        <param name="inclusive_filter" argument="@ARGUMENT@" type="select" multiple="True" label="Require that these flags are set">
+            <expand macro="flag_options" />
+        </param>
+    </xml>
+    <xml name="exclusive_filter_macro" token_argument="">
+        <param name="exclusive_filter" argument="@ARGUMENT@" type="select" multiple="True" label="Exclude reads with any of the following flags set">
+            <expand macro="flag_options" />
+        </param>
+    </xml>
     <xml name="flag_options" token_s1="false" token_s2="false" token_s4="false" token_s8="false" token_s16="false" token_s32="false" token_s64="false" token_s128="false" token_s256="false" token_s512="false" token_s1024="false" token_s2048="false">
         <option value="1" selected="@S1@">Read is paired</option>
         <option value="2" selected="@S2@">Read is mapped in a proper pair</option>
@@ -220,6 +232,7 @@
     <xml name="citations">
         <citations>
             <citation type="doi">10.1093/gigascience/giab008</citation>
+            <citation type="doi">10.1093/bioinformatics/btr076</citation>
         </citations>
     </xml>
     <xml name="version_command">
--- a/samtools_stats.xml	Sun Sep 08 03:23:56 2024 +0000
+++ b/samtools_stats.xml	Fri Mar 06 10:39:57 2026 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_stats" name="Samtools stats" version="2.0.5" profile="@PROFILE@">
+<tool id="samtools_stats" name="Samtools stats" version="2.0.9" profile="@PROFILE@">
     <description>generate statistics for BAM dataset</description>
     <macros>
         <import>macros.xml</import>
@@ -169,16 +169,16 @@
                 <param name="addref_select" value="history" />
                 <param name="ref" value="test.fa" ftype="fasta" />
             </conditional>
-            <output name="output" file="1.stats.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="1.stats.expected" ftype="tabular" lines_diff="8" />
         </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 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" />
-                <param name="ref" value="test.fa" ftype="fasta" />
+                <param name="addref_select" value="cached" />
+                <param name="ref" value="test" />
             </conditional>
-            <output name="output" file="2.stats.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="2.stats.expected" ftype="tabular" lines_diff="8" />
         </test>
         <!-- test_cmd($opts,out=>'stat/2.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/2_equal_cigar_full_seq.sam | tail -n+4", exp_fix=>$efix);-->
         <!-- 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);-->
@@ -191,7 +191,7 @@
                 <param name="addref_select" value="history" />
                 <param name="ref" value="test.fa" ftype="fasta" />
             </conditional>
-            <output name="output" file="6.stats.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="6.stats.expected" ftype="tabular" lines_diff="8" />
         </test>
         <!-- test_cmd($opts,out=>'stat/6.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa -i 0 $$opts{path}/stat/5_insert_cigar.sam | tail -n+4", exp_fix=>$efix); -->
         <!-- test_cmd($opts,out=>'stat/7.stats.expected',cmd=>"$$opts{bin}/samtools stats -r $$opts{path}/stat/test.fa $$opts{path}/stat/7_supp.sam | tail -n+4", exp_fix=>$efix); -->
@@ -207,7 +207,7 @@
                 <param name="select_region" value="tab"/>
                 <param name="targetregions" value="11.stats.targets" ftype="tabular" />
             </conditional>
-            <output name="output" file="11.stats.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="11.stats.expected" ftype="tabular" lines_diff="8" />
         </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); -->
 
@@ -222,7 +222,7 @@
                 <param name="regions_repeat_1|region" value="ref1:30-46"/>
                 <param name="regions_repeat_2|region" value="ref1:39-56"/>
             </conditional>
-            <output name="output" file="11.stats.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="11.stats.expected" ftype="tabular" lines_diff="8" />
         </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);
 -->
@@ -236,7 +236,7 @@
                 <param name="targetregions" value="11.stats.targets" ftype="tabular" />
             </conditional>
             <param name="cov_threshold" value="4" />
-            <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -251,7 +251,7 @@
                 <param name="regions_repeat_2|region" value="ref1:39-56"/>
             </conditional>
             <param name="cov_threshold" value="4" />
-            <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="11.stats.g4.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -263,7 +263,7 @@
                 <param name="select_region" value="tab"/>
                 <param name="targetregions" value="12_3reads.bed" ftype="tabular" />
             </conditional>
-            <output name="output" file="12.3reads.overlap.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="12.3reads.overlap.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -275,8 +275,8 @@
                 <param name="select_region" value="tab"/>
                 <param name="targetregions" value="12_3reads.bed" ftype="tabular" />
             </conditional>
-            <param name="remove_overlaps" value="-p"/>
-            <output name="output" file="12.3reads.nooverlap.expected" ftype="tabular" lines_diff="4" />
+            <param name="remove_overlaps" value="true"/>
+            <output name="output" file="12.3reads.nooverlap.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -288,7 +288,7 @@
                 <param name="select_region" value="tab"/>
                 <param name="targetregions" value="12_2reads.bed" ftype="tabular" />
             </conditional>
-            <output name="output" file="12.2reads.overlap.expected" ftype="tabular" lines_diff="4" />
+            <output name="output" file="12.2reads.overlap.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -300,8 +300,8 @@
                 <param name="select_region" value="tab"/>
                 <param name="targetregions" value="12_2reads.bed" ftype="tabular" />
             </conditional>
-            <param name="remove_overlaps" value="-p"/>
-            <output name="output" file="12.2reads.nooverlap.expected" ftype="tabular" lines_diff="4" />
+            <param name="remove_overlaps" value="true"/>
+            <output name="output" file="12.2reads.nooverlap.expected" ftype="tabular" lines_diff="8" />
         </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 expect_num_outputs="1">
@@ -310,7 +310,7 @@
                 <param name="addref_select" value="history" />
                 <param name="ref" value="samtools_stats_ref.fa" ftype="fasta" />
             </conditional>
-            <output name="output" file="samtools_stats_out1.tab" ftype="tabular" lines_diff="4" />
+            <output name="output" file="samtools_stats_out1.tab" ftype="tabular" lines_diff="8" />
         </test>
         <test expect_num_outputs="1">
             <param name="input" value="samtools_stats_input.bam" ftype="bam" />
@@ -325,7 +325,7 @@
             <output_collection name="output_collection" type="list">
                 <element name="ACGT content per cycle" ftype="tabular" file="samtools_stats_out1__gcc.tab"/>
                 <element name="Mismatches per cycle and quality" ftype="tabular" file="samtools_stats_out1__mpc.tab" />
-                <element name="Summary Numbers" ftype="tabular" file="samtools_stats_out1__sn.tab" />
+                <element name="Summary Numbers" ftype="tabular" file="samtools_stats_out1__sn.tab" lines_diff="2" />
             </output_collection>
         </test>
         <!-- test filtering by read group -->
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fasta_indexes.loc	Fri Mar 06 10:39:57 2026 +0000
@@ -0,0 +1,1 @@
+test	hg38	test_name	${__HERE__}/test.fa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test.fa.fai	Fri Mar 06 10:39:57 2026 +0000
@@ -0,0 +1,1 @@
+alpha	100	7	60	61
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Fri Mar 06 10:39:57 2026 +0000
@@ -0,0 +1,7 @@
+<!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc-->
+<tables>
+    <table name="fasta_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="${__HERE__}/test-data/fasta_indexes.loc" />
+    </table>
+</tables>