Mercurial > repos > nml > pneumocat
comparison pneumocat.xml @ 0:33de0245ed99 draft default tip
"planemo upload for repository https://github.com/phe-bioinformatics/PneumoCaT commit c1002f7ad15e676357c6489878291de07bbde841"
author | nml |
---|---|
date | Tue, 24 Mar 2020 13:27:46 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:33de0245ed99 |
---|---|
1 <tool id="pneumocat" name="PneumoCaT" version="@VERSION@"> | |
2 <description> Pneumococcal Capsular Typing of illumina reads</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements" /> | |
7 <command detect_errors="exit_code"> | |
8 <![CDATA[ | |
9 | |
10 #import os | |
11 #import re | |
12 | |
13 #def check_ending($name, $forward_read=True) | |
14 ## Pneumocat needs to have name_1.fastq and name_2.fastq to work | |
15 ## Check for correct ending and change ending if needed | |
16 | |
17 #if re.search(r'(\.|_)\S*(1|2)*$', $name) | |
18 #if $forward_read | |
19 #return re.sub(r'(\.|_)\S*(1|2)*$', '_R1.fastq', $name) | |
20 #else | |
21 #return re.sub(r'(\.|_)\S*(1|2)*$', '_R2.fastq', $name) | |
22 #end if | |
23 | |
24 #else | |
25 #if $forward_read | |
26 #return '{}_R1.fastq'.format($name) | |
27 #else | |
28 #return '{}_R2.fastq'.format($name) | |
29 #end if | |
30 #end if | |
31 #end def | |
32 | |
33 | |
34 #if $input.type == 'paired' | |
35 #set $initial = re.sub('[^\w_]', '_', os.path.splitext($input.forward.name)[0]) | |
36 | |
37 #set $for_input = $check_ending($initial) | |
38 #set $rev_input = $check_ending($initial, forward_read=False) | |
39 | |
40 ln -s '$input.forward' ./$for_input && | |
41 ln -s '$input.reverse' ./$rev_input && | |
42 | |
43 #elif $input.type == 'paired_collection' | |
44 #set $initial = re.sub('[^\w_]', '_', os.path.splitext($input.fastq_collection.forward.name)[0]) | |
45 | |
46 #set $for_input = $check_ending($initial) | |
47 #set $rev_input = $check_ending($initial, forward_read=False) | |
48 | |
49 ln -s '$input.fastq_collection.forward' ./$for_input && | |
50 ln -s '$input.fastq_collection.reverse' ./$rev_input && | |
51 | |
52 #end if | |
53 | |
54 PneumoCaT.py -1 '$for_input' -2 '$rev_input' -o outputs --threads '\${GALAXY_SLOTS:-1}' --cleanup | |
55 ]]> | |
56 </command> | |
57 <inputs> | |
58 <conditional name="input"> | |
59 <param name="type" type="select" label="Sequence Data Type"> | |
60 <option value="paired">Paired-end reads (FASTQ)</option> | |
61 <option value="paired_collection">Paired-end reads collection (FASTQ)</option> | |
62 </param> | |
63 <when value="paired"> | |
64 <param name="forward" | |
65 type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" | |
66 optional="false" | |
67 multiple="false" | |
68 label="Forward reads (FASTQ)" | |
69 help="Must have ASCII encoded quality scores" | |
70 /> | |
71 <param name="reverse" | |
72 type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" | |
73 optional="false" | |
74 label="Reverse reads (FASTQ)" | |
75 help="File format must match the Forward FASTQ file" | |
76 /> | |
77 </when> | |
78 <when value="paired_collection"> | |
79 <param name="fastq_collection" | |
80 type="data_collection" format="fastq,fastqsanger, fastq.gz, fastqsanger.gz" | |
81 collection_type="paired" | |
82 optional="false" | |
83 label="Paired-end reads collection (FASTQ)" | |
84 /> | |
85 </when> | |
86 </conditional> | |
87 </inputs> | |
88 <outputs> | |
89 <data format="txt" name="coverage_summary" from_work_dir="outputs/coverage_summary.txt" label="PneumoCaT Coverage Summary.txt"/> | |
90 <data format="xml" name="results" from_work_dir="outputs/*.results.xml" label="PneumoCaT Results.xml"/> | |
91 <data format="xml" name="specific_results" from_work_dir="outputs/SNP_based_serotyping/*.results.xml" label="PneumoCaT Serotype Distinction.xml"/> | |
92 <data format="txt" name="variant_summary" from_work_dir="outputs/SNP_based_serotyping/variant_summary.yml" label="PneumoCaT Variant Summary.yml"/> | |
93 </outputs> | |
94 <tests> | |
95 <test> | |
96 <conditional name="input"> | |
97 <param name="type" value="paired" /> | |
98 <param name="forward" value="09N_R1.fastq" /> | |
99 <param name="reverse" value="09N_R2.fastq" /> | |
100 </conditional> | |
101 <output name="coverage_summary" file="coverage_summary.txt" /> | |
102 <output name="results" file="results.xml" /> | |
103 </test> | |
104 <test> | |
105 <conditional name="input"> | |
106 <param name="type" value="paired_collection" /> | |
107 <param name="fastq_collection"> | |
108 <collection type="paired"> | |
109 <element name="forward" value="09N_R1.fastq.gz" ftype="fastq.gz" /> | |
110 <element name="reverse" value="09N_R2.fastq.gz" ftype="fastq.gz" /> | |
111 </collection> | |
112 </param> | |
113 </conditional> | |
114 <output name="coverage_summary" file="coverage_summary.txt" /> | |
115 <output name="results" file="results.xml" /> | |
116 </test> | |
117 </tests> | |
118 <help> | |
119 <![CDATA[ | |
120 | |
121 PneumoCaT | |
122 --------- | |
123 | |
124 PneumoCaT (Pneumococcal Capsular Typing) uses a two-step step approach to assign capsular type to | |
125 S.pneumoniae genomic data (Illumina). More info can be found at the `PneumoCaT github page <https://github.com/phe-bioinformatics/PneumoCaT>`_ | |
126 | |
127 Program Steps | |
128 ############# | |
129 | |
130 - **Step 1:** Reads from each readset are mapped to capsular locus sequences for all known capsular types using bowtie2 | |
131 | |
132 - This step is considered successful if the readset matches > 90% to one or more capsular locus sequences | |
133 | |
134 - If only a singular capsular locus is matched, PneumoCaT terminates and reports that as the assigned capsular type | |
135 | |
136 - If more than 1 loci are matched then the tool moves to step 2 | |
137 | |
138 - **Step 2:** Variant calling with the capsular type variant database | |
139 | |
140 - Used to distinguish serotypes within a serogroup/genogroup | |
141 | |
142 Please note PneumoCaT applies a quality metric requiring a mean depth of 20 reads across the mapped sequence | |
143 and a minimum depth of 5 reads for mapping. The report will retrun "Failed" if these conditions are not met. | |
144 | |
145 Inputs | |
146 ###### | |
147 | |
148 - **Paired-end Illumina reads** with one of the following example formats is prefered: | |
149 | |
150 - <name>_1.fastq and <name>_2.fastq | |
151 | |
152 - <name>_R1.fastq and <name>_R2.fastq | |
153 | |
154 - <name>_R1.fastqsanger.gz and <name>_R2.fastqsanger.gz | |
155 | |
156 - If the reads are not formatted as above, the wrapper will append _R1.fastq and _R2.fastq to allow function | |
157 | |
158 Outputs | |
159 ####### | |
160 | |
161 Please see `**PneumoCaTs interpreting results document** <https://github.com/phe-bioinformatics/PneumoCaT/blob/master/Documentation/InterpretingResults.pdf>`_ | |
162 for full up-to-date information on how to interpret PneumoCaT results. | |
163 | |
164 Galaxy will output 4 results running PneumoCaT with 2 of the results only appearing if **Step 2** variant calling is done | |
165 | |
166 **1. Coverage Summary.txt** -- Always output unless fails -- | |
167 | |
168 **2. Results.xml** -- Always output unless fails -- | |
169 | |
170 **3. Serotype distinction.xml** -- Step 2 Required -- | |
171 | |
172 **4. Variant Summary.txt** -- Step 2 Required -- | |
173 | |
174 | |
175 **Note** - Galaxy will always output files 3 and 4 even if step 2 is not done. In these cases, the files will have no data. | |
176 | |
177 ]]> | |
178 </help> | |
179 <expand macro="citations" /> | |
180 </tool> |