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