comparison seqsero2.xml @ 0:f7f22f0db880 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqsero2 commit eaa07f4ff143aeba209c9efdf5f6ffb292119eb0
author iuc
date Mon, 06 Oct 2025 14:53:34 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f7f22f0db880
1 <tool id="seqsero2" name="SeqSero2" version="@TOOL_VERSION@+galaxy0" profile="21.05">
2 <description>Salmonella serotype prediction</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="xrefs" />
7 <expand macro="requirements" />
8 <version_command>SeqSero2_package.py -v</version_command>
9 <command detect_errors="exit_code"><![CDATA[
10 #import re
11 #set $seqsero_t_value = ''
12 #set $seqsero_workflow_type = ''
13
14 #if str($input_type_cond.input_type) in ['single', 'paired', 'assembly', 'nanopore']:
15 #set read1 = $input_type_cond.read1
16
17 #if str($input_type_cond.input_type) in ['assembly', 'nanopore']:
18 #set ext = '.fasta'
19 #else:
20 #set ext = '.fastq'
21 #end if
22 #if $read1.ext.endswith('.gz'):
23 #set ext = $ext+'.gz'
24 #end if
25
26 #if str($input_type_cond.input_type) == 'paired':
27 #set read1_file = re.sub('[^\w\-\.]', '_', str($read1.element_identifier)) + '_forward' + $ext
28 #set read2 = $input_type_cond.read2
29 #set read2_file = re.sub('[^\w\-\.]', '_', str($read2.element_identifier)) + '_reverse' + $ext
30 ln -s '$read2' '$read2_file' &&
31 #else:
32 #set read1_file = re.sub('[^\w\-\.]', '_', str($read1.element_identifier)) + $ext
33 #end if
34
35 ln -s '$read1' '$read1_file' &&
36 #else:
37 #set read1 = $input_type_cond.input_collection.forward
38
39 #set ext = '.fastq'
40 #if $read1.ext.endswith('.gz'):
41 #set ext = $ext+'.gz'
42 #end if
43
44 #set read1_file = re.sub('[^\w\-\.]', '_', str($read1.element_identifier)) + $ext
45 ln -s '$read1' '$read1_file' &&
46
47 #set read2 = $input_type_cond.input_collection.reverse
48 #set read2_file = re.sub('[^\w\-\.]', '_', str($read2.element_identifier)) + $ext
49 ln -s '$read2' '$read2_file' &&
50
51 #end if
52
53 #if str($input_type_cond.input_type) in ['paired', 'collection']:
54 #set $seqsero_t_value = '2'
55 #elif str($input_type_cond.input_type) == 'assembly':
56 #set $seqsero_t_value = '4'
57 #elif str($input_type_cond.input_type) == 'single':
58 #set $seqsero_t_value = '3'
59 #elif str($input_type_cond.input_type) == 'nanopore':
60 #set $seqsero_t_value = '5'
61 #end if
62
63 #if str($input_type_cond.input_type) in ['assembly', 'nanopore']:
64 #set $seqsero_workflow_type = 'k'
65 #else:
66 #set $seqsero_workflow_type = $input_type_cond.workflow
67 #end if
68
69 SeqSero2_package.py
70 -m '$seqsero_workflow_type'
71 -t '$seqsero_t_value'
72 -i '$read1_file'
73 #if str($input_type_cond.input_type) in ['paired', 'collection']:
74 '$read2_file'
75 #end if
76 -p \${GALAXY_SLOTS:-4}
77 -d output
78 ]]> </command>
79 <inputs>
80 <conditional name="input_type_cond">
81 <param name="input_type" type="select" label="Input type" help="Select 'paired end' reads or 'sequence' for genomes/contigs">
82 <option value="paired">Paired End</option>
83 <option value="collection">Collection</option>
84 <option value="assembly">Contigs</option>
85 <option value="single">Interleaved</option>
86 <option value="nanopore">Nanopore reads</option>
87 </param>
88 <when value="paired">
89 <param name="read1" type="data" format="fastqsanger,fastqsanger.gz" label="Forward reads (R1)" help="The file of forward reads in FASTQ format"/>
90 <param name="read2" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse reads (R2)" help="The file of reverse reads in FASTQ format"/>
91 <expand macro="select_workflow_type" />
92 </when>
93 <when value="collection">
94 <param name="input_collection" format="fastqsanger,fastqsanger.gz" type="data_collection" collection_type="paired" label="Paired collection"/>
95 <expand macro="select_workflow_type" />
96 </when>
97 <when value="single">
98 <param name="read1" type="data" format="fastqsanger,fastqsanger.gz" multiple="false" label="Interleaved" />
99 <expand macro="select_workflow_type" />
100 </when>
101 <when value="nanopore">
102 <param name="read1" type="data" format="fasta" multiple="false" label="Nanopore reads" />
103 </when>
104 <when value="assembly">
105 <param name="read1" type="data" format="fasta" multiple="false" label="Contigs/genomes" />
106 </when>
107 </conditional>
108 <section name="output_options" title="Output options">
109 <param argument="logfile" type="boolean" checked="false" truevalue="true" falsevalue="" label="Include log as output file."/>
110 </section>
111 </inputs>
112 <outputs>
113 <data name="results" format="tabular" label="${tool.name} on ${on_string} Results" from_work_dir="output/SeqSero_result.tsv"/>
114 <data name="log" format="txt" label="${tool.name} on ${on_string} Log" from_work_dir="output/SeqSero_log.txt">
115 <filter>output_options['logfile']</filter>
116 </data>
117 </outputs>
118 <tests>
119 <test expect_num_outputs="2">
120 <param name="input_type" value="assembly" />
121 <param name="read1" value="CP009102.1.fasta" ftype="fasta" />
122 <param name="logfile" value="true" />
123 <output name="results">
124 <assert_contents>
125 <has_text text="Salmonella enterica subspecies enterica (subspecies I)" />
126 <has_text text="Typhimurium" />
127 </assert_contents>
128 </output>
129 <output name="log">
130 <assert_contents>
131 <has_n_lines n="103" />
132 <has_text text="O_scores" />
133 <has_text text="H_scores" />
134 <has_text text="Special_scores" />
135 </assert_contents>
136 </output>
137 </test>
138 <test expect_num_outputs="1">
139 <param name="input_type" value="paired" />
140 <param name="workflow" value="a" />
141 <param name="read1" value="SRR10859038_R1.fastq.gz" ftype="fastqsanger.gz" />
142 <param name="read2" value="SRR10859038_R2.fastq.gz" ftype="fastqsanger.gz" />
143 <output name="results">
144 <assert_contents>
145 <has_text text="The input genome cannot be identified as Salmonella." />
146 </assert_contents>
147 </output>
148 </test>
149 <test expect_num_outputs="1">
150 <param name="input_type" value="collection" />
151 <param name="workflow" value="k" />
152 <param name="input_collection">
153 <collection type="paired">
154 <element name="forward" value="SRR10859038_R1.fastq.gz" ftype="fastqsanger.gz" />
155 <element name="reverse" value="SRR10859038_R2.fastq.gz" ftype="fastqsanger.gz" />
156 </collection>
157 </param>
158 <output name="results">
159 <assert_contents>
160 <has_text text="The input genome cannot be identified as Salmonella." />
161 </assert_contents>
162 </output>
163 </test>
164 <test expect_num_outputs="1">
165 <param name="input_type" value="single" />
166 <param name="workflow" value="a" />
167 <param name="read1" value="SRR10859038_R1.fastq.gz" ftype="fastqsanger.gz" />
168 <output name="results">
169 <assert_contents>
170 <has_text text="The input genome cannot be identified as Salmonella" />
171 </assert_contents>
172 </output>
173 </test>
174 <test expect_num_outputs="1">
175 <param name="input_type" value="nanopore" />
176 <param name="read1" value="CP009102.1.fasta" ftype="fasta" />
177 <output name="results">
178 <assert_contents>
179 <has_text text="Salmonella enterica subspecies enterica (subspecies I)" />
180 <has_text text="Typhimurium" />
181 </assert_contents>
182 </output>
183 </test>
184 </tests>
185 <help><![CDATA[
186 **What is SeqSero2**
187
188 SeqSero2 is a pipeline for Salmonella serotype prediction from raw sequencing reads or genome assemblies.
189 SeqSero is based on curated databases of Salmonella serotype determinants (rfb gene cluster, fliC and fljB alleles) and is predicted to determine serotype rapidly and accurately for nearly the full spectrum of Salmonella serotypes (more than 2,300 serotypes), from both raw sequencing reads and genome assemblies.
190
191 **Workflows**
192
193 * Allele micro-assembly (workflow: allele). This workflow takes raw reads as input and performs targeted assembly of serotype determinant alleles. Assembled alleles are used to predict serotype and flag potential inter-serotype contamination in sequencing data (i.e., presence of reads from multiple serotypes due to, for example, cross or carryover contamination during sequencing).
194 * Raw reads k-mer (workflow: k-mer). This workflow takes raw reads as input and performs rapid serotype prediction based on unique k-mers of serotype determinants.
195 * Genome assembly k-mer (input type: contigs). This workflow takes genome assemblies as input and the rest of the workflow largely overlaps with the raw reads k-mer workflow.
196
197 **Extra parameter information.**
198
199 The '-t' parameter is automatically determined using the input files, and therefore not customizable by the user. The logic used is based on the tool's parameter description:
200
201 * -t {1,2,3,4,5} <int>: '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)
202
203 -----
204
205 _`Document`: https://github.com/denglab/SeqSero2
206
207 ]]></help>
208 <expand macro="citations"/>
209 </tool>