4
|
1 <tool id="optitype" name="OptiType" version="1.2.1">
|
|
2 <description>HLA genotyping predictions from NGS data</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.2.1">optitype</requirement>
|
|
5 </requirements>
|
5
|
6 <command detect_errors="aggressive">
|
0
|
7 <![CDATA[
|
|
8 #set $fastqs = []
|
|
9 #if str( $fastq_input.fastq_input_selector ) == "paired":
|
4
|
10 ln -s "${fastq_input.fastq_input1}" reads_1.fastq
|
|
11 && ln -s "${fastq_input.fastq_input2}" reads_2.fastq
|
|
12 #set $fastqs = ['reads_1.fastq','reads_2.fastq']
|
0
|
13 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection":
|
4
|
14 ln -s "${fastq_input.fastq_input1.forward}" reads_1.fastq
|
|
15 && ln -s "${fastq_input.fastq_input1.reverse}" reads_2.fastq
|
|
16 #set $fastqs = ['reads_1.fastq','reads_2.fastq']
|
0
|
17 #elif str( $fastq_input.fastq_input_selector ) == "single":
|
4
|
18 ln -s "${fastq_input.fastq_input1}" reads.fastq
|
|
19 #set $fastqs = ['reads.fastq']
|
0
|
20 #end if
|
5
|
21 && RAZERS3=`which razers3`
|
|
22 && sed "s#path_to_razers3#\$RAZERS3#" '$optitype_config' | sed "s/threads=16/threads=\$GALAXY_SLOTS/" > config.ini
|
0
|
23 #set $input_fq = ' '.join($fastqs)
|
4
|
24 && OptiTypePipeline.py
|
|
25 $read_type --input ${' '.join($fastqs)}
|
2
|
26 #if str($beta) != '':
|
0
|
27 --beta $beta
|
|
28 #end if
|
2
|
29 #if str($enumerations) != '':
|
0
|
30 --enumerate $enumerations
|
|
31 #end if
|
4
|
32 --config "`pwd`/config.ini"
|
1
|
33 --outdir $outdir
|
0
|
34 && cp $outdir/*/*_coverage_plot.pdf $coverage_plot
|
|
35 && cp $outdir/*/*_result.tsv $result
|
|
36 ]]>
|
4
|
37 </command>
|
|
38 <configfiles>
|
|
39 <configfile name="optitype_config"><![CDATA[
|
|
40 [mapping]
|
|
41
|
|
42 # Absolute path to RazerS3 binary, and number of threads to use for mapping
|
|
43
|
|
44 razers3=path_to_razers3
|
|
45 threads=16
|
|
46
|
|
47 [ilp]
|
|
48
|
|
49 # A Pyomo-supported ILP solver. The solver must be globally accessible in the
|
|
50 # environment OptiType is run, so make sure to include it in PATH.
|
|
51 # Note: this is NOT a path to the solver binary, but a keyword argument for
|
|
52 # Pyomo. Examples: glpk, cplex, cbc.
|
|
53
|
|
54 solver=$solver
|
|
55 threads=1
|
|
56
|
|
57 [behavior]
|
|
58
|
|
59 # tempdir=/path/to/tempdir # we may enable this setting later. Not used now.
|
|
60
|
|
61 # Delete intermediate bam files produced by RazerS3 after OptiType finished
|
|
62 # loading them. If you plan to re-analyze your samples with different settings
|
|
63 # disabling this option can be a time-saver, as you'll be able to pass the bam
|
|
64 # files to OptiType directly as input and spare the expensive read mapping
|
|
65 # step.
|
|
66
|
|
67 deletebam=true
|
|
68
|
|
69 # In paired-end mode one might want to use reads with just one mapped end (e.g.,
|
|
70 # the other end falls outside the reference region). This setting allows the
|
|
71 # user to keep them with an optionally reduced weight. A value of 0 means they
|
|
72 # are discarded for typing, 0.2 means single reads are "worth" 20% of paired
|
|
73 # reads, and a value of 1 means they are treated as valuable as properly mapped
|
|
74 # read pairs. Note: unpaired reads will be reported on the result coverage plots
|
|
75 # for completeness, regardless of this setting.
|
|
76
|
|
77 unpaired_weight=$unpaired_weight
|
|
78
|
|
79 # We call a read pair discordant if its two ends best-map to two disjoint sets
|
|
80 # of alleles. Such reads can be either omitted or either of their ends treated
|
|
81 # as unpaired hits. Note: discordant read pairs are reported on the coverage
|
|
82 # plots as unpaired reads, regardless of this setting.
|
|
83
|
|
84 use_discordant=$use_discordant
|
|
85 ]]></configfile>
|
|
86 </configfiles>
|
|
87 <inputs>
|
|
88 <conditional name="fastq_input">
|
|
89 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
|
|
90 <option value="paired">Paired</option>
|
|
91 <option value="single">Single</option>
|
|
92 <option value="paired_collection">Paired Collection</option>
|
|
93 </param>
|
|
94 <when value="paired">
|
|
95 <param name="fastq_input1" type="data" format="fastqsanger" label="Select first set of reads" help="Specify dataset with forward reads"/>
|
|
96 <param name="fastq_input2" type="data" format="fastqsanger" label="Select second set of reads" help="Specify dataset with reverse reads"/>
|
|
97 </when>
|
|
98 <when value="single">
|
|
99 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with single reads"/>
|
|
100 </when>
|
|
101 <when value="paired_collection">
|
|
102 <param name="fastq_input1" format="fastqsanger" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/>
|
|
103 </when>
|
|
104 </conditional>
|
|
105 <param name="read_type" type="select" label="Nucleotide Type" help="">
|
|
106 <option value="--rna">RNA</option>
|
|
107 <option value="--dna">DNA</option>
|
|
108 </param>
|
|
109 <param name="beta" type="float" value="" min="0.0" max="0.1" optional="true" label="homozygosity beta" help="The beta value for for homozygosity detection (Leave blank for default: 0.009)"/>
|
|
110 <param name="enumerations" type="integer" value="" min="1" max="5" optional="true" label="Enumerations" help="The number of enumerations (Leave blank for default: 1)"/>
|
|
111 <param name="solver" type="select" label="ILP solver" help="">
|
|
112 <option value="glpk">glpk</option>
|
|
113 <!--
|
|
114 <option value="cbc">cbc</option>
|
|
115 -->
|
|
116 </param>
|
|
117 <param name="unpaired_weight" type="float" value="0" min="0.0" max="1.0" label="unpaired_weight">
|
|
118 <help><![CDATA[
|
|
119 In paired-end mode one might want to use reads with just one mapped end (e.g.,
|
|
120 the other end falls outside the reference region). This setting allows the
|
|
121 user to keep them with an optionally reduced weight. A value of 0 means they
|
|
122 are discarded for typing, 0.2 means single reads are "worth" 20% of paired
|
|
123 reads, and a value of 1 means they are treated as valuable as properly mapped
|
|
124 read pairs. Note: unpaired reads will be reported on the result coverage plots
|
|
125 for completeness, regardless of this setting. ]]>
|
|
126 </help>
|
|
127 </param>
|
|
128 <param name="use_discordant" type="boolean" truevalue="true" falsevalue="false" checked="false" label="use_discordant">
|
|
129 <help><![CDATA[
|
|
130 We call a read pair discordant if its two ends best-map to two disjoint sets
|
|
131 of alleles. Such reads can be either omitted or either of their ends treated
|
|
132 as unpaired hits. Note: discordant read pairs are reported on the coverage
|
|
133 plots as unpaired reads, regardless of this setting. ]]>
|
|
134 </help>
|
|
135 </param>
|
|
136 <param name="outdir" type="hidden" value="output_dir"/>
|
|
137 </inputs>
|
|
138 <outputs>
|
|
139 <data format="pdf" name="coverage_plot" label="${tool.name} on ${on_string} coverage_plot.pdf"/>
|
|
140 <data format="tabular" name="result" label="${tool.name} on ${on_string} result.tsv"/>
|
|
141 </outputs>
|
|
142 <tests>
|
|
143 <test>
|
|
144 </test>
|
|
145 </tests>
|
|
146 <help>
|
0
|
147 <![CDATA[
|
|
148 **OptiType**
|
|
149 ============
|
|
150
|
3
|
151 OptiType_ is a novel HLA genotyping algorithm based on integer linear programming, capable of producing accurate 4-digit HLA genotyping predictions from NGS data by simultaneously selecting all major and minor HLA Class I alleles.
|
|
152
|
|
153 **INPUTS**
|
|
154
|
4
|
155 RNA or DNA sequences in fastq format.
|
3
|
156
|
|
157 **OPTIONS**
|
|
158
|
4
|
159 --beta <BETA_VALUE> The beta value for for homozygosity detection (see cited paper).
|
|
160 Default: 0.009. Handle with care.
|
|
161 --enumerate <ENUMERATIONS> Number of enumerations.
|
|
162 OptiType will output the optimal solution and the top N-1 suboptimal solutions in the results.
|
|
163 Default: 1
|
3
|
164
|
|
165
|
|
166 **OUTPUTS**
|
|
167
|
4
|
168 result.tsv A TAB-separated file of HLA genotyping predictions:
|
3
|
169
|
4
|
170 ::
|
3
|
171
|
|
172 A1 A2 B1 B2 C1 C2 Reads Objective
|
|
173 0 A*31:01 A*68:01 B*40:01 B*51:01 C*15:02 C*03:04 132 128.43599999999998
|
|
174
|
|
175
|
4
|
176 coverage_plot.pdf Plots of coverage of HLA genotyping predictions
|
3
|
177
|
|
178 .. _OptiType: https://github.com/FRED-2/OptiType
|
0
|
179 ]]>
|
4
|
180 </help>
|
|
181 <citations>
|
|
182 <citation type="doi">10.1093/bioinformatics/btu548</citation>
|
|
183 </citations>
|
0
|
184 </tool>
|