annotate sampleFasta.xml @ 25:5dba804e6884 draft

planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
author petr-novak
date Wed, 02 Aug 2023 12:42:08 +0000
parents 58807b35777a
children 628b235d76c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
1 <tool id="sampler" name="Read sampling" version="1.0.1.3">
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>
22
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
9 <required_files>
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
10 <include type="literal" path="deinterlacer.py" />
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
11 <include type="literal" path="fasta_interlacer.py" />
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
12 </required_files>
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
13 <command>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
14 <![CDATA[
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
15 #if str($paired)=="true"
22
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
16 python ${__tool_directory__}/deinterlacer.py $input Afile Bfile
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
17 &&
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
18 NUMBER=\$(($(number) / 2))
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
19 &&
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
20 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Asample -w 0 Afile < /dev/null
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
21 &&
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
22 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
23 &&
22
58807b35777a planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
petr-novak
parents: 17
diff changeset
24 python ${__tool_directory__}/fasta_interlacer.py -a Asample -b Bsample -p $output -x tmpfile
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
25 #else
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
26 seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input < /dev/null
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
27 #end if
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
28 ]]>
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
29 </command>
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
30
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
31 <inputs>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
32 <param format="fasta" type="data" name="input" label="Read file (FASTA)" />
15
a675b4534b19 Uploaded
petr-novak
parents: 9
diff changeset
33 <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
34 <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads"/>
9
c2c69c6090f0 Uploaded
petr-novak
parents: 3
diff changeset
35 <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
36
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
37 </inputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
38
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
39
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
40 <outputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
41 <data format="fasta" name="output" label="Random selection from dataset ${input.hid}, sample size ${number})" />
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
42 </outputs>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
43
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
44 <help>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
45 **What it does**
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
46
17
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
47 This tools randomly samples the specified number of reads from larger datasets.
d14b68e9fd1d Uploaded - new tools added
petr-novak
parents: 15
diff changeset
48 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
49 using different seeds generates different subsets of reads.
3
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
50
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
51
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
52 </help>
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
53
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
54
e320ef2d105a Uploaded
petr-novak
parents:
diff changeset
55 </tool>