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