kkonganti@17
|
1 <tool id="cfsan_bettercallsal" name="bettercallsal" version="0.7.0+galaxy23.1">
|
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@21
|
4 <container type="docker">quay.io/biocontainers/nextflow:24.04.3--hdfd78af_0</container>
|
kkonganti@17
|
5 </requirements>
|
kkonganti@0
|
6 <version_command>nextflow -version</version_command>
|
kkonganti@0
|
7 <command detect_errors="exit_code"><![CDATA[
|
kkonganti@17
|
8 input_path=\$(pwd)"/cpipes-input";
|
kkonganti@17
|
9 mkdir -p "\${input_path}" || exit 1;
|
kkonganti@0
|
10 #import re
|
kkonganti@0
|
11 #if (str($input_read_type_cond.input_read_type) == "single_long"):
|
kkonganti@0
|
12 #for _, $unpaired in enumerate($input_read_type_cond.input):
|
kkonganti@0
|
13 #set read1 = str($unpaired.name)
|
kkonganti@0
|
14 #if not str($unpaired.name).endswith(('.fastq', '.fastq.gz')):
|
kkonganti@0
|
15 #set read1_ext = re.sub('fastqsanger', 'fastq', str($unpaired.ext))
|
kkonganti@0
|
16 #set read1 = str($unpaired.name) + str('.') + $read1_ext
|
kkonganti@0
|
17 #end if
|
kkonganti@17
|
18 ln -sf '$unpaired' "\${input_path}/$read1";
|
kkonganti@0
|
19 #end for
|
kkonganti@0
|
20 #elif (str($input_read_type_cond.input_read_type) == "paired"):
|
kkonganti@0
|
21 #for _, $pair in enumerate($input_read_type_cond.input_pair)
|
kkonganti@0
|
22 #set read_R1 = re.sub('\:forward', '_forward', str($pair.forward.name))
|
kkonganti@0
|
23 #set read_R2 = re.sub('\:reverse', '_reverse', str($pair.reverse.name))
|
kkonganti@0
|
24 #set read_R1_ext = re.sub('fastqsanger', 'fastq', str($pair.forward.ext))
|
kkonganti@0
|
25 #set read_R2_ext = re.sub('fastqsanger', 'fastq', str($pair.reverse.ext))
|
kkonganti@0
|
26 #if not str($pair.forward.name).endswith(('.fastq', '.fastq.gz')):
|
kkonganti@0
|
27 #set read_R1 = $read_R1 + str('.') + $read_R1_ext
|
kkonganti@0
|
28 #end if
|
kkonganti@0
|
29 #if not str($pair.reverse.name).endswith(('.fastq', '.fastq.gz')):
|
kkonganti@0
|
30 #set read_R2 = $read_R2 + str('.') + $read_R2_ext
|
kkonganti@0
|
31 #end if
|
kkonganti@17
|
32 ln -sf '$pair.forward' "\${input_path}/$read_R1";
|
kkonganti@17
|
33 ln -sf '$pair.reverse' "\${input_path}/$read_R2";
|
kkonganti@0
|
34 #end for
|
kkonganti@0
|
35 #end if
|
kkonganti@17
|
36 $__tool_directory__/0.7.0/cpipes
|
kkonganti@2
|
37 --pipeline bettercallsal
|
kkonganti@17
|
38 --input \${input_path}
|
kkonganti@19
|
39 --output cpipes-output
|
kkonganti@0
|
40 --fq_suffix '${input_read_type_cond.fq_suffix}'
|
kkonganti@1
|
41 #if (str($input_read_type_cond.input_read_type) == "single_long"):
|
kkonganti@1
|
42 --fq_single_end true
|
kkonganti@1
|
43 #elif (str($input_read_type_cond.input_read_type) == "paired"):
|
kkonganti@1
|
44 --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}'
|
kkonganti@0
|
45 #end if
|
kkonganti@1
|
46 --tuspy_n $tuspy_n
|
kkonganti@3
|
47 #if ($sourmash_cond.run == "true"):
|
kkonganti@4
|
48 --sfhpy_fcv $sourmash_cond.sfhpy_fcv
|
kkonganti@1
|
49 #end if
|
kkonganti@17
|
50 #if ($bcs_thresholds != 'relax'):
|
kkonganti@17
|
51 --kmaalign_ID $kma_id
|
kkonganti@17
|
52 #end if
|
kkonganti@17
|
53 #if ($sourmash_cond.run == "true"):
|
kkonganti@17
|
54 --sfhpy_fcv $sourmash_cond.sfhpy_fcv
|
kkonganti@17
|
55 #end if
|
kkonganti@11
|
56 --bcs_db_mode $bcs_db_mode
|
kkonganti@1
|
57 --bcs_thresholds $bcs_thresholds
|
kkonganti@0
|
58 --fq_filename_delim '${fq_filename_delim}'
|
kkonganti@0
|
59 --fq_filename_delim_idx $fq_filename_delim_idx
|
kkonganti@17
|
60 -profile gxkubernetes;
|
kkonganti@17
|
61 mv './cpipes-output/bettercallsal-multiqc/multiqc_report.html' './multiqc_report.html' || exit 1;
|
kkonganti@19
|
62 rm -rf ./cpipes-output || exit 1;
|
kkonganti@19
|
63 rm -rf ./work || exit 1;
|
kkonganti@0
|
64 ]]></command>
|
kkonganti@0
|
65 <inputs>
|
kkonganti@0
|
66 <conditional name="input_read_type_cond">
|
kkonganti@0
|
67 <param name="input_read_type" type="select" label="Select the read collection type">
|
kkonganti@1
|
68 <option value="single_long" selected="true">Single-End short reads</option>
|
kkonganti@1
|
69 <option value="paired">Paired-End short reads</option>
|
kkonganti@0
|
70 </param>
|
kkonganti@0
|
71 <when value="single_long">
|
kkonganti@0
|
72 <param name="input" type="data_collection" collection_type="list" format="fastq,fastq.gz"
|
kkonganti@0
|
73 label="Dataset list of unpaired short reads or long reads" />
|
kkonganti@1
|
74 <param name="fq_suffix" value=".fastq.gz" type="text" label="Suffix of the Single-End FASTQ"/>
|
kkonganti@0
|
75 </when>
|
kkonganti@0
|
76 <when value="paired">
|
kkonganti@0
|
77 <param name="input_pair" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz" label="List of Dataset pairs" />
|
kkonganti@5
|
78 <param name="fq_suffix" value="_R1_001.fastq.gz" type="text" label="Suffix of the R1 FASTQ"
|
kkonganti@5
|
79 help="For any data sets downloaded from NCBI into Galaxy, change this to _forward.fastq.gz suffix."/>
|
kkonganti@5
|
80 <param name="fq2_suffix" value="_R2_001.fastq.gz" type="text" label="Suffix of the R2 FASTQ"
|
kkonganti@6
|
81 help="For any data sets downloaded from NCBI into Galaxy, change this to _reverse.fastq.gz suffix."/>
|
kkonganti@0
|
82 </when>
|
kkonganti@0
|
83 </conditional>
|
kkonganti@11
|
84 <param name="bcs_db_mode" type="select" label="Select the database mode with bettercallsal"
|
kkonganti@11
|
85 help="Refer to `Database generation` section in our manuscript: https://doi.org/10.3389/fmicb.2023.1200983">
|
kkonganti@11
|
86 <option value="snp" selected="true">per_snp_cluster</option>
|
kkonganti@11
|
87 <option value="comp">per_computed_type</option>
|
kkonganti@11
|
88 </param>
|
kkonganti@2
|
89 <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
|
90 help="The default value of 10 is suitable for almost all scenarios."/>
|
kkonganti@2
|
91 <param name="bcs_thresholds" type="select" label="Enter the type of base quality thresholds to be set with bettercallsal"
|
kkonganti@1
|
92 help="The default value sets strictest thresholds that tends to filter out most of the false positive hits.">
|
kkonganti@1
|
93 <option value="strict" selected="true">strict</option>
|
kkonganti@1
|
94 <option value="relax">relax</option>
|
kkonganti@1
|
95 </param>
|
kkonganti@17
|
96 <param name="kma_id" optional="true" value="10.0" type="text" label="Enter the %ID threshold for KMA alignments of samples against genomes"
|
kkonganti@17
|
97 help="The default value of 10% works well for enrichment samples tested within FDA. The 'relax' preset for base quality thresholds automatically sets this value to 5%."/>
|
kkonganti@1
|
98 <conditional name="sourmash_cond">
|
kkonganti@1
|
99 <param name="run" type="select" label="Run sourmash"
|
kkonganti@2
|
100 help="Should sourmash be used for additional genome fraction filtering">
|
kkonganti@1
|
101 <option value="true" selected="true">yes</option>
|
kkonganti@1
|
102 <option value="false">no</option>
|
kkonganti@1
|
103 </param>
|
kkonganti@1
|
104 <when value="true">
|
kkonganti@2
|
105 <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
|
106 help="The default value is set at 10% coverage threshold."/>
|
kkonganti@1
|
107 </when>
|
kkonganti@1
|
108 <when value="false">
|
kkonganti@2
|
109 <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
|
110 help="THIS OPTION IS IGNORED IF SOURMASH TOOL IS NOT RUN.">
|
kkonganti@1
|
111 <option value="NA" selected="true">N/A</option>
|
kkonganti@1
|
112 </param>
|
kkonganti@1
|
113 </when>
|
kkonganti@1
|
114 </conditional>
|
kkonganti@0
|
115 <param name="fq_filename_delim" type="text" value="_" label="File name delimitor by which samples are grouped together (--fq_filename_delim)"
|
kkonganti@0
|
116 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
|
117 <param name="fq_filename_delim_idx" type="integer" value="1" label="File name delimitor index (--fq_filename_delim_idx)" />
|
kkonganti@0
|
118 <!-- <param name="runtime_profile" type="select" label="Run time profile">
|
kkonganti@0
|
119 <option value="kondagac" selected="true">conda</option>
|
kkonganti@0
|
120 <option value="cingularitygac">singularity</option>
|
kkonganti@0
|
121 </param> -->
|
kkonganti@0
|
122 </inputs>
|
kkonganti@0
|
123 <outputs>
|
kkonganti@2
|
124 <data name="multiqc_report" format="html" label="bettercallsal: MultiQC Report on ${on_string}" from_work_dir="multiqc_report.html"/>
|
kkonganti@0
|
125 </outputs>
|
kkonganti@0
|
126 <tests>
|
kkonganti@0
|
127 <!--Test 01: long reads-->
|
kkonganti@0
|
128 <test expect_num_outputs="2">
|
kkonganti@0
|
129 <param name="input">
|
kkonganti@0
|
130 <collection type="list">
|
kkonganti@0
|
131 <element name="FAL11127.fastq.gz" value="FAL11127.fastq.gz" />
|
kkonganti@0
|
132 <element name="FAL11341.fastq.gz" value="FAL11341.fastq.gz" />
|
kkonganti@0
|
133 <element name="FAL11342.fastq.gz" value="FAL11342.fastq.gz" />
|
kkonganti@0
|
134 </collection>
|
kkonganti@0
|
135 </param>
|
kkonganti@0
|
136 <param name="fq_suffix" value=".fastq.gz"/>
|
kkonganti@0
|
137 <output name="multiqc_report" file="multiqc_report.html" ftype="html" compare="sim_size"/>
|
kkonganti@0
|
138 <!-- <output name="assembled_mags" file="FAL11127.assembly_filtered.contigs.fasta" ftype="fasta" compare="sim_size"/> -->
|
kkonganti@0
|
139 </test>
|
kkonganti@0
|
140 </tests>
|
kkonganti@0
|
141 <help><![CDATA[
|
kkonganti@0
|
142
|
kkonganti@0
|
143 .. class:: infomark
|
kkonganti@0
|
144
|
kkonganti@0
|
145 **Purpose**
|
kkonganti@0
|
146
|
kkonganti@1
|
147 bettercallsal is an automated workflow to assign Salmonella serotype based on NCBI Pathogen Detection Project for Salmonella.
|
kkonganti@1
|
148 It uses MASH to reduce the search space followed by additional genome filtering with sourmash. It then performs genome based
|
kkonganti@1
|
149 alignment with kma followed by count generation using salmon. This workflow can be used to analyze shotgun metagenomics
|
kkonganti@1
|
150 datasets, quasi-metagenomic datasets (enriched for Salmonella) and target enriched datasets (enriched with molecular baits specific for Salmonella)
|
kkonganti@1
|
151 and is especially useful in a case where a sample is of multi-serovar mixture.
|
kkonganti@1
|
152
|
kkonganti@1
|
153 It is written in Nextflow and is part of the modular data analysis pipelines (CFSAN PIPELINES or CPIPES for short) at CFSAN.
|
kkonganti@1
|
154
|
kkonganti@0
|
155
|
kkonganti@0
|
156 ----
|
kkonganti@0
|
157
|
kkonganti@0
|
158 .. class:: infomark
|
kkonganti@0
|
159
|
kkonganti@0
|
160 **Testing and Validation**
|
kkonganti@0
|
161
|
kkonganti@1
|
162 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@17
|
163 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@17
|
164 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@17
|
165 our publication (https://www.frontiersin.org/articles/10.3389/fmicb.2023.1200983/full). All the original testing and validation was
|
kkonganti@17
|
166 done on the command line on the CFSAN Raven2 HPC Cluster.
|
kkonganti@0
|
167
|
kkonganti@0
|
168
|
kkonganti@0
|
169 ----
|
kkonganti@0
|
170
|
kkonganti@0
|
171 .. class:: infomark
|
kkonganti@0
|
172
|
kkonganti@0
|
173 **Outputs**
|
kkonganti@0
|
174
|
kkonganti@7
|
175 The main output file is a:
|
kkonganti@0
|
176
|
kkonganti@0
|
177 ::
|
kkonganti@0
|
178
|
kkonganti@0
|
179 - MultiQC Report: Contains a brief summary report including any serotyping and AMR result tables.
|
kkonganti@0
|
180 Please note that due to MultiQC customizations, the preview (eye icon) will not
|
kkonganti@0
|
181 work within Galaxy for the MultiQC report. Please download the file by clicking
|
kkonganti@0
|
182 on the floppy icon and view it in your browser on your local desktop/workstation.
|
kkonganti@1
|
183 You can export the tables and plots from the downloaded MultiQC report.
|
kkonganti@0
|
184
|
kkonganti@0
|
185 ]]></help>
|
kkonganti@0
|
186 <citations>
|
kkonganti@0
|
187 <citation type="bibtex">
|
kkonganti@11
|
188 @article{bettercallsal,
|
kkonganti@0
|
189 author = {Konganti, Kranti},
|
kkonganti@1
|
190 year = {2023},
|
kkonganti@11
|
191 month = {August},
|
kkonganti@1
|
192 title = {bettercallsal: better calling of Salmonella serotypes from enrichment cultures using shotgun metagenomic profiling and its application in an outbreak setting},
|
kkonganti@11
|
193 journal = {Frontiers in Microbiology},
|
kkonganti@11
|
194 doi = {10.3389/fmicb.2023.1200983},
|
kkonganti@11
|
195 url = {https://www.frontiersin.org/articles/10.3389/fmicb.2023.1200983/full}}
|
kkonganti@0
|
196 </citation>
|
kkonganti@0
|
197 </citations>
|
kkonganti@0
|
198 </tool>
|