Mercurial > repos > petr-novak > re_utils
annotate sampleFasta.xml @ 28:ba970b24e48c draft
planemo upload commit 20bdf879b52796d3fb251a20807191ff02084d3c-dirty
author | petr-novak |
---|---|
date | Wed, 02 Aug 2023 13:09:47 +0000 |
parents | 58807b35777a |
children | 628b235d76c7 |
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 | 2 <description> Tool for randomly sampling subsets of reads from large datasets</description> |
3 | 3 <requirements> |
4 <requirement type="package">seqkit</requirement> | |
5 </requirements> | |
6 <stdio> | |
7 <exit_code range="1:" level="fatal" description="Error" /> | |
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 | 13 <command> |
9 | 14 <![CDATA[ |
3 | 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 | 17 && |
15 | 18 NUMBER=\$(($(number) / 2)) |
9 | 19 && |
15 | 20 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Asample -w 0 Afile < /dev/null |
21 && | |
22 seqkit sample -2 --number \$NUMBER --rand-seed $seed -o Bsample -w 0 Bfile < /dev/null | |
9 | 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 | 25 #else |
15 | 26 seqkit sample -2 --number $number --rand-seed $seed -o $output -w 0 $input < /dev/null |
3 | 27 #end if |
9 | 28 ]]> |
29 </command> | |
3 | 30 |
31 <inputs> | |
9 | 32 <param format="fasta" type="data" name="input" label="Read file (FASTA)" /> |
15 | 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."/> |
34 <param name="number" type="integer" size="7" value="500000" min="1" label="Number of reads"/> | |
9 | 35 <param name="seed" type="integer" size="10" value="10" min="0" label="Random number generator seed " /> |
15 | 36 |
3 | 37 </inputs> |
38 | |
39 | |
40 <outputs> | |
41 <data format="fasta" name="output" label="Random selection from dataset ${input.hid}, sample size ${number})" /> | |
42 </outputs> | |
43 | |
44 <help> | |
45 **What it does** | |
46 | |
17 | 47 This tools randomly samples the specified number of reads from larger datasets. |
48 Using the same random number generator seed with the same dataset results in sampling the same set of reads, while | |
49 using different seeds generates different subsets of reads. | |
3 | 50 |
51 | |
52 </help> | |
53 | |
54 | |
55 </tool> |