comparison wgmlst_add.xml @ 0:a3cc35af3635 draft

planemo upload for repository https://github.com/bvalot/pyMLST commit 13edfab02a5da9e374c38ecbd0e229ec0f8d53bb
author bvalot
date Thu, 16 Jun 2022 12:32:28 +0000
parents
children 5b2c48fa0175
comparison
equal deleted inserted replaced
-1:000000000000 0:a3cc35af3635
1 <tool id="wgmlst_add_wrapper" name="Add strain to cg/wgMLST database" version="2.1.3">
2 <description></description>
3 <requirements>
4 <requirement type="package" version="2.1.3">pymlst</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="1:" level="fatal" />
8 </stdio>
9 <version_command>wgMLST -v</version_command>
10 <command><![CDATA[
11 cp '${database}' '${databaseout}' &&
12 wgMLST
13 #if $data.input == "fasta"
14 add
15 #else
16 add2
17 #end if
18 #if str($coverage)
19 -c $coverage
20 #end if
21 #if str($identity)
22 -i $identity
23 #end if
24 #if $data.input == "fasta"
25 #if $strain
26 -s '$strain'
27 #else
28 -s '$data.fastain.name.replace(" ", "_").replace("-", "_")'
29 #end if
30 '${databaseout}' '${data.fastain}'
31 #end if
32 #if $data.input == "fastqsingle"
33 #if str($data.reads)
34 -r $data.reads
35 #end if
36 #if $strain
37 -s '$strain'
38 #else
39 -s '$data.single.name.replace(" ", "_").replace("-", "_")'
40 #end if
41 '${databaseout}' '${data.single}'
42 #end if
43 #if $data.input == "fastqpaired"
44 #if str($data.reads)
45 -r $data.reads
46 #end if
47 #if $strain
48 -s '$strain'
49 #else
50 -s '$data.forward.name.replace(" ", "_").replace("-", "_")'
51 #end if
52 '${databaseout}' '${data.forward}' '${data.reverse}'
53 #end if
54 #if $data.input == "fastqpaired2"
55 #if str($data.reads)
56 -r $data.reads
57 #end if
58 #if $strain
59 -s '$strain'
60 #else
61 -s '$data.pairedfile.name.replace(" ", "_").replace("-", "_")'
62 #end if
63 '${databaseout}' '${data.pairedfile.forward}'
64 '${data.pairedfile.reverse}'
65 #end if
66 #if $log
67 2> '${logfile}'
68 #end if
69 ]]>
70 </command>
71 <inputs>
72 <param name="database" type="data"
73 format="sqlite"
74 label="cg/wgMLST database"
75 help="Sqlite format from cg/wgMLST database" />
76 <conditional name="data">
77 <param name="input" type="select" label="Select type of data">
78 <option value="fasta" selected="true">Assembly (fasta)</option>
79 <option value="fastqsingle">Raw data (single)</option>
80 <option value="fastqpaired">Raw data (paired separated)</option>
81 <option value="fastqpaired2">Raw data (paired)</option>
82 </param>
83 <when value="fasta">
84 <param name="fastain" type="data" format="fasta"
85 label="Assembly Genome" help="Fasta format" />
86 </when>
87 <when value="fastqsingle">
88 <param name="single" type="data" format="fastq,fastq.gz"
89 label="Single read file" help="Fastq(gz) format" />
90 <param name="reads" type="integer" value="10" optional="true"
91 label="Minimum reads coverage to search gene" />
92 </when>
93 <when value="fastqpaired">
94 <param name="forward" type="data" format="fastq,fastq.gz"
95 label="Forward read file" help="Fastq(gz) format" />
96 <param name="reverse" type="data" format="fastq,fastq.gz"
97 label="Reverse read file" help="Fastq(gz) format" />
98 <param name="reads" type="integer" value="10" optional="true"
99 label="Minimum reads coverage to search gene" />
100 </when>
101 <when value="fastqpaired2">
102 <param name="pairedfile" type="data_collection" format="fastq,fastq.gz"
103 label="Paired of read files" help="Fastq(gz) format"
104 collection_type="paired" />
105 <param name="reads" type="integer" value="10" optional="true"
106 label="Minimum reads coverage to search gene" />
107 </when>
108 </conditional>
109 <param name="strain" type="text" value="" size="50"
110 optional="false"
111 label="Strain"
112 help="Name of the strain">
113 <sanitizer invalid_char="_" >
114 <valid initial="string.ascii_letters,string.digits">
115 <add value="_" />
116 <add value="." />
117 </valid>
118 </sanitizer>
119 </param>
120 <param name="identity" type="float" value="0.9" optional="false"
121 label="Identity"
122 help="Minimum identity to search gene" />
123 <param name="coverage" type="float" value="0.9" optional="false"
124 label="Coverage"
125 help="Minimum coverage to search gene" />
126 <param name="log" type="boolean" checked="true"
127 label="Write log file" />
128 </inputs>
129 <outputs>
130 <data name="databaseout" format="sqlite" label="${database.name}">
131 </data>
132 <data name="logfile" format="txt" label="${tool.name} on ${on_string}: log">
133 <filter>log</filter>
134 </data>
135 </outputs>
136 <tests>
137 <test expect_num_outputs="2">
138 <param name="database" value="wgmlst_ecoli.db" />
139 <conditional name="data">
140 <param name="input" value="fasta" />
141 <param name="fastain" ftype="fasta" value="EHSB-021.fasta" />
142 </conditional>
143 <param name="identity" value="0.8" />
144 <output name="logfile" ftype="txt">
145 <assert_contents>
146 <has_text text="Added 2497 new MLST genes to the database" />
147 <has_text text="Found 32 partial genes, filled 30" />
148 <has_text text="Removed 4 genes" />
149 </assert_contents>
150 </output>
151 </test>
152 <!-- <test expect_num_outputs="2"> -->
153 <!-- <param name="database" value="wgmlst_ecoli.db" /> -->
154 <!-- <param name="strain" value="EHSB-021" /> -->
155 <!-- <conditional name="data"> -->
156 <!-- <param name="input" value="fastqpaired" /> -->
157 <!-- <param name="forward" ftype="fastq.gz" value="EHSB-021_R1.fastq.gz" /> -->
158 <!-- <param name="reverse" ftype="fastq.gz" value="EHSB-021_R2.fastq.gz" /> -->
159 <!-- <param name="reads" value="5" /> -->
160 <!-- </conditional> -->
161 <!-- <output name="logfile" ftype="txt"> -->
162 <!-- <assert_contents> -->
163 <!-- <has_text_matching expression="Add 24\d\d new MLST genes to database" /> -->
164 <!-- <has_text_matching expression="Remove \d genes with uncertain bases" /> -->
165 <!-- <has_text_matching expression="Remove \d\d genes with bad CDS" /> -->
166 <!-- </assert_contents> -->
167 <!-- </output> -->
168 <!-- </test> -->
169 </tests>
170 <help>
171 **What it does**
172
173 Add a Strain to the cg/wgMLST database
174
175 You can use
176 - Genome assembly (blat search)
177 - Raw data (kma search)
178
179 **Options:**
180 -s, --strain TEXT Name of the strain (default:genome name).
181 -i, --identity FLOAT Minimum identity to search gene (default=0.9).
182 -c, --coverage FLOAT Minimum coverage to search gene (default=0.95).
183 -r, --reads INTEGER Minimum reads coverage to search gene (default=10).
184 -f, --fasta FILENAME Write fasta file with gene allele.
185
186 **License and citation**
187
188 This Galaxy tool is Copyright © 2022 `B. Valot` and is released under the `GPL3 license`.
189 </help>
190 <citations>
191 </citations>
192 </tool>