changeset 15:a675b4534b19 draft

Uploaded
author petr-novak
date Fri, 24 Apr 2020 08:53:51 -0400
parents 62fefa284036
children 5376e1c9adec
files sampleFasta.xml
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/sampleFasta.xml	Fri Feb 07 06:06:47 2020 -0500
+++ b/sampleFasta.xml	Fri Apr 24 08:53:51 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="sampler" name="Read sampling" version="1.0.0">
+<tool id="sampler" name="Read sampling" version="1.0.1">
   <description> Tool for random sampling subsets of reads from larger dataset</description>
   <requirements>
     <requirement type="package">seqkit</requirement>
@@ -11,24 +11,25 @@
     #if str($paired)=="true"
       ${__tool_directory__}/deinterlacer.py $input Afile Bfile
       &&
-      seqkit sample -2 --number $number --rand-seed $seed -o Asample -w 0 Afile < /dev/null
+      NUMBER=\$(($(number) / 2))
       &&
-      seqkit sample -2 --number $number --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null
+      seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Asample -w 0 Afile < /dev/null
+      &&
+      seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null
       &&
       ${__tool_directory__}/fasta_interlacer.py -a Asample -b Bsample -p $output -x tmpfile
     #else
-      seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input
+      seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input < /dev/null
     #end if
     ]]>
     </command>
 
   <inputs>
     <param format="fasta" type="data" name="input" label="Read file (FASTA)" />
-    <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads or read pairs"/>
+    <param name="paired" type="boolean" truevalue="true" falsevalue="false" checked="True" label="Paired-end reads" help="If paired-end reads are sampled, left and right-hand reads must be interlaced and all pairs must be complete."/>
+    <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads"/>
     <param name="seed" type="integer" size="10" value="10" min="0" label="Random number generator seed " />
-    <param name="paired" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Paired-end reads" help="If paired-end reads are sampled, left and right-hand reads must be interlaced and all pairs must be complete."/>
-    
-    
+        
   </inputs>