annotate microrunqc.xml @ 0:a53acd38d77e draft

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