annotate cfsan_bettercallsal.xml @ 10:1b9de878b04a

"planemo upload"
author kkonganti
date Thu, 15 Jun 2023 11:16:45 -0400
parents 22165d5e5e0a
children 749faef1caa9
rev   line source
kkonganti@1 1 <tool id="cfsan_bettercallsal" name="bettercallsal" version="0.2.0+galaxy0">
kkonganti@1 2 <description>An automated workflow to assign Salmonella serotype based on NCBI Pathogen Detection Project for Salmonella.</description>
kkonganti@0 3 <requirements>
kkonganti@1 4 <requirement type="package" version="22.10">nextflow</requirement>
kkonganti@1 5 <requirement type="package" version="1.0.0">micromamba</requirement>
kkonganti@0 6 <requirement type="package">graphviz</requirement>
kkonganti@0 7 </requirements>
kkonganti@0 8 <version_command>nextflow -version</version_command>
kkonganti@0 9 <command detect_errors="exit_code"><![CDATA[
kkonganti@0 10 mkdir -p cpipes-input || exit 1;
kkonganti@0 11 pwd_path=\$(pwd);
kkonganti@0 12 #import re
kkonganti@0 13 #if (str($input_read_type_cond.input_read_type) == "single_long"):
kkonganti@0 14 #for _, $unpaired in enumerate($input_read_type_cond.input):
kkonganti@0 15 #set read1 = str($unpaired.name)
kkonganti@0 16 #if not str($unpaired.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 17 #set read1_ext = re.sub('fastqsanger', 'fastq', str($unpaired.ext))
kkonganti@0 18 #set read1 = str($unpaired.name) + str('.') + $read1_ext
kkonganti@0 19 #end if
kkonganti@0 20 ln -sf '$unpaired' './cpipes-input/$read1';
kkonganti@0 21 #end for
kkonganti@0 22 #elif (str($input_read_type_cond.input_read_type) == "paired"):
kkonganti@0 23 #for _, $pair in enumerate($input_read_type_cond.input_pair)
kkonganti@0 24 #set read_R1 = re.sub('\:forward', '_forward', str($pair.forward.name))
kkonganti@0 25 #set read_R2 = re.sub('\:reverse', '_reverse', str($pair.reverse.name))
kkonganti@0 26 #set read_R1_ext = re.sub('fastqsanger', 'fastq', str($pair.forward.ext))
kkonganti@0 27 #set read_R2_ext = re.sub('fastqsanger', 'fastq', str($pair.reverse.ext))
kkonganti@0 28 #if not str($pair.forward.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 29 #set read_R1 = $read_R1 + str('.') + $read_R1_ext
kkonganti@0 30 #end if
kkonganti@0 31 #if not str($pair.reverse.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 32 #set read_R2 = $read_R2 + str('.') + $read_R2_ext
kkonganti@0 33 #end if
kkonganti@0 34 ln -sf '$pair.forward' './cpipes-input/$read_R1';
kkonganti@0 35 ln -sf '$pair.reverse' './cpipes-input/$read_R2';
kkonganti@0 36 #end for
kkonganti@0 37 #end if
kkonganti@1 38 $__tool_directory__/0.5.0/cpipes
kkonganti@2 39 --pipeline bettercallsal
kkonganti@1 40 --input \${pwd_path}/cpipes-input
kkonganti@0 41 --output \${pwd_path}/cpipes-output
kkonganti@0 42 --fq_suffix '${input_read_type_cond.fq_suffix}'
kkonganti@1 43 #if (str($input_read_type_cond.input_read_type) == "single_long"):
kkonganti@1 44 --fq_single_end true
kkonganti@1 45 #elif (str($input_read_type_cond.input_read_type) == "paired"):
kkonganti@1 46 --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}'
kkonganti@0 47 #end if
kkonganti@1 48 --tuspy_n $tuspy_n
kkonganti@3 49 #if ($sourmash_cond.run == "true"):
kkonganti@4 50 --sfhpy_fcv $sourmash_cond.sfhpy_fcv
kkonganti@1 51 #end if
kkonganti@1 52 --bcs_thresholds $bcs_thresholds
kkonganti@0 53 --fq_filename_delim '${fq_filename_delim}'
kkonganti@0 54 --fq_filename_delim_idx $fq_filename_delim_idx
kkonganti@0 55 -profile kondagac;
kkonganti@2 56 mv './cpipes-output/bettercallsal-multiqc/multiqc_report.html' './multiqc_report.html' > /dev/null 2>&1 || exit 1;
kkonganti@0 57 rm -rf ./cpipes-output > /dev/null 2>&1 || exit 1;
kkonganti@0 58 rm -rf ./work > /dev/null 2>&1 || exit 1
kkonganti@0 59 ]]></command>
kkonganti@0 60 <inputs>
kkonganti@0 61 <conditional name="input_read_type_cond">
kkonganti@0 62 <param name="input_read_type" type="select" label="Select the read collection type">
kkonganti@1 63 <option value="single_long" selected="true">Single-End short reads</option>
kkonganti@1 64 <option value="paired">Paired-End short reads</option>
kkonganti@0 65 </param>
kkonganti@0 66 <when value="single_long">
kkonganti@0 67 <param name="input" type="data_collection" collection_type="list" format="fastq,fastq.gz"
kkonganti@0 68 label="Dataset list of unpaired short reads or long reads" />
kkonganti@1 69 <param name="fq_suffix" value=".fastq.gz" type="text" label="Suffix of the Single-End FASTQ"/>
kkonganti@0 70 </when>
kkonganti@0 71 <when value="paired">
kkonganti@0 72 <param name="input_pair" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz" label="List of Dataset pairs" />
kkonganti@5 73 <param name="fq_suffix" value="_R1_001.fastq.gz" type="text" label="Suffix of the R1 FASTQ"
kkonganti@5 74 help="For any data sets downloaded from NCBI into Galaxy, change this to _forward.fastq.gz suffix."/>
kkonganti@5 75 <param name="fq2_suffix" value="_R2_001.fastq.gz" type="text" label="Suffix of the R2 FASTQ"
kkonganti@6 76 help="For any data sets downloaded from NCBI into Galaxy, change this to _reverse.fastq.gz suffix."/>
kkonganti@0 77 </when>
kkonganti@0 78 </conditional>
kkonganti@2 79 <param name="tuspy_n" optional="true" value="10" type="integer" label="Enter the number of top unique serotypes to retain after initial MASH screen step"
kkonganti@1 80 help="The default value of 10 is suitable for almost all scenarios."/>
kkonganti@2 81 <param name="bcs_thresholds" type="select" label="Enter the type of base quality thresholds to be set with bettercallsal"
kkonganti@1 82 help="The default value sets strictest thresholds that tends to filter out most of the false positive hits.">
kkonganti@1 83 <option value="strict" selected="true">strict</option>
kkonganti@1 84 <option value="relax">relax</option>
kkonganti@1 85 </param>
kkonganti@1 86 <conditional name="sourmash_cond">
kkonganti@1 87 <param name="run" type="select" label="Run sourmash"
kkonganti@2 88 help="Should sourmash be used for additional genome fraction filtering">
kkonganti@1 89 <option value="true" selected="true">yes</option>
kkonganti@1 90 <option value="false">no</option>
kkonganti@1 91 </param>
kkonganti@1 92 <when value="true">
kkonganti@2 93 <param name="sfhpy_fcv" type="text" value="0.1" label="Enter the minimum coverage match with sourmash before a serotype hit is considered for further processing"
kkonganti@1 94 help="The default value is set at 10% coverage threshold."/>
kkonganti@1 95 </when>
kkonganti@1 96 <when value="false">
kkonganti@2 97 <param name="sfhpy_fcv" type="select" label="Enter the minimum coverage match with sourmash before a serotype hit is considered for further processing"
kkonganti@8 98 help="THIS OPTION IS IGNORED IF SOURMASH TOOL IS NOT RUN.">
kkonganti@1 99 <option value="NA" selected="true">N/A</option>
kkonganti@1 100 </param>
kkonganti@1 101 </when>
kkonganti@1 102 </conditional>
kkonganti@0 103 <param name="fq_filename_delim" type="text" value="_" label="File name delimitor by which samples are grouped together (--fq_filename_delim)"
kkonganti@0 104 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 105 <param name="fq_filename_delim_idx" type="integer" value="1" label="File name delimitor index (--fq_filename_delim_idx)" />
kkonganti@0 106 <!-- <param name="runtime_profile" type="select" label="Run time profile">
kkonganti@0 107 <option value="kondagac" selected="true">conda</option>
kkonganti@0 108 <option value="cingularitygac">singularity</option>
kkonganti@0 109 </param> -->
kkonganti@0 110 </inputs>
kkonganti@0 111 <outputs>
kkonganti@2 112 <data name="multiqc_report" format="html" label="bettercallsal: MultiQC Report on ${on_string}" from_work_dir="multiqc_report.html"/>
kkonganti@0 113 </outputs>
kkonganti@0 114 <tests>
kkonganti@0 115 <!--Test 01: long reads-->
kkonganti@0 116 <test expect_num_outputs="2">
kkonganti@0 117 <param name="input">
kkonganti@0 118 <collection type="list">
kkonganti@0 119 <element name="FAL11127.fastq.gz" value="FAL11127.fastq.gz" />
kkonganti@0 120 <element name="FAL11341.fastq.gz" value="FAL11341.fastq.gz" />
kkonganti@0 121 <element name="FAL11342.fastq.gz" value="FAL11342.fastq.gz" />
kkonganti@0 122 </collection>
kkonganti@0 123 </param>
kkonganti@0 124 <param name="fq_suffix" value=".fastq.gz"/>
kkonganti@0 125 <output name="multiqc_report" file="multiqc_report.html" ftype="html" compare="sim_size"/>
kkonganti@0 126 <!-- <output name="assembled_mags" file="FAL11127.assembly_filtered.contigs.fasta" ftype="fasta" compare="sim_size"/> -->
kkonganti@0 127 </test>
kkonganti@0 128 </tests>
kkonganti@0 129 <help><![CDATA[
kkonganti@0 130
kkonganti@0 131 .. class:: infomark
kkonganti@0 132
kkonganti@0 133 **Purpose**
kkonganti@0 134
kkonganti@1 135 bettercallsal is an automated workflow to assign Salmonella serotype based on NCBI Pathogen Detection Project for Salmonella.
kkonganti@1 136 It uses MASH to reduce the search space followed by additional genome filtering with sourmash. It then performs genome based
kkonganti@1 137 alignment with kma followed by count generation using salmon. This workflow can be used to analyze shotgun metagenomics
kkonganti@1 138 datasets, quasi-metagenomic datasets (enriched for Salmonella) and target enriched datasets (enriched with molecular baits specific for Salmonella)
kkonganti@1 139 and is especially useful in a case where a sample is of multi-serovar mixture.
kkonganti@1 140
kkonganti@1 141 It is written in Nextflow and is part of the modular data analysis pipelines (CFSAN PIPELINES or CPIPES for short) at CFSAN.
kkonganti@1 142
kkonganti@0 143
kkonganti@0 144 ----
kkonganti@0 145
kkonganti@0 146 .. class:: infomark
kkonganti@0 147
kkonganti@0 148 **Testing and Validation**
kkonganti@0 149
kkonganti@1 150 The CPIPES - bettercallsal Nextflow pipeline has been wrapped to make it work in Galaxy. It takes in either paired or unpaired short reads list as an input
kkonganti@10 151 and generates a MultiQC report in the final step. The pipeline has been tested on 2x300 bp MiSeq and 2x150 bp NextSeq simulated reads and has been shown to call multiple
kkonganti@1 152 Salmonella serotypes with up to ~95% accuracy. The pipeline has also been tested on metagenomics data sets from Peach and Papaya outbreaks as discussed in
kkonganti@1 153 our preprint (https://www.biorxiv.org/content/10.1101/2023.04.06.535929v1.full). All the original testing and validation was
kkonganti@0 154 done on the command line on the CFSAN Raven2 HPC Cluster.
kkonganti@0 155
kkonganti@0 156
kkonganti@0 157 ----
kkonganti@0 158
kkonganti@0 159 .. class:: infomark
kkonganti@0 160
kkonganti@0 161 **Outputs**
kkonganti@0 162
kkonganti@7 163 The main output file is a:
kkonganti@0 164
kkonganti@0 165 ::
kkonganti@0 166
kkonganti@0 167 - MultiQC Report: Contains a brief summary report including any serotyping and AMR result tables.
kkonganti@0 168 Please note that due to MultiQC customizations, the preview (eye icon) will not
kkonganti@0 169 work within Galaxy for the MultiQC report. Please download the file by clicking
kkonganti@0 170 on the floppy icon and view it in your browser on your local desktop/workstation.
kkonganti@1 171 You can export the tables and plots from the downloaded MultiQC report.
kkonganti@0 172
kkonganti@0 173 ]]></help>
kkonganti@0 174 <citations>
kkonganti@0 175 <citation type="bibtex">
kkonganti@1 176 @misc{bettercallsal,
kkonganti@0 177 author = {Konganti, Kranti},
kkonganti@1 178 year = {2023},
kkonganti@1 179 title = {bettercallsal: better calling of Salmonella serotypes from enrichment cultures using shotgun metagenomic profiling and its application in an outbreak setting},
kkonganti@1 180 publisher = {Cold Spring Harbor Laboratory},
kkonganti@1 181 journal = {bioRxiv},
kkonganti@1 182 url = {https://www.biorxiv.org/content/10.1101/2023.04.06.535929v1.full}}
kkonganti@0 183 </citation>
kkonganti@0 184 </citations>
kkonganti@0 185 </tool>