annotate csp2-screen.xml @ 73:c298ec56f92a tip

planemo upload commit b994a89d6a095cfa1d70d02a01bd696db33d5ab6-dirty
author jpayne
date Mon, 24 Mar 2025 00:47:38 -0400
parents 33d812a61356
children
rev   line source
jpayne@69 1 <tool id="csp2-screen" name="CSP2 (Screening Mode)" version="0.9.7_Dev21">
jpayne@69 2 <description>Screen query assemblies against reference assemblies</description>
jpayne@69 3 <requirements>
jpayne@69 4 <!-- <requirement type="package" version="24.10.1">nextflow</requirement>
jpayne@69 5 <requirement type="package" version="1.5.8">micromamba</requirement> -->
jpayne@69 6 <container type="docker">cfsanbiostatistics/csp2:v.0.9.7.4</container>
jpayne@69 7 </requirements>
jpayne@69 8 <version_command>nextflow -version</version_command>
jpayne@69 9 <command detect_errors="exit_code"><![CDATA[
jpayne@69 10 mkdir -p queries references
jpayne@69 11 #set readext=""
jpayne@69 12 #for $reads in $query.coll
jpayne@69 13 #if $hasattr($reads, "is_of_type") and $reads.is_of_type("fasta")
jpayne@69 14 && ln -sf ${reads} 'queries/${reads.element_identifier}.fasta'
jpayne@69 15 #else if $reads.forward.is_of_type("fastq.gz","fastqsanger.gz")
jpayne@69 16 #set readext="fastq.gz"
jpayne@69 17 && ln -sf '${reads.forward}' 'queries/${reads.forward.element_identifier}_1.fastq.gz'
jpayne@69 18 && ln -sf '${reads.reverse}' 'queries/${reads.reverse.element_identifier}_2.fastq.gz'
jpayne@69 19 #else if $reads.forward.is_of_type("fastq.bz2", "fastqsanger.bz2")
jpayne@69 20 #set readext="fastq.bz2"
jpayne@69 21 && ln -sf '${reads.forward}' 'queries/${reads.forward.element_identifier}_1.fastq.bz2'
jpayne@69 22 && ln -sf '${reads.reverse}' 'queries/${reads.reverse.element_identifier}_2.fastq.bz2'
jpayne@69 23 #else
jpayne@69 24 #set readext="fastq"
jpayne@69 25 && ln -sf '${reads.forward}' 'queries/${reads.forward.element_identifier}_1.fastq'
jpayne@69 26 && ln -sf '${reads.reverse}' 'queries/${reads.reverse.element_identifier}_2.fastq'
jpayne@69 27 #end if
jpayne@69 28 #end for
jpayne@69 29 && echo "*** Files in queries directory: ***"
jpayne@69 30 && ls -lah queries/
jpayne@69 31 && ln -sf '$source.reference' 'references/${source.reference.element_identifier}.fasta'
jpayne@69 32 && nextflow run
jpayne@69 33 ${__tool_directory__}/CSP2/CSP2.nf -profile csp2_galaxy
jpayne@69 34 --runmode screen
jpayne@69 35 #if $query.query_select == 'reads'
jpayne@69 36 --reads queries
jpayne@69 37 --readext $readext
jpayne@69 38 --forward "_1.${readext}"
jpayne@69 39 --reverse "_2.${readext}"
jpayne@69 40 #else
jpayne@69 41 --fasta queries
jpayne@69 42 #end if
jpayne@69 43 --ref_fasta 'references/${source.reference.element_identifier}.fasta'
jpayne@69 44 --min_cov $opt.min_cov
jpayne@69 45 --min_iden $opt.min_iden
jpayne@69 46 --min_len $opt.min_len
jpayne@69 47 --ref_edge $opt.ref_edge
jpayne@69 48 --query_edge $opt.query_edge
jpayne@69 49 --dwin $opt.dwin
jpayne@69 50 --wsnps $opt.wsnps
jpayne@69 51 --out CSP2_Screen_Output
jpayne@69 52 && echo "*** Files in output directory: ***"
jpayne@69 53 && ls -lah CSP2_Screen_Output
jpayne@69 54 && echo "*** Nextflow log follows: ***"
jpayne@69 55 && cat .nextflow.log
jpayne@69 56 ]]>
jpayne@69 57 </command>
jpayne@69 58 <inputs>
jpayne@69 59 <conditional name="source">
jpayne@69 60 <param name="source_select" type="select" label="Use a curated GalaxyTrakr reference or a reference from your history">
jpayne@69 61 <option value="curated">Use a GalaxyTrakr reference</option>
jpayne@69 62 <option value="history">Use a reference from your history</option>
jpayne@69 63 </param>
jpayne@69 64 <when value="curated">
jpayne@69 65 <param name="reference" type="select" label="Select reference fasta">
jpayne@69 66 <options from_data_table="all_fasta">
jpayne@69 67 <filter type="sort_by" column="2"/>
jpayne@69 68 <validator type="no_options" message="No assemblies are available for the selected input dataset"/>
jpayne@69 69 </options>
jpayne@69 70 </param>
jpayne@69 71 </when>
jpayne@69 72 <when value="history">
jpayne@69 73 <param type="data" name="reference" format="fasta" label="Select reference FASTA"/>
jpayne@69 74 </when>
jpayne@69 75 </conditional>
jpayne@69 76 <conditional name="query">
jpayne@69 77 <param name="query_select" type="select" label="Screen a list of paired-end reads or a list of assemblies">
jpayne@69 78 <option value="reads">Screen a list of paired reads</option>
jpayne@69 79 <option value="assemblies">Screen a list of assemblies</option>
jpayne@69 80 </param>
jpayne@69 81 <when value="reads">
jpayne@69 82 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="list:paired" />
jpayne@69 83 </when>
jpayne@69 84 <when value="assemblies">
jpayne@69 85 <param label="Assemblies" name="coll" type="data_collection" format="fasta" collection_type="list" />
jpayne@69 86 </when>
jpayne@69 87 </conditional>
jpayne@69 88 <section name="opt" title="Advanced options...">
jpayne@69 89 <param argument="--min_cov" name="min_cov" type="float" value="85" label="Minimum reference genome coverage to proceed with distance estimation" />
jpayne@69 90 <param argument="--min_eden" name="min_iden" type="float" value="99" label="Minimum alignment percent identity to detect SNPs" />
jpayne@69 91 <param argument="--min_len" name="min_len" type="integer" value="500" label="Minimum alignment length to detect SNPs" />
jpayne@69 92 <param argument="--ref_edge" name="ref_edge" type="integer" value="150" label="Prune SNPs within this many bases of reference contig edge" />
jpayne@69 93 <param argument="--query_edge" name="query_edge" type="integer" value="150" label="Prune SNPs within this many bases of query contig edge" />
jpayne@69 94 <param argument="--dwin" name="dwin" type="text" value="1000,125,15" label="Comma-separated set of window sizes for SNP density filtration (Set to 0 to disable density filtration)" />
jpayne@69 95 <param argument="--wsnips" name="wsnps" type="text" value="3,2,1" label="Comma-separated list of maximum SNP counts per density window" />
jpayne@69 96 </section>
jpayne@69 97 </inputs>
jpayne@69 98 <outputs>
jpayne@69 99 <data name="raw_mummer" format="tabular" label="Raw MUMmer Output" from_work_dir="CSP2_Screen_Output/Raw_MUMmer_Summary.tsv" />
jpayne@69 100 <data name="isolate_data" format="tabular" label="Isolate Data" from_work_dir="CSP2_Screen_Output/Isolate_Data.tsv" />
jpayne@69 101 <data name="screening_results" format="tabular" label="Screening Results" from_work_dir="CSP2_Screen_Output/Screening_Results.tsv" />
jpayne@69 102 <!-- <data name="nextflow_log" format="txt" label="Nextflow Log" from_work_dir="Nextflow_Log.txt" /> -->
jpayne@69 103 </outputs>
jpayne@69 104 <tests>
jpayne@69 105 <test>
jpayne@69 106 <param name="source_select" value="history" />
jpayne@69 107 <param name="reference" value="assemblies/Sample_A.fasta" ftype="fasta" />
jpayne@69 108 <param name="query_select" value="assemblies" />
jpayne@69 109 <param name="coll">
jpayne@69 110 <collection type="list">
jpayne@69 111 <!-- <element name="Sample_A" value="assemblies/Sample_A.fasta" /> -->
jpayne@69 112 <element name="Sample_B" value="assemblies/Sample_B.fasta" />
jpayne@69 113 <element name="Sample_C" value="assemblies/Sample_C.fasta" />
jpayne@69 114 <element name="Sample_D" value="assemblies/Sample_D.fasta" />
jpayne@69 115 <element name="Sample_E" value="assemblies/Sample_E.fasta" />
jpayne@69 116 <element name="Sample_F" value="assemblies/Sample_F.fasta" />
jpayne@69 117 <element name="Sample_G" value="assemblies/Sample_G.fasta" />
jpayne@69 118 <element name="Sample_H" value="assemblies/Sample_H.fasta" />
jpayne@69 119 <element name="Sample_I" value="assemblies/Sample_I.fasta" />
jpayne@69 120 <element name="Sample_J" value="assemblies/Sample_J.fasta" />
jpayne@69 121 <element name="Sample_K" value="assemblies/Sample_K.fasta" />
jpayne@69 122 <element name="Sample_L" value="assemblies/Sample_L.fasta" />
jpayne@69 123 <element name="Sample_M" value="assemblies/Sample_M.fasta" />
jpayne@69 124 <element name="Sample_N" value="assemblies/Sample_N.fasta" />
jpayne@69 125 <element name="Sample_O" value="assemblies/Sample_O.fasta" />
jpayne@69 126 </collection>
jpayne@69 127 </param>
jpayne@69 128
jpayne@69 129 <output name="screening_results" value="Screening_Results.tsv" />
jpayne@69 130 <output name="isolate_data" value="Isolate_Data.tsv" />
jpayne@69 131 </test>
jpayne@69 132 <test>
jpayne@69 133 <param name="source_select" value="history" />
jpayne@69 134 <param name="reference" value="assemblies/Sample_A.fasta" ftype="fasta" />
jpayne@69 135 <param name="query_select" value="reads" />
jpayne@69 136 <param name="coll">
jpayne@69 137 <collection type="list:paired">
jpayne@69 138 <element name="Sample_A" >
jpayne@69 139 <collection type="paired">
jpayne@69 140 <element name="forward" value="reads/Week_42_Reads_1.fq.gz" ftype="fastqsanger.gz" />
jpayne@69 141 <element name="reverse" value="reads/Week_42_Reads_2.fq.gz" ftype="fastqsanger.gz" />
jpayne@69 142 </collection>
jpayne@69 143 </element>
jpayne@69 144 </collection>
jpayne@69 145 </param>
jpayne@69 146 <output name="screening_results" value="Screening_Results.tsv" />
jpayne@69 147 <output name="isolate_data" value="Isolate_Data.tsv" />
jpayne@69 148 </test>
jpayne@69 149 </tests>
jpayne@69 150 <help>
jpayne@69 151 This tool takes query assemblies and reference assemblies and calculates the pairwise distance between each query/reference combination. If no reference is provided, all queries are compared to all other queries.
jpayne@69 152 </help>
jpayne@69 153 <citations>
jpayne@69 154 <citation type="doi">10.XXXX/placeholder.doi</citation>
jpayne@69 155 <citation type="bibtex">@article{example2024,title={CFSAN SNP Pipeline 2 (CSP2): a pipeline for fast and accurate SNP distance estimation from bacterial genome assemblies.},author={Doe, John and Smith, Jane},journal={Submitted},year={2024}}
jpayne@69 156 </citation>
jpayne@69 157 </citations>
jpayne@69 158 </tool>