Repository 'samtools_view'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/samtools_view

Changeset 15:6be888be75f9 (2023-11-20)
Previous changeset 14:5826298f6a73 (2022-08-15) Next changeset 16:2dce91e11ca7 (2024-08-30)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_view commit cd62639660bef041ba14ecff337fb98e84e75d8a
modified:
macros.xml
samtools_view.xml
b
diff -r 5826298f6a73 -r 6be888be75f9 macros.xml
--- a/macros.xml Mon Aug 15 09:19:43 2022 +0000
+++ b/macros.xml Mon Nov 20 22:17:43 2023 +0000
[
@@ -5,7 +5,14 @@
             <yield/>
         </requirements>
     </xml>
+    <!-- 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
@@ -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">
b
diff -r 5826298f6a73 -r 6be888be75f9 samtools_view.xml
--- a/samtools_view.xml Mon Aug 15 09:19:43 2022 +0000
+++ b/samtools_view.xml Mon Nov 20 22:17:43 2023 +0000
b
b'@@ -1,4 +1,4 @@\n-<tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">\n+<tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n     <description>- reformat, filter, or subsample SAM, BAM or CRAM</description>\n     <macros>\n         <import>macros.xml</import>\n@@ -154,11 +154,11 @@\n                         ## not dealing with all of the reads in the indexed\n                         ## file. We have to do an extra pass over the input to\n                         ## count the reads to subsample.\n-                        sample_fragment=`samtools view -c $std_filters infile $reg_filters | awk \'{s=\\$1} END {frac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\\n", frac > 1 ? $seed+1/frac : ".0")}\'` &&\n+                        sample_fragment=`samtools view -c $std_filters infile $reg_filters | awk \'{s=\\$1} END {fac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\\n", fac > 1 ? 1/fac : 1)}\'` &&\n                     #else:\n                         ## We can get the count of reads to subsample using\n                         ## an inexpensive call to idxstats.\n-                        sample_fragment=`samtools idxstats infile | awk \'{s+=\\$4+\\$3} END {frac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\\n", frac > 1 ? $seed+1/frac : ".0")}\'` &&\n+                        sample_fragment=`samtools idxstats infile | awk \'{s+=\\$4+\\$3} END {fac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\\n", fac > 1 ? 1/fac : 1)}\'` &&\n                     #end if\n                 #end if\n             #end if\n@@ -172,12 +172,13 @@\n             $std_filters\n \n             #if $with_subsampling:\n+                --subsample-seed $seed\n                 #if str($mode.subsample_config.subsampling_mode.select_subsample) == "target":\n                     ##this is calculated at execution time before the main samtools command\n-                    -s \\${sample_fragment}\n+                    --subsample \\${sample_fragment}\n                 #else:\n-                    #set $fraction = $seed + 1 / float($mode.subsample_config.subsampling_mode.factor)\n-                    -s $fraction\n+                    #set $fraction = 1 / float($mode.subsample_config.subsampling_mode.factor)\n+                    --subsample $fraction\n                 #end if\n             #end if\n \n@@ -398,13 +399,13 @@\n         </data>\n     </outputs>\n     <tests>\n-<!-- 1) sam to bam (copied from the sam_to_bam tool) -->\n-        <test>\n+        <!-- 1) sam to bam (copied from the sam_to_bam tool) -->\n+        <test expect_num_outputs="1">\n             <param name="input" ftype="sam" value="in_test_1.sam" />\n             <output name="outputsam" ftype="bam" file="test_1.bam" lines_diff="4" />\n         </test>\n         <!-- 2) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" ftype="sam" dbkey="equCab2" value="in_test_1.sam" />\n             <conditional name="addref_cond">\n                 <param name="addref_select" value="cached" />\n@@ -413,7 +414,7 @@\n             <output name="outputsam" ftype="bam" file="test_2.bam" lines_diff="4" />\n         </test>\n         <!-- 3) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" ftype="sam" value="in_test_3.sam" />\n             <conditional name="addref_cond">\n                 <param name="addref_select" value="history" />\n@@ -422,7 +423,7 @@\n             <output name="outputsam" ftype="bam" file="test_3.bam" lines_diff="4" />\n         </test>\n         <!-- 4) cram to bam -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_4.cram" ftype="cram" />\n             <conditional name="addref_cond">\n                 <param name="addref_select" value="history" />\n@@ -431,7 +432,7 @@\n             <output name="outputsam" file="test_4.bam" ftype="bam" lines_diff='..b' name="input" value="in_test_15.sam" ftype="sam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -710,7 +711,7 @@\n             <output name="outputsam" file="test_21.sam" ftype="sam" compare="diff" lines_diff="10" />\n         </test>\n         <!-- 22) target > total reads -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_15.sam" ftype="sam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -729,7 +730,7 @@\n             <output name="outputsam" file="test_22.sam" ftype="sam" lines_diff="2"/>\n         </test>\n         <!-- 23) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <!-- subsampling SAM input without reads -->\n             <param name="input" value="in_test_23.sam" ftype="sam" />\n             <conditional name="mode">\n@@ -749,7 +750,7 @@\n             <output name="outputsam" file="test_23.sam" ftype="sam" lines_diff="2"/>\n         </test>\n         <!-- 24) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <!-- subsampling BAM input without reads -->\n             <param name="input" value="in_test_24.bam" ftype="bam" />\n             <conditional name="mode">\n@@ -769,7 +770,7 @@\n             <output name="outputsam" file="test_24.bam" ftype="bam" lines_diff="2" />\n         </test>\n         <!-- 25) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_15.sam" ftype="sam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -789,7 +790,7 @@\n             <output name="outputsam" file="test_25.sam" ftype="sam" compare="diff" lines_diff="2" />\n         </test>\n         <!-- 26) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_14.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -809,7 +810,7 @@\n             <output name="outputsam" file="test_26.bam" ftype="bam" lines_diff="2" />\n         </test>\n         <!-- 27) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_14.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -829,7 +830,7 @@\n             <output name="outputsam" file="test_27.bam" ftype="bam" lines_diff="2"/>\n         </test>\n         <!-- 28) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_14.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -849,7 +850,7 @@\n             <output name="outputsam" file="test_28.bam" ftype="bam" lines_diff="2" />\n         </test>\n         <!-- 29) -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_14.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -870,7 +871,7 @@\n             <output name="outputsam" file="test_29.bam" ftype="bam" lines_diff="2"/>\n         </test>\n         <!-- 30) testing tag filtering -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_30.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n@@ -889,7 +890,7 @@\n             <output name="outputsam" file="test_30.bam" ftype="bam" lines_diff="2" />\n         </test>\n         <!-- 31) testing readname filtering -->\n-        <test>\n+        <test expect_num_outputs="1">\n             <param name="input" value="in_test_30.bam" ftype="bam" />\n             <conditional name="mode">\n                 <param name="outtype" value="selected_reads" />\n'