diff samtools_fastx.xml @ 2:720217c23995 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_fastx commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:13:01 +0000
parents a8d69aee190e
children b3d99709fe1a
line wrap: on
line diff
--- a/samtools_fastx.xml	Fri Sep 28 04:39:19 2018 -0400
+++ b/samtools_fastx.xml	Tue Sep 28 16:13:01 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@+galaxy1">
+<tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@" profile="@PROFILE@">
     <description>extract FASTA or FASTQ from alignment files</description>
     <macros>
         <import>macros.xml</import>
@@ -7,10 +7,10 @@
     <expand macro="stdio"/>
     <expand macro="version_command" />
     <command><![CDATA[
-@ADDTHREADS@ 
+@ADDTHREADS@
 ## name sort input file if neccessary
 #if not $input.is_of_type('qname_sorted.bam', 'qname_input_sorted.bam'):
-    samtools sort -@ \$addthreads -n '$input' > input &&
+    samtools sort -@ \$addthreads -n '$input' -T "\${TMPDIR:-.}" > input &&
 #else:
     ln -s '$input' input &&
 #end if
@@ -39,21 +39,15 @@
 #if 'r2' in str($outputs):
     -2 reverse.$output_fmt_cond.output_fmt_select
 #end if
-#if str($inclusive_filter) != 'None':
-    #set $filter = $inclusive_filter
-    @FLAGS@
-    -f $flags
-#end if
-#if str($exclusive_filter) != 'None':
-    #set $filter = $exclusive_filter
-    @FLAGS@
-    -F $flags
-#end if
-#if str($exclusive_filter) != 'None':
-    #set $filter = $exclusive_filter_all
-    @FLAGS@
-    -G $flags
-#end if
+#set $filter = $inclusive_filter
+@FLAGS@
+-f $flags
+#set $filter = $exclusive_filter
+@FLAGS@
+-F $flags
+#set $filter = $exclusive_filter_all
+@FLAGS@
+-G $flags
 #if 's' in str($outputs):
     -s singletons.$output_fmt_cond.output_fmt_select
 #end if
@@ -75,12 +69,12 @@
     #end if
 #end if
 
-input 
+input
 
 #if str($outputs)=='None' or 'other' in str($outputs):
     ## since currently stdout in not zipped (samtools doesn't know about the extension)
     #if str($output_fmt_cond.output_fmt_select).endswith('.gz'):
-        | gzip - 
+        | gzip -
     #end if
     > output.$output_fmt_cond.output_fmt_select
     && ln -s output.$output_fmt_cond.output_fmt_select output
@@ -148,10 +142,10 @@
             <option value="-N">always append /1 and /2 to read name</option>
         </param>
         <param name="inclusive_filter" argument="-f" type="select" multiple="True" label="Require that these flags are set">
-            <expand macro="flag_options" />
+            <expand macro="flag_options"/>
         </param>
         <param name="exclusive_filter" argument="-F" type="select" multiple="True" label="Exclude reads with any of the following flags set">
-            <expand macro="flag_options" />
+            <expand macro="flag_options" s256="true" s2048="true"/>
         </param>
         <param name="exclusive_filter_all" argument="-G" type="select" multiple="True" label="Exclude reads with all of the following flags set">
             <expand macro="flag_options" />
@@ -270,8 +264,8 @@
             <output name="forward" file="samtools_fastx-out3-2.fasta" ftype="fasta" />
             <output name="reverse" file="samtools_fastx-out3-3.fasta" ftype="fasta" />
         </test>
-        <!-- tests from original Galaxy tool with gz output. for some reason gzip (which is used 
-             for compressing stdout does not give exactly the same file contents .. the other 
+        <!-- tests from original Galaxy tool with gz output. for some reason gzip (which is used
+             for compressing stdout does not give exactly the same file contents .. the other
              compressed files seem to)-->
         <test>
             <param name="input" value="samtools_fastx-in1.bam" ftype="bam" />
@@ -279,7 +273,7 @@
                 <param name="output_fmt_select" value="fasta.gz" />
             </conditional>
             <param name="outputs" value="other" />
-            <output name="output" file="samtools_fastx-out1.fasta.gz" ftype="fasta.gz"  compare="sim_size" />
+            <output name="output" file="samtools_fastx-out1.fasta.gz" ftype="fasta.gz" decompress="true"/>
         </test>
         <test>
             <param name="input" value="samtools_fastx-in2.bam" ftype="bam" />
@@ -287,9 +281,9 @@
                 <param name="output_fmt_select" value="fastqsanger.gz" />
             </conditional>
             <param name="outputs" value="r0,r1,r2" />
-            <output name="nonspecific" file="samtools_fastx-out2-1.fastq.gz" ftype="fastqsanger.gz" />
-            <output name="forward" file="samtools_fastx-out2-2.fastq.gz" ftype="fastqsanger.gz" />
-            <output name="reverse" file="samtools_fastx-out2-3.fastq.gz" ftype="fastqsanger.gz" />
+            <output name="nonspecific" file="samtools_fastx-out2-1.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
+            <output name="forward" file="samtools_fastx-out2-2.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
+            <output name="reverse" file="samtools_fastx-out2-3.fastq.gz" ftype="fastqsanger.gz" decompress="true" />
         </test>
         <test>
             <param name="input" value="samtools_fastx-in3.sam" ftype="sam" />
@@ -297,9 +291,9 @@
                 <param name="output_fmt_select" value="fasta.gz" />
             </conditional>
             <param name="outputs" value="r0,r1,r2" />
-            <output name="nonspecific" file="samtools_fastx-out3-1.fasta.gz" ftype="fasta.gz" />
-            <output name="forward" file="samtools_fastx-out3-2.fasta.gz" ftype="fasta.gz" />
-            <output name="reverse" file="samtools_fastx-out3-3.fasta.gz" ftype="fasta.gz" />
+            <output name="nonspecific" file="samtools_fastx-out3-1.fasta.gz" ftype="fasta.gz" decompress="true" />
+            <output name="forward" file="samtools_fastx-out3-2.fasta.gz" ftype="fasta.gz" decompress="true" />
+            <output name="reverse" file="samtools_fastx-out3-3.fasta.gz" ftype="fasta.gz" decompress="true" />
         </test>
         <!-- tests from: https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2313-->
         <!--# basic 2 output test without singleton tracking-->
@@ -476,12 +470,16 @@
                 <param name="ilumina_casava" value="-i" />
             </conditional>
             <param name="outputs" value="r1,r2,s,other" />
+            <conditional name="idxout_cond">
+                <param name="idxout_select" value="yes"/>
+                <param name="index_format" value="n2i2"/>
+            </conditional>
             <param name="copy_tags" value="-t" />
             <param name="copy_arb_tags" value="MD,ia" />
             <param name="read_numbering" value="-N"/>
-            <output name="forward" file="7.1.fq.expected" ftype="fastqsanger" />
-            <output name="reverse" file="7.2.fq.expected" ftype="fastqsanger" />
-            <output name="singletons" file="7.s.fq.expected" ftype="fastqsanger" />
+            <output name="forward" file="11.1.fq.expected" ftype="fastqsanger" />
+            <output name="reverse" file="11.2.fq.expected" ftype="fastqsanger" />
+            <output name="singletons" file="11.s.fq.expected" ftype="fastqsanger" />
             <output name="output"  file="2.stdout.expected" ftype="fastqsanger" />
         </test>
         <!--# -i flag with index-->