diff seqsero2.xml @ 0:93ef4c70ce5f draft default tip

"planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/seqsero2 commit 8b41cf1161ac0f0836f5597167911596b0cfa27e-dirty"
author thanhlv
date Fri, 12 Nov 2021 14:56:56 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/seqsero2.xml	Fri Nov 12 14:56:56 2021 +0000
@@ -0,0 +1,200 @@
+<tool id="seqsero2" name="SeqSero2" version="@VERSION@+galaxy0">
+    <description> Salmonella serotype prediction</description>
+    <macros>
+        <token name="@VERSION@">1.2.1</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@VERSION@">seqsero2</requirement>
+    </requirements>
+    <version_command>SeqSero2_package.py -v</version_command>
+    <command detect_errors="exit_code"><![CDATA[
+    #import re
+    #set $seqsero_input = ''
+    #set $seqsero_t_value = ''
+    #if $inputs.input_type == 'paired':
+        #if $inputs.R1.is_of_type('fastqsanger', 'fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.R1.is_of_type('fastqsanger.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.R1.is_of_type('fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.R1.is_of_type('fastq.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.R1.is_of_type('fasta.gz'):
+            #set $ext = 'fasta.gz'
+        #elif $inputs.R1.is_of_type('fasta'):
+            #set $ext = 'fasta'
+        #end if
+        #set $safename_R1 = re.sub('[^\w\-_\.]', '_', $inputs.R1.element_identifier)
+        #set $safename_R2 = re.sub('[^\w\-_\.]', '_', $inputs.R2.element_identifier)
+        ln -fs '$inputs.R1' $safename_R1.$ext &&
+        ln -fs '$inputs.R2' $safename_R2.$ext &&
+        #set $seqsero_input = $safename_R1 + '.' + $ext + ' ' + $safename_R2 + '.' + $ext
+        #set $seqsero_t_value = '2'
+    #elif $inputs.input_type == 'collection':
+        #for $input in $inputs.input_collection
+            #if $input.forward.is_of_type('fastqsanger', 'fastq'):
+                #set $ext = 'fastq'
+            #elif $input.forward.is_of_type('fastqsanger.gz'):
+                #set $ext = 'fastq.gz'
+            #elif $input.forward.is_of_type('fastq'):
+                #set $ext = 'fastq'
+            #elif $input.forward.is_of_type('fastq.gz'):
+                #set $ext = 'fastq.gz'
+            #elif $input.forward.is_of_type('fasta.gz'):
+                #set $ext = 'fasta.gz'
+            #elif $input.forward.is_of_type('fasta'):
+                #set $ext = 'fasta'
+            #end if
+            #set $safename_fwd = re.sub('[^\w\-_\.]', '_', $input.forward.element_identifier)
+            ln -fs '$input.forward' $safename_fwd.$ext &&
+            #set $safename_rvs = re.sub('[^\w\-_\.]', '_', $input.reverse.element_identifier)
+            ln -fs '$input.reverse' $safename_rvs.$ext &&
+            #set $seqsero_input = $safename_fwd+ '.' + $ext + ' ' + $safename_rvs + '.' + $ext
+            #set $seqsero_t_value = '2'
+        #end for
+    #elif $inputs.input_type == 'assembly':
+        #if $inputs.contigs.is_of_type('fasta.gz'):
+            #set $ext = 'fasta.gz'
+        #elif $inputs.contigs.is_of_type('fasta'):
+            #set $ext = 'fasta'
+        #end if
+        #set $safename_seq = re.sub('[^\w\-_\.]', '_', $contigs.element_identifier)
+        ln -fs '$contigs' $safename_seq.$ext &&
+        #set $seqsero_input = $safename_seq + '.' + $ext
+        #set $seqsero_t_value = '4'
+    #elif $inputs.input_type == 'single':
+        #if $inputs.single.is_of_type('fastqsanger', 'fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.single.is_of_type('fastqsanger.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.single.is_of_type('fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.single.is_of_type('fastq.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.single.is_of_type('fasta.gz'):
+            #set $ext = 'fasta.gz'
+        #elif $inputs.single.is_of_type('fasta'):
+            #set $ext = 'fasta'
+        #end if
+        #set $safename_seq = re.sub('[^\w\-_\.]', '_', $single.element_identifier)
+        ln -fs '$single' $safename_seq.$ext &&
+        #set $seqsero_input = $safename_seq + '.' + $ext
+        #set $seqsero_t_value = '3'
+    #elif $inputs.input_type == 'nanopore':
+        #if $inputs.nanopore.is_of_type('fastqsanger', 'fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.nanopore.is_of_type('fastqsanger.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.nanopore.is_of_type('fastq'):
+            #set $ext = 'fastq'
+        #elif $inputs.nanopore.is_of_type('fastq.gz'):
+            #set $ext = 'fastq.gz'
+        #elif $inputs.nanopore.is_of_type('fasta.gz'):
+            #set $ext = 'fasta.gz'
+        #elif $inputs.nanopore.is_of_type('fasta'):
+            #set $ext = 'fasta'
+        #end if
+        #set $safename_seq = re.sub('[^\w\-_\.]', '_', $nanopore.element_identifier)
+        ln -fs '$nanopore' $safename_seq.$ext &&
+        #set $seqsero_input = $safename_seq + '.' + $ext
+        #set $seqsero_t_value = '5'
+    #end if
+    
+    SeqSero2_package.py 
+    -m $workflow
+    -t $seqsero_t_value
+    -i $seqsero_input
+    -p \${GALAXY_SLOTS:-4}
+    -d output
+    ]]>    </command>
+    <inputs>
+        <conditional name="inputs">
+            <param name="input_type" type="select" label="Input type" help="Select 'paired end' reads or 'sequence' for genomes/contigs">
+                <option value="paired">Paired End</option>
+                <option value="collection">Collection</option>
+                <option value="assembly">Contigs</option>
+                <option value="single">Interleaved</option>
+                <option value="nanopore">Nanopore reads</option>
+            </param>
+            <when value="paired">
+                <param name="R1" type="data" format="fastqsanger,fastqsanger.gz" label="Forward reads (R1)" help="The file of forward reads in FASTQ format"/>
+                <param name="R2" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse reads (R2)" help="The file of reverse reads in FASTQ format"/>
+            </when>
+            <when value="collection">
+                <param name="input_collection" format="fastqsanger" type="data_collection" collection_type="list:paired" label="Paired collection"/>
+            </when>
+            <when value="single">
+                <param name="single" type="data" format="fastqsanger,fastqsanger.gz" multiple="false" label="Interleaved" />
+            </when>
+            <when value="nanopore">
+                <param name="nanopore" type="data" format="fastqsanger,fastqsanger.gz" multiple="false" label="Nanopore reads" />
+            </when>
+            <when value="assembly">
+                <param name="contigs" type="data" format="fasta" multiple="false" label="Contigs/genomes" />
+            </when>
+        </conditional>
+        <param label="Workflow" type="select" name="workflow">
+            <option value="a">allele</option>
+            <option value="k" selected="true">k-mer</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="results" format="tabular" label="${tool.name} on ${on_string} Results" from_work_dir="output/SeqSero_result.tsv"/>
+        <data name="log" format="txt" label="${tool.name} on ${on_string} Log" from_work_dir="output/SeqSero_log.txt"/>
+
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_type" value="assembly" />
+            <param name="contigs" value="CP009102.1.fasta" ftype="fasta" />
+            <output name="results">
+                <assert_contents>
+                    <has_text text="Salmonella enterica subspecies enterica (subspecies I)" />
+                    <has_text text="Typhimurium" />
+                </assert_contents>
+            </output>
+        </test>
+        <!-- TODO: Test for fastq files -->
+     </tests>
+    <help><![CDATA[
+        
+**Usage: SeqSero2_package.py**
+
+-m <string> (which workflow to apply, 'a'(raw reads allele micro-assembly), 'k'(raw reads and genome assembly k-mer), default=a)
+
+-t <string> (input data type, '1' for interleaved paired-end reads, '2' for separated paired-end reads, '3' for single reads, '4' for genome assembly, '5' for nanopore reads (fasta/fastq))
+
+-i <file> (/path/to/input/file)
+
+-p <int> (number of threads for allele mode, if p >4, only 4 threads will be used for assembly since the amount of extracted reads is small, default=1) 
+
+-b <string> (algorithms for bwa mapping for allele mode; 'mem' for mem, 'sam' for samse/sampe; default=mem; optional; for now we only optimized for default "mem" mode)
+
+-d <string> (output directory name)
+
+-c <flag> (if '-c' was flagged, SeqSero2 will only output serotype prediction without the directory containing log files)
+
+-n <string> (optional, to specify a sample name in the report output)
+
+-s <flag> (if '-s' was flagged, SeqSero2 will not output header in `SeqSero_result.tsv`)
+        
+--check <flag> (use '--check' flag to check the required dependencies)
+
+-v, --version (show program's version number and exit)
+
+-----
+
+_`Document`:  https://github.com/denglab/SeqSero2
+
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+        @misc{zhang_yin_jones_zhang_deathrage_dinsmore_fitzgeral_fields_deng_2015, title={Salmonella serotype determination utilizing high-throughput genome sequencing data.}, journal={J Clin Microbiol}, publisher={ASM}, author={Zhang S, Yin Y, Jones MB, Zhang Z, Deatherage Kaiser BL, Dinsmore BA, Fitzgerald C, Fields PI, Deng X.}, year={2015}, month={Max}, url={http://http://jcm.asm.org/content/early/2015/03/05/JCM.00323-15}},
+       }</citation>
+        <citation type="bibtex">
+        @misc{cfsan_biostatistics_group_2017, title={CFSAN Biostatistics Group fork of SeqSero2}, url={https://github.com/CFSAN-Biostatistics/SeqSero2.git}},
+        </citation>
+    </citations>
+
+</tool>