annotate cfsan_cronology.xml @ 17:b571995ddb51

planemo upload
author kkonganti
date Mon, 15 Jul 2024 19:01:29 -0400
parents 1e6a6e88db16
children
rev   line source
kkonganti@11 1 <tool id="cfsan_cronology" name="cronology" version="0.2.0+galaxy23.1">
kkonganti@0 2 <description>An automated workflow for Cronobacter isolate assembly, sequence typing and traceback.</description>
kkonganti@0 3 <requirements>
kkonganti@11 4 <container type="docker">quay.io/biocontainers/nextflow:24.04.3--hdfd78af_0</container>
kkonganti@0 5 </requirements>
kkonganti@0 6 <version_command>nextflow -version</version_command>
kkonganti@0 7 <command detect_errors="exit_code"><![CDATA[
kkonganti@0 8 mkdir -p cpipes-input || exit 1;
kkonganti@13 9 echo -e 'We attempted to create a tree and upload to microreact.org. The following is the log of that attempt\nand contains the URL if it was successful.\n\n' > upload_to_microreact.txt || exit 1;
kkonganti@0 10 pwd_path=\$(pwd);
kkonganti@0 11 #import re
kkonganti@0 12 #if (str($input_read_type_cond.input_read_type) == "single_long"):
kkonganti@0 13 #for _, $unpaired in enumerate($input_read_type_cond.input):
kkonganti@0 14 #set read1 = str($unpaired.name)
kkonganti@0 15 #if not str($unpaired.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 16 #set read1_ext = re.sub('fastqsanger', 'fastq', str($unpaired.ext))
kkonganti@0 17 #set read1 = str($unpaired.name) + str('.') + $read1_ext
kkonganti@0 18 #end if
kkonganti@0 19 ln -sf '$unpaired' './cpipes-input/$read1';
kkonganti@0 20 #end for
kkonganti@0 21 #elif (str($input_read_type_cond.input_read_type) == "paired"):
kkonganti@0 22 #for _, $pair in enumerate($input_read_type_cond.input_pair)
kkonganti@0 23 #set read_R1 = re.sub('\:forward', '_forward', str($pair.forward.name))
kkonganti@0 24 #set read_R2 = re.sub('\:reverse', '_reverse', str($pair.reverse.name))
kkonganti@0 25 #set read_R1_ext = re.sub('fastqsanger', 'fastq', str($pair.forward.ext))
kkonganti@0 26 #set read_R2_ext = re.sub('fastqsanger', 'fastq', str($pair.reverse.ext))
kkonganti@0 27 #if not str($pair.forward.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 28 #set read_R1 = $read_R1 + str('.') + $read_R1_ext
kkonganti@0 29 #end if
kkonganti@0 30 #if not str($pair.reverse.name).endswith(('.fastq', '.fastq.gz')):
kkonganti@0 31 #set read_R2 = $read_R2 + str('.') + $read_R2_ext
kkonganti@0 32 #end if
kkonganti@0 33 ln -sf '$pair.forward' './cpipes-input/$read_R1';
kkonganti@0 34 ln -sf '$pair.reverse' './cpipes-input/$read_R2';
kkonganti@0 35 #end for
kkonganti@0 36 #end if
kkonganti@13 37 $__tool_directory__/0.2.0/cpipes
kkonganti@0 38 --pipeline cronology
kkonganti@0 39 --input \${pwd_path}/cpipes-input
kkonganti@0 40 --output \${pwd_path}/cpipes-output
kkonganti@0 41 --fq_suffix '${input_read_type_cond.fq_suffix}'
kkonganti@0 42 #if (str($input_read_type_cond.input_read_type) == "single_long"):
kkonganti@0 43 --fq_single_end true
kkonganti@0 44 #elif (str($input_read_type_cond.input_read_type) == "paired"):
kkonganti@0 45 --fq_single_end false --fq2_suffix '${input_read_type_cond.fq2_suffix}'
kkonganti@0 46 #end if
kkonganti@0 47 --ref_acc $refgenome
kkonganti@0 48 --tuspy_n $tuspy_n
kkonganti@0 49 --fq_filename_delim '${fq_filename_delim}'
kkonganti@0 50 --fq_filename_delim_idx $fq_filename_delim_idx
kkonganti@11 51 -profile gxkubernetes;
kkonganti@11 52 mv './cpipes-output/cronology-multiqc/multiqc_report.html' './multiqc_report.html' || exit 1;
kkonganti@13 53 mv './cpipes-output/mashtree/hitsTree.dnd' './hitsTree.newick' || exit 1;
kkonganti@11 54 cat ./cpipes-output/upload_microreact/microreact_url.txt >> upload_to_microreact.txt || 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@12 78 <param name="tuspy_n" optional="true" value="5" 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@11 86 <data name="mashtree" format="nhx" label="cronology: Genome distance based tree on ${on_string}" from_work_dir="hitsTree.newick"/>
kkonganti@11 87 <data name="microreact" format="txt" label="cronology: Tree result from microreact.org ${on_string}" from_work_dir="upload_to_microreact.txt"/>
kkonganti@0 88 <collection name="itol_metadata" type="list" label="cronology: iTOL Metadata: ${on_string}">
kkonganti@3 89 <discover_datasets pattern="(?P&lt;name&gt;.*)\.txt" ext="txt" directory="./cpipes-output/cat_unique" match_relative_path="true" />
kkonganti@0 90 </collection>
kkonganti@0 91 <collection name="gene_models" type="list" label="cronology: Predicted gene models: ${on_string}">
kkonganti@10 92 <discover_datasets pattern=".*\/(?P&lt;name&gt;.*)\.gff" ext="gff" directory="./cpipes-output/prokka" recurse="true" match_relative_path="true" />
kkonganti@0 93 </collection>
kkonganti@0 94 <collection name="assemblies" type="list" label="cronology: Polished genome assemblies: ${on_string}">
kkonganti@3 95 <discover_datasets pattern="(?P&lt;name&gt;.*)\.fa" ext="fa" directory="./cpipes-output/polypolish" match_relative_path="true" />
kkonganti@0 96 </collection>
kkonganti@0 97 </outputs>
kkonganti@0 98 <tests>
kkonganti@0 99 <!--Test 01: long reads-->
kkonganti@0 100 <test expect_num_outputs="2">
kkonganti@0 101 <param name="input">
kkonganti@0 102 <collection type="list">
kkonganti@0 103 <element name="FAL11127.fastq.gz" value="FAL11127.fastq.gz" />
kkonganti@0 104 <element name="FAL11341.fastq.gz" value="FAL11341.fastq.gz" />
kkonganti@0 105 <element name="FAL11342.fastq.gz" value="FAL11342.fastq.gz" />
kkonganti@0 106 </collection>
kkonganti@0 107 </param>
kkonganti@0 108 <param name="fq_suffix" value=".fastq.gz"/>
kkonganti@0 109 <output name="multiqc_report" file="multiqc_report.html" ftype="html" compare="sim_size"/>
kkonganti@0 110 <!-- <output name="assembled_mags" file="FAL11127.assembly_filtered.contigs.fasta" ftype="fasta" compare="sim_size"/> -->
kkonganti@0 111 </test>
kkonganti@0 112 </tests>
kkonganti@0 113 <help><![CDATA[
kkonganti@0 114
kkonganti@0 115 .. class:: infomark
kkonganti@0 116
kkonganti@0 117 **Purpose**
kkonganti@0 118
kkonganti@5 119 cronology is an automated workflow for Cronobacter isolate assembly,
kkonganti@5 120 sequencing typing and traceback. The workflow version 0.1.0 takes in single-end
kkonganti@5 121 or paired-end Illumina short read data, performs QC using fastp, assembly and polish using shovill and polypolish
kkonganti@5 122 and whole genome distance based clustering using mashtree based on NCBI Pathogen Detection DB for Cronobacter.
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@5 133 The CPIPES - cronology Nextflow pipeline has been wrapped to make it work in Galaxy.
kkonganti@1 134 All the testing has been done on the command line on the CFSAN Raven2 HPC Cluster.
kkonganti@0 135
kkonganti@0 136
kkonganti@0 137 ----
kkonganti@0 138
kkonganti@0 139 .. class:: infomark
kkonganti@0 140
kkonganti@0 141 **Outputs**
kkonganti@0 142
kkonganti@1 143 The main output files are:
kkonganti@0 144
kkonganti@0 145 ::
kkonganti@0 146
kkonganti@0 147 - MultiQC Report: Contains a brief summary report including any serotyping and AMR result tables.
kkonganti@0 148 Please note that due to MultiQC customizations, the preview (eye icon) will not
kkonganti@0 149 work within Galaxy for the MultiQC report. Please download the file by clicking
kkonganti@0 150 on the floppy icon and view it in your browser on your local desktop/workstation.
kkonganti@0 151 You can export the tables and plots from the downloaded MultiQC report.
kkonganti@1 152 - Polished de novo assemblies (FASTA) for each sample.
kkonganti@1 153 - Genome annotations (GFF) for each sample.
kkonganti@1 154 - Whole genome distance based clustering tree (Newick).
kkonganti@12 155 - Additional metadata useful for uploading the Newick tree into iTOL.
kkonganti@12 156 - A https://microreact.org URL stored in a TXT file. An attempt will be made to upload the tree (Newick)
kkonganti@12 157 to https://microreact.org and if successful, the URL will be retrieved and stored in this TXT file.
kkonganti@0 158
kkonganti@0 159 ]]></help>
kkonganti@0 160 <citations>
kkonganti@0 161 <citation type="bibtex">
kkonganti@0 162 @article{cronology,
kkonganti@0 163 author = {Konganti, Kranti},
kkonganti@4 164 year = {2024},
kkonganti@4 165 month = {May},
kkonganti@1 166 title = {cronology: An automated workflow for Cronobacter isolate assembly, sequence typing and traceback},
kkonganti@1 167 journal = {Unpublished},
kkonganti@4 168 doi = {xx.xxxx/xxxxx.2024.xxxxxxxxxx},
kkonganti@1 169 url = {https://github.com/CFSAN-Biostatistics/cronology}}
kkonganti@0 170 </citation>
kkonganti@0 171 </citations>
kkonganti@0 172 </tool>