kkonganti@3
|
1 <tool id="cfsan_cronology" name="cronology" version="0.1.0">
|
kkonganti@0
|
2 <description>An automated workflow for Cronobacter isolate assembly, sequence typing and traceback.</description>
|
kkonganti@0
|
3 <requirements>
|
kkonganti@1
|
4 <requirement type="package" version="23.04">nextflow</requirement>
|
kkonganti@1
|
5 <requirement type="package" version="1.0.0">micromamba</requirement>
|
kkonganti@1
|
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@0
|
38 $__tool_directory__/0.1.0/cpipes
|
kkonganti@0
|
39 --pipeline cronology
|
kkonganti@0
|
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@0
|
43 #if (str($input_read_type_cond.input_read_type) == "single_long"):
|
kkonganti@0
|
44 --fq_single_end true
|
kkonganti@0
|
45 #elif (str($input_read_type_cond.input_read_type) == "paired"):
|
kkonganti@0
|
46 --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}'
|
kkonganti@0
|
47 #end if
|
kkonganti@0
|
48 --ref_acc $refgenome
|
kkonganti@0
|
49 --tuspy_n $tuspy_n
|
kkonganti@0
|
50 --fq_filename_delim '${fq_filename_delim}'
|
kkonganti@0
|
51 --fq_filename_delim_idx $fq_filename_delim_idx
|
kkonganti@0
|
52 -profile kondagac;
|
kkonganti@0
|
53 mv './cpipes-output/cronology-multiqc/multiqc_report.html' './multiqc_report.html' > /dev/null 2>&1 || exit 1;
|
kkonganti@0
|
54 mv './cpipes-output/mashtree/hitsTree.dnd' './hitsTree.dnd' > /dev/null 2>&1 || exit 1;
|
kkonganti@0
|
55 ]]></command>
|
kkonganti@0
|
56 <inputs>
|
kkonganti@0
|
57 <conditional name="input_read_type_cond">
|
kkonganti@0
|
58 <param name="input_read_type" type="select" label="Select the read collection type">
|
kkonganti@0
|
59 <option value="single_long" selected="true">Single-End short reads</option>
|
kkonganti@0
|
60 <option value="paired">Paired-End short reads</option>
|
kkonganti@0
|
61 </param>
|
kkonganti@0
|
62 <when value="single_long">
|
kkonganti@0
|
63 <param name="input" type="data_collection" collection_type="list" format="fastq,fastq.gz"
|
kkonganti@0
|
64 label="Dataset list of unpaired short reads or long reads" />
|
kkonganti@0
|
65 <param name="fq_suffix" value=".fastq.gz" type="text" label="Suffix of the Single-End FASTQ"/>
|
kkonganti@0
|
66 </when>
|
kkonganti@0
|
67 <when value="paired">
|
kkonganti@0
|
68 <param name="input_pair" type="data_collection" collection_type="list:paired" format="fastq,fastq.gz" label="List of Dataset pairs" />
|
kkonganti@0
|
69 <param name="fq_suffix" value="_R1_001.fastq.gz" type="text" label="Suffix of the R1 FASTQ"
|
kkonganti@0
|
70 help="For any data sets downloaded from NCBI into Galaxy, change this to _forward.fastq.gz suffix."/>
|
kkonganti@0
|
71 <param name="fq2_suffix" value="_R2_001.fastq.gz" type="text" label="Suffix of the R2 FASTQ"
|
kkonganti@0
|
72 help="For any data sets downloaded from NCBI into Galaxy, change this to _reverse.fastq.gz suffix."/>
|
kkonganti@0
|
73 </when>
|
kkonganti@0
|
74 </conditional>
|
kkonganti@0
|
75 <param name="refgenome" optional="true" value="GCF_003516125" type="text"
|
kkonganti@0
|
76 label="NCBI reference genome accession"
|
kkonganti@3
|
77 help="Is the reference genome other than Cronobacter sakazakii? Reference genome FASTA is used as a model for gene prediction. DO NOT ENTER THE DECIMAL PART (Ex: GCF_003516125.1)." />
|
kkonganti@0
|
78 <param name="tuspy_n" optional="true" value="10" type="integer" label="Enter the number of top unique hits to retain after initial MASH screen step"
|
kkonganti@0
|
79 help="These hits will be used to build a genome distance based tree for your experiment run. Default value of 2 is suitable for almost all scenarios."/>
|
kkonganti@0
|
80 <param name="fq_filename_delim" type="text" value="_" label="File name delimitor by which samples are grouped together (--fq_filename_delim)"
|
kkonganti@0
|
81 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
|
82 <param name="fq_filename_delim_idx" type="integer" value="1" label="File name delimitor index (--fq_filename_delim_idx)" />
|
kkonganti@0
|
83 </inputs>
|
kkonganti@0
|
84 <outputs>
|
kkonganti@0
|
85 <data name="multiqc_report" format="html" label="cronology: MultiQC Report on ${on_string}" from_work_dir="multiqc_report.html"/>
|
kkonganti@0
|
86 <data name="mashtree" format="nwk" label="cronology: Genome distance based tree on ${on_string}" from_work_dir="hitsTree.dnd"/>
|
kkonganti@0
|
87 <collection name="itol_metadata" type="list" label="cronology: iTOL Metadata: ${on_string}">
|
kkonganti@3
|
88 <discover_datasets pattern="(?P<name>.*)\.txt" ext="txt" directory="./cpipes-output/cat_unique" match_relative_path="true" />
|
kkonganti@0
|
89 </collection>
|
kkonganti@0
|
90 <collection name="gene_models" type="list" label="cronology: Predicted gene models: ${on_string}">
|
kkonganti@3
|
91 <discover_datasets pattern="(?P<name>.*)\.gff" ext="gff" directory="./cpipes-output/prokka" recurse="true" match_relative_path="true" />
|
kkonganti@0
|
92 </collection>
|
kkonganti@0
|
93 <collection name="assemblies" type="list" label="cronology: Polished genome assemblies: ${on_string}">
|
kkonganti@3
|
94 <discover_datasets pattern="(?P<name>.*)\.fa" ext="fa" directory="./cpipes-output/polypolish" match_relative_path="true" />
|
kkonganti@0
|
95 </collection>
|
kkonganti@0
|
96 </outputs>
|
kkonganti@0
|
97 <tests>
|
kkonganti@0
|
98 <!--Test 01: long reads-->
|
kkonganti@0
|
99 <test expect_num_outputs="2">
|
kkonganti@0
|
100 <param name="input">
|
kkonganti@0
|
101 <collection type="list">
|
kkonganti@0
|
102 <element name="FAL11127.fastq.gz" value="FAL11127.fastq.gz" />
|
kkonganti@0
|
103 <element name="FAL11341.fastq.gz" value="FAL11341.fastq.gz" />
|
kkonganti@0
|
104 <element name="FAL11342.fastq.gz" value="FAL11342.fastq.gz" />
|
kkonganti@0
|
105 </collection>
|
kkonganti@0
|
106 </param>
|
kkonganti@0
|
107 <param name="fq_suffix" value=".fastq.gz"/>
|
kkonganti@0
|
108 <output name="multiqc_report" file="multiqc_report.html" ftype="html" compare="sim_size"/>
|
kkonganti@0
|
109 <!-- <output name="assembled_mags" file="FAL11127.assembly_filtered.contigs.fasta" ftype="fasta" compare="sim_size"/> -->
|
kkonganti@0
|
110 </test>
|
kkonganti@0
|
111 </tests>
|
kkonganti@0
|
112 <help><![CDATA[
|
kkonganti@0
|
113
|
kkonganti@0
|
114 .. class:: infomark
|
kkonganti@0
|
115
|
kkonganti@0
|
116 **Purpose**
|
kkonganti@0
|
117
|
kkonganti@0
|
118 cronology is an automated workflow to assign Salmonella serotype based on NCBI Pathogen Detection Project for Salmonella.
|
kkonganti@0
|
119 It uses MASH to reduce the search space followed by additional genome filtering with sourmash. It then performs genome based
|
kkonganti@0
|
120 alignment with kma followed by count generation using salmon. This workflow can be used to analyze shotgun metagenomics
|
kkonganti@0
|
121 datasets, quasi-metagenomic datasets (enriched for Salmonella) and target enriched datasets (enriched with molecular baits specific for Salmonella)
|
kkonganti@0
|
122 and is especially useful in a case where a sample is of multi-serovar mixture.
|
kkonganti@0
|
123
|
kkonganti@0
|
124 It is written in Nextflow and is part of the modular data analysis pipelines (CFSAN PIPELINES or CPIPES for short) at CFSAN.
|
kkonganti@0
|
125
|
kkonganti@0
|
126
|
kkonganti@0
|
127 ----
|
kkonganti@0
|
128
|
kkonganti@0
|
129 .. class:: infomark
|
kkonganti@0
|
130
|
kkonganti@0
|
131 **Testing and Validation**
|
kkonganti@0
|
132
|
kkonganti@0
|
133 The CPIPES - cronology 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@1
|
134 and performs read quality control followed by de novo assembly, gene prediction and annotation, sequence typing and whole genome distance based clustering.
|
kkonganti@1
|
135 All the testing has been done on the command line on the CFSAN Raven2 HPC Cluster.
|
kkonganti@0
|
136
|
kkonganti@0
|
137
|
kkonganti@0
|
138 ----
|
kkonganti@0
|
139
|
kkonganti@0
|
140 .. class:: infomark
|
kkonganti@0
|
141
|
kkonganti@0
|
142 **Outputs**
|
kkonganti@0
|
143
|
kkonganti@1
|
144 The main output files are:
|
kkonganti@0
|
145
|
kkonganti@0
|
146 ::
|
kkonganti@0
|
147
|
kkonganti@0
|
148 - MultiQC Report: Contains a brief summary report including any serotyping and AMR result tables.
|
kkonganti@0
|
149 Please note that due to MultiQC customizations, the preview (eye icon) will not
|
kkonganti@0
|
150 work within Galaxy for the MultiQC report. Please download the file by clicking
|
kkonganti@0
|
151 on the floppy icon and view it in your browser on your local desktop/workstation.
|
kkonganti@0
|
152 You can export the tables and plots from the downloaded MultiQC report.
|
kkonganti@1
|
153 - Polished de novo assemblies (FASTA) for each sample.
|
kkonganti@1
|
154 - Genome annotations (GFF) for each sample.
|
kkonganti@1
|
155 - Whole genome distance based clustering tree (Newick).
|
kkonganti@1
|
156 - Additional metadata useful for uploading the Newick tree into iTOL.
|
kkonganti@0
|
157
|
kkonganti@0
|
158 ]]></help>
|
kkonganti@0
|
159 <citations>
|
kkonganti@0
|
160 <citation type="bibtex">
|
kkonganti@0
|
161 @article{cronology,
|
kkonganti@0
|
162 author = {Konganti, Kranti},
|
kkonganti@0
|
163 year = {2023},
|
kkonganti@0
|
164 month = {August},
|
kkonganti@1
|
165 title = {cronology: An automated workflow for Cronobacter isolate assembly, sequence typing and traceback},
|
kkonganti@1
|
166 journal = {Unpublished},
|
kkonganti@1
|
167 doi = {10.3389/fmicb.2023.120098312},
|
kkonganti@1
|
168 url = {https://github.com/CFSAN-Biostatistics/cronology}}
|
kkonganti@0
|
169 </citation>
|
kkonganti@0
|
170 </citations>
|
kkonganti@0
|
171 </tool>
|