Mercurial > repos > kkonganti > cfsan_bettercallsal
comparison cfsan_bettercallsal.xml @ 0:a4b1ee4b68b1
"planemo upload"
author | kkonganti |
---|---|
date | Mon, 05 Jun 2023 16:17:23 -0400 |
parents | |
children | 365849f031fd |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a4b1ee4b68b1 |
---|---|
1 <tool id="cfsan_centriflaken" name="Centriflaken" version="0.2.0+galaxy0"> | |
2 <description>An automated pipeline to generate a MAG of interest (E.coli or Salmonella) and perform serotyping.</description> | |
3 <requirements> | |
4 <requirement type="package" version="22.04">nextflow</requirement> | |
5 <requirement type="package">graphviz</requirement> | |
6 </requirements> | |
7 <version_command>nextflow -version</version_command> | |
8 <command detect_errors="exit_code"><![CDATA[ | |
9 mkdir -p cpipes-input || exit 1; | |
10 pwd_path=\$(pwd); | |
11 #import re | |
12 #if (str($input_read_type_cond.input_read_type) == "single_long"): | |
13 #for _, $unpaired in enumerate($input_read_type_cond.input): | |
14 #set read1 = str($unpaired.name) | |
15 #if not str($unpaired.name).endswith(('.fastq', '.fastq.gz')): | |
16 #set read1_ext = re.sub('fastqsanger', 'fastq', str($unpaired.ext)) | |
17 #set read1 = str($unpaired.name) + str('.') + $read1_ext | |
18 #end if | |
19 ln -sf '$unpaired' './cpipes-input/$read1'; | |
20 #end for | |
21 #elif (str($input_read_type_cond.input_read_type) == "paired"): | |
22 #for _, $pair in enumerate($input_read_type_cond.input_pair) | |
23 #set read_R1 = re.sub('\:forward', '_forward', str($pair.forward.name)) | |
24 #set read_R2 = re.sub('\:reverse', '_reverse', str($pair.reverse.name)) | |
25 #set read_R1_ext = re.sub('fastqsanger', 'fastq', str($pair.forward.ext)) | |
26 #set read_R2_ext = re.sub('fastqsanger', 'fastq', str($pair.reverse.ext)) | |
27 #if not str($pair.forward.name).endswith(('.fastq', '.fastq.gz')): | |
28 #set read_R1 = $read_R1 + str('.') + $read_R1_ext | |
29 #end if | |
30 #if not str($pair.reverse.name).endswith(('.fastq', '.fastq.gz')): | |
31 #set read_R2 = $read_R2 + str('.') + $read_R2_ext | |
32 #end if | |
33 ln -sf '$pair.forward' './cpipes-input/$read_R1'; | |
34 ln -sf '$pair.reverse' './cpipes-input/$read_R2'; | |
35 #end for | |
36 #end if | |
37 $__tool_directory__/0.4.0/cpipes | |
38 --pipeline $input_read_type_cond.pipeline_cond.pipeline | |
39 #if ($input_read_type_cond.pipeline_cond.pipeline == "centriflaken"): | |
40 --fq_single_end true | |
41 --flye_genome_size '${genome_size}' | |
42 #if ($input_read_type_cond.pipeline_cond.long_read_platform == "nanopore_corr"): | |
43 --flye_nano_corr true --flye_nano_raw false | |
44 #elif ($input_read_type_cond.pipeline_cond.long_read_platform == "nanopore_hq"): | |
45 --flye_nano_hq true --flye_nano_raw false | |
46 #elif ($input_read_type_cond.pipeline_cond.long_read_platform == "pacbio_raw"): | |
47 --flye_pacbio_raw true --flye_nano_raw false | |
48 #elif ($input_read_type_cond.pipeline_cond.long_read_platform == "pacbio_corr"): | |
49 --flye_pacbio_corr true --flye_nano_raw false | |
50 #elif ($input_read_type_cond.pipeline_cond.long_read_platform == "pacbio_hifi"): | |
51 --flye_pacbio_hifi true --flye_nano_raw false | |
52 #end if | |
53 #elif ($input_read_type_cond.pipeline_cond.pipeline == "centriflaken_hy"): | |
54 #if (str($input_read_type_cond.input_read_type) == "single_long"): | |
55 --fq_single_end true | |
56 #elif (str($input_read_type_cond.input_read_type) == "paired"): | |
57 --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}' | |
58 #end if | |
59 #end if | |
60 --input \${pwd_path}/cpipes-input | |
61 --output \${pwd_path}/cpipes-output | |
62 --fq_suffix '${input_read_type_cond.fq_suffix}' | |
63 #if ($fq_filter_by_len != ""): | |
64 --fq_filter_by_len $fq_filter_by_len | |
65 #end if | |
66 --fq_filename_delim '${fq_filename_delim}' | |
67 --fq_filename_delim_idx $fq_filename_delim_idx | |
68 --centrifuge_extract_bug '${centrifuge_extract_bug}' | |
69 #if (str($input_read_type_cond.pipeline_cond.rm_dup_seqs) == "true"): | |
70 --seqkit_rmdup_run true | |
71 #end if | |
72 -profile kondagac; | |
73 mv './cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-multiqc/multiqc_report.html' './multiqc_report.html' > /dev/null 2>&1 || exit 1; | |
74 mv './cpipes-output/${input_read_type_cond.pipeline_cond.pipeline}-results/kraken2_extract_contigs' kraken2_extract_contigs > /dev/null 2>&1 || exit 1; | |
75 rm -rf ./cpipes-output > /dev/null 2>&1 || exit 1; | |
76 rm -rf ./work > /dev/null 2>&1 || exit 1 | |
77 ]]></command> | |
78 <inputs> | |
79 <conditional name="input_read_type_cond"> | |
80 <param name="input_read_type" type="select" label="Select the read collection type"> | |
81 <option value="single_long" selected="true">Unpaired reads (i.e. Single-End short reads or Long reads)</option> | |
82 <option value="paired">Paired-End reads</option> | |
83 </param> | |
84 <when value="single_long"> | |
85 <param name="input" type="data_collection" collection_type="list" format="fastq,fastq.gz" | |
86 label="Dataset list of unpaired short reads or long reads" /> | |
87 <conditional name="pipeline_cond"> | |
88 <param name="pipeline" type="select" label="CPIPES Workflow name" | |
89 help="centriflaken: for long reads (Nanopore or PacBio). centriflaken_hy: for unpaired short reads. Default: centriflaken"> | |
90 <option value="centriflaken" selected="true">centriflaken</option> | |
91 <option value="centriflaken_hy">centriflaken_hy</option> | |
92 </param> | |
93 <when value="centriflaken"> | |
94 <param name="long_read_platform" type="select" label="Mention long read sequencing platform and type"> | |
95 <option value="nanopore_raw" selected="true">Nanopore raw reads, pre-Guppy5 (<20% error)</option> | |
96 <option value="nanopore_corr">Nanopore reads that were corrected with other methods (<3% error)</option> | |
97 <option value="nanopore_hq">Nanopore high-quality reads, Guppy5+ SUP or Q20 (5% error)</option> | |
98 <option value="pacbio_raw">PacBio regular CLR reads (<20% error)</option> | |
99 <option value="pacbio_corr">PacBio reads that were corrected with other methods (<3% error)</option> | |
100 <option value="pacbio_hifi">PacBio HiFi reads (<1% error)</option> | |
101 </param> | |
102 <param name="rm_dup_seqs" type="select" label="Remove duplicate sequences" | |
103 help="THIS OPTION IS IGNORED IF THE INPUT READS ARE LONG READS."> | |
104 <option value="NA" selected="true">N/A</option> | |
105 </param> | |
106 </when> | |
107 <when value="centriflaken_hy"> | |
108 <param name="long_read_platform" type="select" label="Mention long read sequencing platform and type" | |
109 help="THIS OPTION IS IGNORED IF THE INPUT READS ARE SHORT READS."> | |
110 <option value="NA" selected="true">N/A</option> | |
111 </param> | |
112 <param name="rm_dup_seqs" type="select" label="Remove duplicate sequences" | |
113 help="Selecting yes will compare sequence content and remove identical sequences i.e. only the first occured sequence record will be saved."> | |
114 <option value="true">yes</option> | |
115 <option value="false" selected="true">no</option> | |
116 </param> | |
117 </when> | |
118 </conditional> | |
119 <param name="fq_suffix" value=".fastq.gz" type="text" label="Suffix of the Unpaired FASTQ"/> | |
120 </when> | |
121 <when value="paired"> | |
122 <param name="input_pair" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz" label="List of Dataset pairs" /> | |
123 <conditional name="pipeline_cond"> | |
124 <param name="pipeline" type="select" label="CPIPES Workflow name" | |
125 help="Auto selected centriflaken_hy workflow for paired-end short reads."> | |
126 <option value="centriflaken_hy" selected="true">centriflaken_hy</option> | |
127 </param> | |
128 <when value="centriflaken_hy"> | |
129 <param name="long_read_platform" type="select" label="Mention long read sequencing platform and type" | |
130 help="THIS OPTION IS IGNORED IF THE INPUT READS ARE SHORT READS."> | |
131 <option value="NA" selected="true">N/A</option> | |
132 </param> | |
133 <param name="rm_dup_seqs" type="select" label="Remove duplicate sequences" | |
134 help="Selecting yes will compare sequence content and remove identical sequences i.e. only the first occured sequence record will be saved."> | |
135 <option value="true">yes</option> | |
136 <option value="false" selected="true">no</option> | |
137 </param> | |
138 </when> | |
139 </conditional> | |
140 <param name="fq_suffix" value="_R1_001.fastq.gz" type="text" label="Suffix of the R1 FASTQ"/> | |
141 <param name="fq2_suffix" value="_R2_001.fastq.gz" type="text" label="Suffix of the R2 FASTQ"/> | |
142 </when> | |
143 </conditional> | |
144 <param name="fq_filter_by_len" optional="true" value="" type="integer" label="Enter minimum read length to retain before starting the analysis" | |
145 help="Keep this option empty to use default values. Default for centriflaken (long reads) is 4000 bp and for centriflaken_hy (short reads) is 75 bp."/> | |
146 <param name="fq_filename_delim" type="text" value="_" label="File name delimitor by which samples are grouped together (--fq_filename_delim)" | |
147 help="This is the delimitor by which samples are grouped together to display in the final MultiQC report. For example, if your input data sets are mango_replicate1.fastq.gz, mango_replicate2.fastq.gz, orange_replicate1_maryland.fastq.gz, orange_replicate2_maryland.fastq.gz, then to create 2 samples mango and orange, the value for --fq_filename_delim would be _ (underscore) and the value for --fq_filename_delim_idx would be 1, since you want to group by the first word (i.e. mango or orange) after splitting the filename based on _ (underscore)."/> | |
148 <param name="fq_filename_delim_idx" type="integer" value="1" label="File name delimitor index (--fq_filename_delim_idx)" /> | |
149 <param name="centrifuge_extract_bug" type="text" value="Escherichia coli" label="Reads belonging to this taxa are extracted and a MAG is generated to allow for serotyping"/> | |
150 <param name="genome_size" type="text" optional="true" value="5.5m" label="Estimated genome size" help="For example, 5m or 2.6g."> | |
151 <validator type="regex" message="Genome size must be a float or integer, optionally followed by the a unit prefix (kmg)">^([0-9]*[.])?[0-9]+[kmg]?$</validator> | |
152 </param> | |
153 <!-- <param name="runtime_profile" type="select" label="Run time profile"> | |
154 <option value="kondagac" selected="true">conda</option> | |
155 <option value="cingularitygac">singularity</option> | |
156 </param> --> | |
157 </inputs> | |
158 <outputs> | |
159 <data name="multiqc_report" format="html" label="${input_read_type_cond.pipeline_cond.pipeline}: MultiQC Report on ${on_string}" from_work_dir="multiqc_report.html"/> | |
160 <collection name="assembled_mags" type="list" label="${input_read_type_cond.pipeline_cond.pipeline}: Assembled MAGs on ${on_string}"> | |
161 <discover_datasets pattern="(?P<name>.*)\.assembly_filtered_contigs\.fasta" ext="fasta" directory="kraken2_extract_contigs"/> | |
162 </collection> | |
163 </outputs> | |
164 <tests> | |
165 <!--Test 01: long reads--> | |
166 <test expect_num_outputs="2"> | |
167 <param name="input"> | |
168 <collection type="list"> | |
169 <element name="FAL11127.fastq.gz" value="FAL11127.fastq.gz" /> | |
170 <element name="FAL11341.fastq.gz" value="FAL11341.fastq.gz" /> | |
171 <element name="FAL11342.fastq.gz" value="FAL11342.fastq.gz" /> | |
172 </collection> | |
173 </param> | |
174 <param name="fq_suffix" value=".fastq.gz"/> | |
175 <output name="multiqc_report" file="multiqc_report.html" ftype="html" compare="sim_size"/> | |
176 <!-- <output name="assembled_mags" file="FAL11127.assembly_filtered.contigs.fasta" ftype="fasta" compare="sim_size"/> --> | |
177 </test> | |
178 </tests> | |
179 <help><![CDATA[ | |
180 | |
181 .. class:: infomark | |
182 | |
183 **Purpose** | |
184 | |
185 Centriflaken suite of automated data analysis pipelines are based on Nextflow DSL2 developed at CFSAN, FDA. These pipelines allow rapid | |
186 and effective construction of metagenomic assembled genomes (MAGs) to enable bacterial source-tracking. It is based on methods described in our | |
187 previous publication (Maguire *et al*, 2021. doi: https://doi.org/10.1371/journal.pone.0245172). | |
188 | |
189 ---- | |
190 | |
191 .. class:: infomark | |
192 | |
193 **Testing and Validation** | |
194 | |
195 The CPIPES - Centriflaken Nextflow pipeline has been wrapped to make it work in Galaxy. It takes in either paired or unpaired short reads or long reads, generates MAGs and performs | |
196 in silico-based analysis (i.e., virulence gene finding). Additionally, AMR gene finding analysis is also included in Centriflaken and performed on MAGs | |
197 of interest. The final summary plots and tables can be downloaded from the provided MultiQC HTML report generated as part of the pipeline. | |
198 The Centriflaken pipeline was validated with data from our previously published method (Maguire *et al*, 2021. doi: https://doi.org/10.1371/journal.pone.0245172) and was able to replicate the detection | |
199 and classification of STECs for each sample. We tested the pipeline with Nanopore data obtained from 21 additional enriched samples from | |
200 irrigation water and was able to perform the entire precision metagenomics analysis in less than 5 hours for all of them. All the original testing and validation was | |
201 done on the command line on the CFSAN Raven2 HPC Cluster. | |
202 | |
203 | |
204 ---- | |
205 | |
206 .. class:: infomark | |
207 | |
208 **Outputs** | |
209 | |
210 The main output files are: | |
211 | |
212 :: | |
213 | |
214 - MultiQC Report: Contains a brief summary report including any serotyping and AMR result tables. | |
215 Please note that due to MultiQC customizations, the preview (eye icon) will not | |
216 work within Galaxy for the MultiQC report. Please download the file by clicking | |
217 on the floppy icon and view it in your browser on your local desktop/workstation. | |
218 - Final assembly: contains contigs and possibly scaffolds. | |
219 | |
220 ]]></help> | |
221 <citations> | |
222 <citation type="bibtex"> | |
223 @misc{gitlabCPIPES, | |
224 author = {Konganti, Kranti}, | |
225 year = {2022}, | |
226 title = {CPIPES - Centriflaken}, | |
227 publisher = {GitLab}, | |
228 journal = {GitLab repository}, | |
229 url = {https://cfsan-git.fda.gov/Kranti.Konganti/cpipes}} | |
230 </citation> | |
231 </citations> | |
232 </tool> |