changeset 6:288f7f69fe25 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqtk commit 50a0bd6d783a69e7303363a31130134767493e66"
author iuc
date Fri, 06 Sep 2019 09:10:07 -0400
parents a09586d5149a
children 58c8ece95b53
files seqtk_sample.xml test-data/seqtk_sample.lowmem.gz
diffstat 2 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/seqtk_sample.xml	Fri Jan 11 05:15:20 2019 -0500
+++ b/seqtk_sample.xml	Fri Sep 06 09:10:07 2019 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="seqtk_sample" name="seqtk_sample" version="@TOOL_VERSION@.1">
+<tool id="seqtk_sample" name="seqtk_sample" version="@TOOL_VERSION@.2">
     <description>random subsample of fasta or fastq sequences</description>
     <macros>
         <import>macros.xml</import>
@@ -9,14 +9,18 @@
     <command><![CDATA[
 seqtk sample
 -s $s
+$advanced.single_pass_mode
 '$in_file'
 $subsample_size
 @CONDITIONAL_GZIP_OUT@
     ]]></command>
     <inputs>
         <expand macro="in_faq" />
-        <param argument="-s" type="integer" value="4" label="RNG seed" help="The seed used for the random number generator. Manually specifying a number here is useful for reproducing the same subsampling over time" />
-        <param name="subsample_size" type="float" value="100" label="Subsample (decimal fraction or number)" />
+        <param argument="-s" type="integer" value="4" label="RNG seed" help="The seed used for the random number generator. Manually specifying a number here is useful for reproducing the same subsampling in different runs (e.g. read 1 and read 2)" />
+        <param name="subsample_size" type="float" value="100" label="Subsample (decimal fraction or number)" help="Use an integer > 1 to select a specific number of reads. Use a decimal (e.g. 0.5) to select a fraction of reads"/>
+        <section name="advanced" title="Advanced options" expanded="false">
+            <param name="single_pass_mode" type="boolean" truevalue="" falsevalue="-2" checked="false" label="Enable 1-pass mode" help="Use this if the number of reads you want to sample is small enough to fit into memory. If you're not sure, don't use this."/>
+        </section>
     </inputs>
     <outputs>
         <data name="default" format_source="in_file" label="Subsample of reads from $in_file.name"/>
@@ -26,14 +30,23 @@
             <param name="in_file" value="seqtk_sample.fa"/>
             <param name="subsample_size" value="4"/>
             <param name="s" value="4"/>
+            <param name="advanced|single_pass_mode" value="True"/>
             <output name="default" file="seqtk_sample.out" ftype="fasta"/>
         </test>
         <test>
             <param name="in_file" value="seqtk_sample.fa.gz" ftype="fasta.gz"/>
             <param name="subsample_size" value="4"/>
             <param name="s" value="4"/>
+            <param name="advanced|single_pass_mode" value='True'/>
             <output name="default" file="seqtk_sample.out.gz" ftype="fasta.gz"/>
         </test>
+        <test>
+            <param name="in_file" value="seqtk_sample.fa.gz" ftype="fasta.gz"/>
+            <param name="subsample_size" value="4"/>
+            <param name="s" value="4"/>
+            <param name="advanced|single_pass_mode" value='False'/>
+            <output name="default" file="seqtk_sample.lowmem.gz" ftype="fasta.gz"/>
+        </test>
     </tests>
     <help><![CDATA[
 **What it does**
@@ -42,6 +55,8 @@
 
 The subsample size can be a decimal fraction <=1, where 1 implies 100% of the reads should be used. If a number >1 is provided, that many reads will be taken from the dataset.
 
+Two pass sampling mode reads the input file once to build a list of reads to output then again to output the reads. It is twice as slow, but uses much less RAM. It is only in effect when an integer number of reads (not a fraction) is specified as subsample size.
+
 @ATTRIBUTION@
     ]]></help>
     <expand macro="citation" />
Binary file test-data/seqtk_sample.lowmem.gz has changed