comparison reads_subsampler.xml @ 0:b2915e7e9dfa

"GTSubsampler initial commit"
author jpayne
date Fri, 19 Feb 2021 13:18:54 -0500
parents
children 631defc7e532
comparison
equal deleted inserted replaced
-1:000000000000 0:b2915e7e9dfa
1 <tool id="reads_subsampler" name="Subsample FASTQ Reads" version="1.0.0" python_template_version="3.5">
2 <description>to reduce excess genomic coverage</description>
3 <requirements>
4 </requirements>
5 <command detect_errors="exit_code"><![CDATA[
6 #if $reads.reads_select == 'collection'
7 python3 ${__tool_directory__}/subsamplr.py '$reads.coll.forward' '$reads.coll.reverse' '$downsampled.forward' '$downsampled.reverse' $coverage $genome_size '$seed'
8 #else
9 #if $reverse
10 python3 ${__tool_directory__}/subsamplr.py '$forward' '$reverse' $forward_out $reverse_out $coverage $genome_size '$seed'
11 #else
12 python3 ${__tool_directory__}/subsamplr.py '$forward' '$forward_out' $coverage $genome_size '$seed'
13 #end if
14 #end if
15 ]]></command>
16 <inputs>
17 <conditional name="reads">
18 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
19 <option value="collection">Paired collection from your history</option>
20 <option value="history">Two FASTQ datasets from your history representing paired reads, forward and reverse</option>
21 <option value="single">One FASTQ dataset representing single-end sequencing</option>
22 </param>
23 <when value="collection">
24 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="paired" />
25 </when>
26 <when value="history">
27 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
28 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
29 </when>
30 <when value="single">
31 <param label="Reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
32 </when>
33 </conditional>
34 <param name="coverage" type="integer" label="Maximum Coverage" value="200" />
35 <param name="genome_size" type="select" label="Assumed Genome Size">
36 <option value="4500000">Salmonella, E. Coli (4500000)</option>
37 <option value="2700000">Listeria (2700000)</option>
38 <option value="29900">SARS-CoV-2 (29900)</option>
39 </param>
40 <param name="seed" type="text" value="ed2b99d842cddc1ac81d7c01a0bf0555" label="Random seed (you don't have to change this)"/>
41 </inputs>
42 <outputs>
43 <data name="forward_out" label="${reads.forward}.downsampled" format_source="forward">
44 <filter>reads['reads_select'] == "history" or reads['reads_select'] == "single"</filter>
45 </data>
46 <data name="reverse_out" label="$reads.forward}.downsampled" format_source="reverse">
47 <filter>reads['reads_select'] == "history"</filter>
48 </data>
49 <collection name="downsampled" type="paired" label="${reads.coll.name}" structured_like="reads|coll" format_source="reads|coll">
50 <filter>reads['reads_select'] == "collection"</filter>
51 <data name="forward" label="${reads.coll.forward.name}.downsampled" format_source="reads.coll.forward" />
52 <data name="reverse" label="${reads.coll.reverse.name}.downsampled" format_source="reads.coll.reverse" />
53 </collection>
54 </outputs>
55 <tests>
56 <test>
57 <conditional name="reads">
58 <param name="reads_select" value="collection" />
59 <param name="coll">
60 <collection type="paired">
61 <element name="forward" value="forward.fastq" ftype="fastqsanger" />
62 <element name="reverse" value="reverse.fastq" ftype="fastqsanger" />
63 </collection>
64 </param>
65 </conditional>
66 <param name="coverage" value="20" />
67 <param name="genome_size" value="29900" />
68 <output_collection name="downsampled" type="paired">
69 <element name="forward" file="forward_out.fastq" />
70 <element name="reverse" file="reverse_out.fastq" />
71 </output_collection>
72 </test>
73 <test>
74 <conditional name="reads">
75 <param name="reads_select" value="history" />
76 <param name="forward" value="forward.fastq" />
77 <param name="reverse" value="reverse.fastq" />
78 </conditional>
79 <param name="coverage" value="20" />
80 <param name="genome_size" value="29900" />
81 <output name="forward_out" value="forward_out.fastq" />
82 <output name="reverse_out" value="reverse_out.fastq" />
83 </test>
84 <test>
85 <conditional name="reads">
86 <param name="reads_select" value="history" />
87 <param name="forward" value="forward.fastq.gz" />
88 <param name="reverse" value="reverse.fastq.gz" />
89 </conditional>
90 <param name="coverage" value="20" />
91 <param name="genome_size" value="29900" />
92 <output name="forward_out" value="forward_out.fastq.gz" decompress="true" />
93 <output name="reverse_out" value="reverse_out.fastq.gz" decompress="true" />
94 </test>
95 <test>
96 <conditional name="reads">
97 <param name="reads_select" value="history" />
98 <param name="forward" value="forward.fastq.bz2" />
99 <param name="reverse" value="reverse.fastq.bz2" />
100 </conditional>
101 <param name="coverage" value="20" />
102 <param name="genome_size" value="29900" />
103 <output name="forward_out" value="forward_out.fastq.bz2" decompress="true" />
104 <output name="reverse_out" value="reverse_out.fastq.bz2" decompress="true" />
105 </test>
106 </tests>
107 <help><![CDATA[
108 Randomly subsample single or paired-end FASTQ reads to target a certain genomic coverage depth.
109 ]]></help>
110 <citations />
111 </tool>