comparison read-it-and-keep.xml @ 0:554aa2a63f04 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/read-it-and-keep commit 4b41e2742ba5f9c957e13a188ca49e60e16ae13b"
author iuc
date Fri, 28 Jan 2022 18:47:34 +0000
parents
children 1563b58905f4
comparison
equal deleted inserted replaced
-1:000000000000 0:554aa2a63f04
1 <tool id="read_it_and_keep" name="Read It and Keep" version="@TOOL_VERSION@+galaxy0" profile="20.09">
2 <macros>
3 <token name="@FASTQ_FORMATS@">fastq,fastq.gz,fastqsanger,fastqsanger.gz</token>
4 <token name="@TOOL_VERSION@">0.1.0</token>
5 </macros>
6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">read-it-and-keep</requirement>
8 <requirement type="package">python</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 #if $ref_source.source == "history"
12 ln -s '$ref_source.ref_fasta' ref${trim_reference}.fasta &&
13 #elif $ref_source.source == "builtin"
14 ln -s '$ref_source.ref_fasta_builtin.path' ref${trim_reference}.fasta &&
15 #end if
16 #if $trim_reference
17 python '$__tool_directory__/trim_reference.py' ref${trim_reference}.fasta ref.fasta &&
18 #end if
19 #if $reads.read_type == "paired"
20 ln -s '$reads.read1' read1.fastq &&
21 ln -s '$reads.read2' read2.fastq &&
22 #elif $reads.read_type == 'paired_collection'
23 ln -s '$reads.paired_reads.forward' read1.fastq &&
24 ln -s '$reads.paired_reads.reverse' read2.fastq &&
25 #elif $reads.read_type == 'single'
26 ln -s '$reads.single_read1' read1.fastq &&
27 #end if
28 readItAndKeep
29 --tech $sequencing_tech
30 --ref_fasta ref.fasta
31 --min_map_length $adv.min_map_length
32 --min_map_length_pc $adv.min_map_length_pc
33 --reads1 read1.fastq
34 #if $reads.read_type != "single"
35 --reads2 read2.fastq
36 #end if
37 -o output
38 #if $reads.read_type == 'single'
39 && mv output.reads.fastq.gz output.reads_1.fastq.gz
40 #end if
41 ]]></command>
42 <inputs>
43 <conditional name="reads">
44 <param type="select" label="Read type" name="read_type">
45 <option value="paired" selected="true">Paired end</option>
46 <option value="paired_collection">Paired collection</option>
47 <option value="single">Single ended</option>
48 </param>
49 <when value="paired">
50 <param type="data" format="@FASTQ_FORMATS@" name="read1" label="Read1" />
51 <param type="data" format="@FASTQ_FORMATS@" name="read2" label="Read2" />
52 </when>
53 <when value="paired_collection">
54 <param type="data_collection" collection_type="paired" format="@FASTQ_FORMATS@" name="paired_reads" label="Reads" />
55 </when>
56 <when value="single">
57 <param type="data" format="@FASTQ_FORMATS@" name="single_read1" label="Read1" />
58 </when>
59 </conditional>
60 <conditional name="ref_source">
61 <param type="select" label="Reference genome source" name="source">
62 <option value="history" selected="true">History</option>
63 <option value="builtin">Built-in</option>
64 </param>
65 <when value="history">
66 <param type="data" format="fasta" name="ref_fasta" label="Reference genome" />
67 </when>
68 <when value="builtin">
69 <param type="select" name="ref_fasta_builtin" label="Reference genome">
70 <options from_data_table="all_fasta" />
71 </param>
72 </when>
73 </conditional>
74 <param type="boolean" name="trim_reference" label="Trim trailing As from the reference sequence" checked="true" truevalue="_untrimmed" falsevalue="" help="Remove all As at the end of the reference sequence to ensure that the reference has no poly-A tail (see Note in the general help section below)" />
75 <param type="select" argument="--tech" name="sequencing_tech" label="Sequencing technology">
76 <option value="illumina">Illumina</option>
77 <option value="ont">Oxford Nanopore</option>
78 </param>
79 <section name="adv" title="Advanced options">
80 <param argument="--min_map_length" type="integer" min="0" value="50" label="Shortest match required to keep a read (in bp)" />
81 <param argument="--min_map_length_pc" type="float" min="0.0" max="100.0" value="50.0" label="Minimum length of match required to keep a read (as percentage of read length" />
82 </section>
83 </inputs>
84 <outputs>
85 <data name="output_reads1" format="fastqsanger.gz" label="Filtered reads ${on_string} - reads1" from_work_dir="output.reads_1.fastq.gz">
86 <filter>reads["read_type"] == "single" or reads["read_type"] == "paired"</filter>
87 </data>
88 <data name="output_reads2" format="fastqsanger.gz" label="Filtered reads ${on_string} - reads2" from_work_dir="output.reads_2.fastq.gz">
89 <filter>reads["read_type"] == "paired"</filter>
90 </data>
91 <collection type="paired" format="fastqsanger.gz" name="output_collection" label="Filtered reads ${on_string}">
92 <filter>reads["read_type"] == "paired_collection"</filter>
93 <data name="forward" format="fastqsanger.gz" from_work_dir="output.reads_1.fastq.gz" />
94 <data name="reverse" format="fastqsanger.gz" from_work_dir="output.reads_2.fastq.gz" />
95 </collection>
96 </outputs>
97 <tests>
98 <test expect_num_outputs="2">
99 <conditional name="reads">
100 <param name="read_type" value="paired" />
101 <param name="read1" value="test1.fastq.gz" ftype="fastqsanger.gz" />
102 <param name="read2" value="test2.fastq.gz" ftype="fastqsanger.gz" />
103 </conditional>
104 <conditional name="ref_source">
105 <param name="source" value="history" />
106 <param name="ref_fasta" value="reference.fasta" ftype="fasta" />
107 </conditional>
108 <param name="sequencing_tech" value="illumina" />
109 <output name="output_reads1" value="output_test1.fastq.gz" />
110 <output name="output_reads2" value="output_test2.fastq.gz" />
111 </test>
112 <test expect_num_outputs="3">
113 <conditional name="reads">
114 <param name="read_type" value="paired_collection" />
115 <param name="paired_reads">
116 <collection type="paired">
117 <element name="forward" value="test1.fastq.gz" ftype="fastqsanger.gz" />
118 <element name="reverse" value="test2.fastq.gz" ftype="fastqsanger.gz" />
119 </collection>
120 </param>
121 </conditional>
122 <conditional name="ref_source">
123 <param name="source" value="history" />
124 <param name="ref_fasta" value="reference.fasta" ftype="fasta" />
125 </conditional>
126 <param name="sequencing_tech" value="illumina" />
127 <output_collection name="output_collection">
128 <element name="forward" value="output_test1.fastq.gz" />
129 <element name="reverse" value="output_test2.fastq.gz" />
130 </output_collection>
131 </test>
132 <test expect_num_outputs="1">
133 <conditional name="reads">
134 <param name="read_type" value="single" />
135 <param name="single_read1" value="test3.fastq.gz" ftype="fastqsanger.gz"/>
136 </conditional>
137 <conditional name="ref_source">
138 <param name="source" value="history" />
139 <param name="ref_fasta" value="reference.fasta" ftype="fasta" />
140 </conditional>
141 <param name="sequencing_tech" value="ont" />
142 <output name="output_reads1" value="output_test3.fastq.gz" />
143 </test>
144 </tests>
145 <help><![CDATA[
146 ReadItAndKeep
147 -------------
148
149 ReadItAndKeep is a tool for filtering viral sequence data to remove host reads, developed for cleaning
150 SARS-CoV-2 sequencing data. It maps reads against the SARS-CoV-2 viral genome (with the poly-A tail removed)
151 and only keeps those that map well.
152
153 **Note**: If the reference genome supplied contains a poly-A tail, reads that contain part of a poly-A tail will map
154 to the refence, no matter what species they originate from. If you are not sure if the reference you are using has had
155 trailing A's trimmed, enable the `Trim trailing As` option.
156
157 Input can be either Illumina or Oxford Nanopore reads.
158 ]]></help>
159 <citations>
160 <citation type="doi">10.1101/2022.01.21.477194</citation>
161 </citations>
162 </tool>