changeset 14:5826298f6a73 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_view commit 5cb103832529f17e5c72e7f122758c13519fbe5e
author iuc
date Mon, 15 Aug 2022 09:19:43 +0000
parents 0dbf49c414ae
children 6be888be75f9
files macros.xml samtools_view.xml test-data/test_21.sam test-data/test_22.sam test-data/test_25.sam
diffstat 5 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Sun Dec 19 15:58:19 2021 +0000
+++ b/macros.xml	Mon Aug 15 09:19:43 2022 +0000
@@ -5,7 +5,7 @@
             <yield/>
         </requirements>
     </xml>
-    <token name="@TOOL_VERSION@">1.13</token>
+    <token name="@TOOL_VERSION@">1.15.1</token>
     <token name="@PROFILE@">20.05</token>
     <token name="@FLAGS@"><![CDATA[
         #set $flags = 0
@@ -103,7 +103,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>
--- a/samtools_view.xml	Sun Dec 19 15:58:19 2021 +0000
+++ b/samtools_view.xml	Mon Aug 15 09:19:43 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
+<tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
     <description>- reformat, filter, or subsample SAM, BAM or CRAM</description>
     <macros>
         <import>macros.xml</import>
@@ -154,11 +154,11 @@
                         ## not dealing with all of the reads in the indexed
                         ## file. We have to do an extra pass over the input to
                         ## count the reads to subsample.
-                        sample_fragment=`samtools view -c $std_filters infile $reg_filters | awk '{s=\$1} END {frac=s/${mode.subsample_config.subsampling_mode.target}; print(frac > 1 ? $seed+1/frac : ".0")}'` &&
+                        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")}'` &&
                     #else:
                         ## We can get the count of reads to subsample using
                         ## an inexpensive call to idxstats.
-                        sample_fragment=`samtools idxstats infile | awk '{s+=\$4+\$3} END {frac=s/${mode.subsample_config.subsampling_mode.target}; print(frac > 1 ? $seed+1/frac : ".0")}'` &&
+                        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")}'` &&
                     #end if
                 #end if
             #end if
@@ -690,7 +690,7 @@
             </conditional>
             <output name="outputsam" file="test_20.bam" ftype="bam" lines_diff="4" />
         </test>
-        <!-- 21) sampling options-->
+        <!-- 21) sampling options target < total reads -->
         <test>
             <param name="input" value="in_test_15.sam" ftype="sam" />
             <conditional name="mode">
@@ -707,9 +707,9 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <output name="outputsam" file="test_21.sam" ftype="sam" compare="diff" lines_diff="6" />
+            <output name="outputsam" file="test_21.sam" ftype="sam" compare="diff" lines_diff="10" />
         </test>
-        <!-- 22) -->
+        <!-- 22) target > total reads -->
         <test>
             <param name="input" value="in_test_15.sam" ftype="sam" />
             <conditional name="mode">
@@ -786,7 +786,7 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <output name="outputsam" file="test_25.sam" ftype="sam" compare="diff" lines_diff="6" />
+            <output name="outputsam" file="test_25.sam" ftype="sam" compare="diff" lines_diff="2" />
         </test>
         <!-- 26) -->
         <test>
--- a/test-data/test_21.sam	Sun Dec 19 15:58:19 2021 +0000
+++ b/test-data/test_21.sam	Mon Aug 15 09:19:43 2022 +0000
@@ -3,6 +3,6 @@
 @RG	ID:UNKNOWN	SM:UNKNOWN
 @PG	ID:bowtie2	PN:bowtie2	VN:2.0.0-beta5
 @PG	ID:0	CL:aaaaa/aaa/aaaaa/aaaaaa/aaaaaaaaa/aaa/iuc/package_aaaaaaaaa_x_y/aaaaaaaaaaaa/bin/aaaaaaaaaaaaaaaaa aaaaaaaaaa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.cram aa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.fa -O test	PN:samtools	VN:1.2
-SRR065390.14978392	16	CHROMOSOME_I	2	1	27M1D73M	*	0	0	CCTAGCCCTAACCCTAACCCTAACCCTAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	#############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:1	XM:i:5	XN:i:0	XO:i:1	AS:i:-18	XS:i:-18	YT:Z:UU
-SRR065390.921023	16	CHROMOSOME_I	3	12	100M	*	0	0	CTAAGCCTAAATCTAAGCCTAACCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	###############################################???88:;98768700000<>:BBA?BBAB?BBBBBBBB>B>BB::;?:00000	RG:Z:UNKNOWN	XG:i:0	XM:i:3	XN:i:0	XO:i:0	AS:i:-6	XS:i:-13	YT:Z:UU
-SRR065390.6023338	0	CHROMOSOME_I	3	1	100M	*	0	0	CTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAAGCTAC	CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC@CCDDDBCCABB=DABBA?################	RG:Z:UNKNOWN	XG:i:0	XM:i:3	XN:i:0	XO:i:0	AS:i:-6	XS:i:-6	YT:Z:UU
+@PG	ID:samtools	PN:samtools	PP:0	VN:1.15.1	CL:samtools view -@ 1 -h -f 0 -F 0 -G 0 -s 5.20000000 -o outfile infile
+SRR065390.1871511	16	CHROMOSOME_I	3	1	100M	*	0	0	CTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	<?@<@A8>0:BB@>B<=B@???@=8@B>BB@CA@DACDCBBCCCA@CCCCACCBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:0	XM:i:0	XN:i:0	XO:i:0	AS:i:0	XS:i:0	YT:Z:UU
+SRR065390.6905811	16	CHROMOSOME_I	3	1	100M	*	0	0	CTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	#######################BB@>A<BC>@@BCCB@=BACBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:0	XM:i:0	XN:i:0	XO:i:0	AS:i:0	XS:i:0	YT:Z:UU
--- a/test-data/test_22.sam	Sun Dec 19 15:58:19 2021 +0000
+++ b/test-data/test_22.sam	Mon Aug 15 09:19:43 2022 +0000
@@ -3,7 +3,7 @@
 @RG	ID:UNKNOWN	SM:UNKNOWN
 @PG	ID:bowtie2	PN:bowtie2	VN:2.0.0-beta5
 @PG	ID:0	CL:aaaaa/aaa/aaaaa/aaaaaa/aaaaaaaaa/aaa/iuc/package_aaaaaaaaa_x_y/aaaaaaaaaaaa/bin/aaaaaaaaaaaaaaaaa aaaaaaaaaa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.cram aa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.fa -O test	PN:samtools	VN:1.2
-@PG	ID:samtools	PN:samtools	PP:0	VN:1.12	CL:samtools view -@ 0 -h -s .0 -o outfile infile
+@PG	ID:samtools	PN:samtools	PP:0	VN:1.15.1	CL:samtools view -@ 1 -h -f 0 -F 0 -G 0 -s 0.00000000 -o outfile infile
 SRR065390.14978392	16	CHROMOSOME_I	2	1	27M1D73M	*	0	0	CCTAGCCCTAACCCTAACCCTAACCCTAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	#############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:1	XM:i:5	XN:i:0	XO:i:1	AS:i:-18	XS:i:-18	YT:Z:UU
 SRR065390.921023	16	CHROMOSOME_I	3	12	100M	*	0	0	CTAAGCCTAAATCTAAGCCTAACCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	###############################################???88:;98768700000<>:BBA?BBAB?BBBBBBBB>B>BB::;?:00000	RG:Z:UNKNOWN	XG:i:0	XM:i:3	XN:i:0	XO:i:0	AS:i:-6	XS:i:-13	YT:Z:UU
 SRR065390.1871511	16	CHROMOSOME_I	3	1	100M	*	0	0	CTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	<?@<@A8>0:BB@>B<=B@???@=8@B>BB@CA@DACDCBBCCCA@CCCCACCBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:0	XM:i:0	XN:i:0	XO:i:0	AS:i:0	XS:i:0	YT:Z:UU
--- a/test-data/test_25.sam	Sun Dec 19 15:58:19 2021 +0000
+++ b/test-data/test_25.sam	Mon Aug 15 09:19:43 2022 +0000
@@ -3,7 +3,7 @@
 @RG	ID:UNKNOWN	SM:UNKNOWN
 @PG	ID:bowtie2	PN:bowtie2	VN:2.0.0-beta5
 @PG	ID:0	CL:aaaaa/aaa/aaaaa/aaaaaa/aaaaaaaaa/aaa/iuc/package_aaaaaaaaa_x_y/aaaaaaaaaaaa/bin/aaaaaaaaaaaaaaaaa aaaaaaaaaa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.cram aa /aaaa/aaaaa/aaa/aaaaaaaaaaaaaaaaaaa/tools/aaaaaaaaa/test-data/test.fa -O test	PN:samtools	VN:1.2
-@PG	ID:samtools	PN:samtools	PP:0	VN:1.12	CL:samtools view -@ 0 -h -s 7.2 -o outfile infile
+@PG	ID:samtools	PN:samtools	PP:0	VN:1.15.1	CL:samtools view -@ 1 -h -f 0 -F 0 -G 0 -s 7.20000000 -o outfile infile
 SRR065390.14978392	16	CHROMOSOME_I	2	1	27M1D73M	*	0	0	CCTAGCCCTAACCCTAACCCTAACCCTAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	#############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC	RG:Z:UNKNOWN	XG:i:1	XM:i:5	XN:i:0	XO:i:1	AS:i:-18	XS:i:-18	YT:Z:UU
 SRR065390.921023	16	CHROMOSOME_I	3	12	100M	*	0	0	CTAAGCCTAAATCTAAGCCTAACCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAA	###############################################???88:;98768700000<>:BBA?BBAB?BBBBBBBB>B>BB::;?:00000	RG:Z:UNKNOWN	XG:i:0	XM:i:3	XN:i:0	XO:i:0	AS:i:-6	XS:i:-13	YT:Z:UU
 SRR065390.6023338	0	CHROMOSOME_I	3	1	100M	*	0	0	CTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAGCCTAAAGCTAC	CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC@CCDDDBCCABB=DABBA?################	RG:Z:UNKNOWN	XG:i:0	XM:i:3	XN:i:0	XO:i:0	AS:i:-6	XS:i:-6	YT:Z:UU