2
|
1 <tool id="microrunqc" name="microrunqc" version="1.0.0">
|
|
2
|
|
3 <requirements>
|
6
|
4 <requirement type="package" version="2.4.0">skesa</requirement>
|
|
5 <requirement type="package" version="2.23.0">mlst</requirement>
|
|
6 <requirement type="package" version="0.7.17">bwa</requirement>
|
|
7 <requirement type="package" version="1.23.5">numpy</requirement>
|
|
8 <requirement type="package" version="1.0.1">fastq-scan</requirement>
|
7
|
9 <requirement type="package" version="3.8">python</requirement>
|
2
|
10 </requirements>
|
|
11
|
|
12 <command detect_errors="exit_code"><![CDATA[
|
|
13
|
|
14 skesa
|
|
15
|
|
16 #set fqscan = "text"
|
|
17 #if $jobtype.select == "fastq_fr"
|
|
18 #set outname = $jobtype.fastq1.name
|
|
19 #set bwalist = str($jobtype.fastq1) + " " + str($jobtype.fastq2)
|
|
20 --fastq $jobtype.fastq1,$jobtype.fastq2
|
|
21 #if $jobtype.fastq1.is_of_type("fastq.gz")
|
|
22 #set fqscan = "gz"
|
|
23 #else if $jobtype.fastq1.is_of_type("fastqsanger.gz")
|
|
24 #set fqscan = "gz"
|
|
25 #end if
|
|
26 #else if $jobtype.select == "fastq_pair"
|
|
27 #set outname = $jobtype.coll.name
|
|
28 #set bwalist = str($jobtype.coll.forward) + " " + str($jobtype.coll.reverse)
|
|
29 --fastq $jobtype.coll.forward,$jobtype.coll.reverse
|
|
30 #if $jobtype.coll.forward.is_of_type("fastq.gz")
|
|
31 #set fqscan = "gz"
|
|
32 #else if $jobtype.coll.forward.is_of_type("fastqsanger.gz")
|
|
33 #set fqscan = "gz"
|
|
34 #end if
|
|
35 #end if
|
|
36
|
|
37 #set num_cores = 1
|
|
38
|
|
39 #if $options.select =="basic"
|
|
40 --cores $num_cores
|
|
41 --memory 8
|
|
42 #else if $options.select=="advanced"
|
|
43 #if $options.cores
|
|
44 #set num_cores = $options.cores
|
|
45 --cores $options.cores
|
|
46 #end if
|
|
47 #if $options.memory
|
|
48 --memory $options.memory
|
|
49 #end if
|
|
50 #if $options.hash_count
|
|
51 --hash_count
|
|
52 #end if
|
|
53 #if $options.estimated_kmers
|
|
54 --estimated_kmers $options.estimated.kmers
|
|
55 #end if
|
|
56 #if $options.skip
|
|
57 --skip_bloom_filter
|
|
58 #end if
|
|
59 #if $options.kmer
|
|
60 --kmer $options.kmer
|
|
61 #end if
|
|
62 #if $options.min_count
|
|
63 --min_count $options.min_count
|
|
64 #end if
|
|
65 #if $options.max_kmer_count
|
|
66 --max_kmer_count $options.max_kmer_count
|
|
67 #end if
|
|
68 #if $options.vector_percent
|
|
69 --vector_percent $options.vector_percent
|
|
70 #end if
|
|
71 #if $options.insert_size
|
|
72 --insert_size $options.insert.size
|
|
73 #end if
|
|
74 #if $options.steps
|
|
75 --steps $options.steps
|
|
76 #end if
|
|
77 #if $options.fraction
|
|
78 --fraction $options.fraction
|
|
79 #end if
|
|
80 #if $options.max_snp_len
|
|
81 --max_snp_len $options.max_snp_len
|
|
82 #end if
|
|
83 #if $options.min_contig
|
|
84 --min_contig $options.min_contig
|
|
85 #end if
|
|
86 #if $options.allow_snps
|
|
87 --allow_snps
|
|
88 #end if
|
|
89 #end if
|
|
90
|
|
91 > ${outname}.fasta;
|
|
92
|
|
93 bwa index ${outname}.fasta;
|
|
94 bwa mem -t $num_cores ${outname}.fasta ${bwalist} | python $__tool_directory__/median_size.py > insert.median;
|
|
95
|
|
96 mlst --nopath --threads $num_cores
|
|
97 #if $options.select=="advanced"
|
|
98 #if $options.minid
|
|
99 --minid $options.minid
|
|
100 #end if
|
|
101 #if $options.mincov
|
|
102 --mincov $options.mincov
|
|
103 #end if
|
|
104 #if $options.minscore
|
|
105 --minscore $options.minscore
|
|
106 #end if
|
|
107 #end if
|
|
108 ${outname}.fasta > ${outname}.mlst.tsv;
|
|
109
|
|
110 python $__tool_directory__/run_fastq_scan.py --fastq ${bwalist} --out fq_out.tab --type ${fqscan};
|
|
111
|
|
112 python $__tool_directory__/sum_mlst.py --fasta ${outname}.fasta --mlst ${outname}.mlst.tsv --med insert.median --fqscan fq_out.tab --out sum_qc.txt
|
|
113
|
|
114 ]]></command>
|
|
115 <inputs>
|
|
116 <conditional name="jobtype">
|
|
117 <param name="select" type="select" label="Select Input">
|
|
118 <option value="fastq_fr">Forward and Reverse FASTQ</option>
|
|
119 <option value="fastq_pair">Paired FASTQ Collection</option>
|
|
120 </param>
|
|
121 <when value="fastq_fr">
|
|
122 <param name="fastq1" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="Forward FASTQ" />
|
|
123 <param name="fastq2" type="data" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" label="Reverse FASTQ" />
|
|
124 </when>
|
|
125 <when value="fastq_pair">
|
|
126 <param name="coll" label="Paired FASTQ" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz" collection_type="paired" />
|
|
127 </when>
|
|
128 </conditional>
|
|
129
|
|
130 <conditional name="options">
|
|
131 <param name="select" type="select" label="Options Type">
|
|
132 <option value="basic">Basic</option>
|
|
133 <option value="advanced">Advanced</option>
|
|
134 </param>
|
|
135 <when value="advanced">
|
|
136 <param name="cores" optional="true" type="integer" label="Number of cores to use (Default=16)" value=""/>
|
|
137 <param name="memory" optional="true" type="integer" label="Memory available (Default=32GB)" value=""/>
|
|
138 <param name="hash_count" optional="true" type="boolean" label="hash counter"/>
|
|
139 <param name="estimated_kmers" optional="true" type="integer" label="Estimated number of unique kmers for bloom filter (Default=100)" value=""/>
|
|
140 <param name="skip" optional="true" type="boolean" label="skip bloom filter, use estimate kmers as the hash"/>
|
|
141 <param name="kmer" optional="true" type="integer" label="Minimal kmer length for assembly (Default=21)" value=""/>
|
|
142 <param name="min_count" optional="true" type="integer" label="Minimal count for kmers retained for comparing alternate choices" value=""/>
|
|
143 <param name="max_kmer_count" optional="true" type="integer" label="Minimum acceptable average count for estimating the maximal kmer length in reads" value=""/>
|
|
144 <param name="vector_percent" optional="true" type="float" label="Count for vectors as a fraction of the read number (0-1,1=disabled)" value="">
|
|
145 <validator type="in_range" message="Must be float(0,1)." min="0" max="1"/>
|
|
146 </param>
|
|
147 <param name="insert_size" optional="true" type="integer" label="Expected insert size for paired reads" value=""/>
|
|
148 <param name="steps" optional="true" type="integer" label="Number of assembly iterations from minimal to maximal kmer length in reads (Default=11)" value=""/>
|
|
149 <param name="fraction" optional="true" type="float" label="Maximum noise to signal ratio acceptable for extension (Default=0.1)" value="">
|
|
150 <validator type="in_range" message="Must be float(0,1)." min="0" max="1"/>
|
|
151 </param>
|
|
152 <param name="max_snp_len" optional="true" type="integer" label="Maximal snp length (Default=150)" value=""/>
|
|
153 <param name="min_contig" optional="true" type="integer" label="Minimal contig length reported in output (Default=200)" value=""/>
|
|
154 <param name="allow_snps" optional="true" type="boolean" label="Turn SNP discovery (Default=false)"/>
|
|
155 <param name="mincov" type="integer" label="Minimum DNA %coverage" value="10" help="Minimum DNA %coverage to report partial allele at all (default 10, must be between 0-100)" optional="true" />
|
|
156 <param name="minid" type="integer" label="Minimum DNA %identity" value="95" min="0" max="100" help="Minimum DNA %identity of full allelle to consider 'similar' (default 95, must be between 0-100)" optional="true" />
|
|
157 <param name="minscore" type="integer" label="Minimum score to match scheme" value="50" min="0" max="100" help="Minumum score out of 100 to match a scheme" optional="true" />
|
|
158 </when>
|
|
159 <when value="basic"/>
|
|
160 </conditional>
|
|
161 </inputs>
|
|
162 <outputs>
|
|
163 <data format="fasta" name="results.skesa.fasta" label="${tool.name} on ${on_string}: Contigs" from_work_dir="*.fasta"/>
|
|
164 <data format="tabular" name="results.mlst.tsv" label="${tool.name} on ${on_string}: MLST" from_work_dir="*.mlst.tsv"/>
|
|
165 <data format="tabular" name="qc_results.tsv" label="${tool.name} on ${on_string}: MLST" from_work_dir="*.txt"/>
|
|
166 </outputs>
|
|
167
|
|
168 <help><![CDATA[
|
|
169
|
|
170 ]]></help>
|
|
171 <citations>
|
|
172 <citation type="bibtex">
|
|
173 @misc{pope_dashnow_zobel_holt_raven_schultz_inouye_tomita_2014,
|
|
174 title={skesa: eSKESA is a de-novo sequence read assembler for cultured single isolate genomes
|
|
175 based on DeBruijn graphs. It uses conservative heuristics and is designed to
|
|
176 create breaks at repeat regions in the genome. This leads to excellent sequence
|
|
177 quality but not necessarily a large N50 statistic. It is a multi-threaded
|
|
178 application that scales well with the number of processors. For different runs
|
|
179 with the same inputs, including the order of reads, the order and orientation
|
|
180 of contigs in the output is deterministic. },
|
|
181 url={https://github.com/ncbi/ngs-tools/tree/master/tools/skesa/},
|
|
182 author={National Center for Biotechnology Information },
|
|
183 }</citation>
|
|
184
|
|
185 <citation type="bibtex">
|
|
186 @UNPUBLISHED{Seemann2016,
|
|
187 author = "Seemann T",
|
|
188 title = "MLST: Scan contig files against PubMLST typing schemes",
|
|
189 year = "2016",
|
|
190 url = {https://github.com/tseemann/mlst}
|
|
191 }</citation>
|
|
192 </citations>
|
|
193 </tool>
|