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