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