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