annotate cfsan_centriflaken.xml @ 137:421ba3230421

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