annotate sampleFasta.xml @ 18:d7f3eff34c27 draft

Uploaded
author petr-novak
date Fri, 14 May 2021 11:08:46 +0000
parents d14b68e9fd1d
children 58807b35777a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
1 <tool id="sampler" name="Read sampling" version="1.0.1">
17
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
2 <description> Tool for randomly sampling subsets of reads from large datasets</description>
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
3 <requirements>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
4 <requirement type="package">seqkit</requirement>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
5 </requirements>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
6 <stdio>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
7 <exit_code range="1:" level="fatal" description="Error" />
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
8 </stdio>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
9 <command>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
10 <![CDATA[
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
11 #if str($paired)=="true"
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
12 ${__tool_directory__}/deinterlacer.py $input Afile Bfile
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
13 &&
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
14 NUMBER=\$(($(number) / 2))
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
15 &&
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
16 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Asample -w 0 Afile < /dev/null
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
17 &&
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
18 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
19 &&
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
20 ${__tool_directory__}/fasta_interlacer.py -a Asample -b Bsample -p $output -x tmpfile
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
21 #else
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
22 seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input < /dev/null
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
23 #end if
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
24 ]]>
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
25 </command>
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
26
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
27 <inputs>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
28 <param format="fasta" type="data" name="input" label="Read file (FASTA)" />
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
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."/>
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
30 <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads"/>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
31 <param name="seed" type="integer" size="10" value="10" min="0" label="Random number generator seed " />
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
32
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
33 </inputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
34
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
35
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
36 <outputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
37 <data format="fasta" name="output" label="Random selection from dataset ${input.hid}, sample size ${number})" />
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
38 </outputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
39
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
40 <help>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
41 **What it does**
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
42
17
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
43 This tools randomly samples the specified number of reads from larger datasets.
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
44 Using the same random number generator seed with the same dataset results in sampling the same set of reads, while
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
45 using different seeds generates different subsets of reads.
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
46
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
47
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
48 </help>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
49
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
50
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
51 </tool>