annotate sampleFasta.xml @ 34:91996b991991 draft default tip

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