comparison sampleFasta.xml @ 15:a675b4534b19 draft

Uploaded
author petr-novak
date Fri, 24 Apr 2020 08:53:51 -0400
parents c2c69c6090f0
children d14b68e9fd1d
comparison
equal deleted inserted replaced
14:62fefa284036 15:a675b4534b19
1 <tool id="sampler" name="Read sampling" version="1.0.0"> 1 <tool id="sampler" name="Read sampling" version="1.0.1">
2 <description> Tool for random sampling subsets of reads from larger dataset</description> 2 <description> Tool for random sampling subsets of reads from larger dataset</description>
3 <requirements> 3 <requirements>
4 <requirement type="package">seqkit</requirement> 4 <requirement type="package">seqkit</requirement>
5 </requirements> 5 </requirements>
6 <stdio> 6 <stdio>
9 <command> 9 <command>
10 <![CDATA[ 10 <![CDATA[
11 #if str($paired)=="true" 11 #if str($paired)=="true"
12 ${__tool_directory__}/deinterlacer.py $input Afile Bfile 12 ${__tool_directory__}/deinterlacer.py $input Afile Bfile
13 && 13 &&
14 seqkit sample -2 --number $number --rand-seed $seed -o Asample -w 0 Afile < /dev/null 14 NUMBER=\$(($(number) / 2))
15 && 15 &&
16 seqkit sample -2 --number $number --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null 16 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Asample -w 0 Afile < /dev/null
17 &&
18 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null
17 && 19 &&
18 ${__tool_directory__}/fasta_interlacer.py -a Asample -b Bsample -p $output -x tmpfile 20 ${__tool_directory__}/fasta_interlacer.py -a Asample -b Bsample -p $output -x tmpfile
19 #else 21 #else
20 seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input 22 seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input < /dev/null
21 #end if 23 #end if
22 ]]> 24 ]]>
23 </command> 25 </command>
24 26
25 <inputs> 27 <inputs>
26 <param format="fasta" type="data" name="input" label="Read file (FASTA)" /> 28 <param format="fasta" type="data" name="input" label="Read file (FASTA)" />
27 <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads or read pairs"/> 29 <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."/>
30 <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads"/>
28 <param name="seed" type="integer" size="10" value="10" min="0" label="Random number generator seed " /> 31 <param name="seed" type="integer" size="10" value="10" min="0" label="Random number generator seed " />
29 <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."/> 32
30
31
32 </inputs> 33 </inputs>
33 34
34 35
35 <outputs> 36 <outputs>
36 <data format="fasta" name="output" label="Random selection from dataset ${input.hid}, sample size ${number})" /> 37 <data format="fasta" name="output" label="Random selection from dataset ${input.hid}, sample size ${number})" />