annotate cfsan_centriflaken.xml @ 78:4ee79500795b

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