comparison pharmcat.xml @ 0:d67642a21a1d draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pharmcat commit c6a098eb0cbfa87b0feaebf10ef6b24da659fa54"
author bgruening
date Fri, 28 Jan 2022 21:18:23 +0000
parents
children 891283e0ee89
comparison
equal deleted inserted replaced
-1:000000000000 0:d67642a21a1d
1 <tool id="pharmcat" name="pharmCAT" version="@WRAPPER_VERSION@+@VERSION_SUFFIX@" profile="20.01">
2 <description>
3 Pharmacogenomics Clinical Annotation Tool
4 </description>
5 <macros>
6 <token name="@WRAPPER_VERSION@">1.3.1</token>
7 <token name="@VERSION_SUFFIX@">galaxy0</token>
8 </macros>
9 <requirements>
10 <container type="docker">pgkb/pharmcat:1.3.1</container>
11 </requirements>
12 <command detect_errors="exit_code"><![CDATA[
13 ## NAMECALLER FUNCTION
14 #if $function_select.function == 'name':
15 ln -s '$function_select.input' ./input.vcf &&
16 java -cp /pharmcat/pharmcat.jar
17 org.pharmgkb.pharmcat.haplotype.NamedAlleleMatcher
18 -vcf input.vcf
19 -json output.json
20 -html output.html
21
22 ## PHENOTYPE CALLER FUNCTION
23 #else if $function_select.function == 'pheno':
24 #if $function_select.method.pheno_function == 'vcf':
25 ln -s '$function_select.method.input' ./input.vcf &&
26 java -cp /pharmcat/pharmcat.jar
27 org.pharmgkb.pharmcat.phenotype.Phenotyper
28 -vcf input.vcf
29 #else:
30 ln -s '$function_select.method.input' ./input.json &&
31 java -cp /pharmcat/pharmcat.jar
32 org.pharmgkb.pharmcat.phenotype.Phenotyper
33 -c input.json
34 #end if
35 #if $function_select.outside_call:
36 -o $function_select.outside_call
37 #end if
38 -f output.json
39
40 ## REPORTER FUNCTION
41 #else if $function_select.function == 'report':
42 ln -s '$function_select.input' ./input.json &&
43 java -cp /pharmcat/pharmcat.jar
44 org.pharmgkb.pharmcat.reporter.Reporter
45 -p input.json
46 #if $function_select.title:
47 -t '$function_select.title'
48 #end if
49 -j output.json
50 -o output.html
51
52 ## ALL FUNCTIONS
53 #else:
54 ln -s '$function_select.input' ./input.vcf &&
55 java -jar /pharmcat/pharmcat.jar
56 -vcf input.vcf
57 -o output
58 -f pharmCAT_report_Galaxy
59 #if $function_select.outside_call:
60 -a $function_select.outside_call
61 #end if
62 $function_select.json
63 $function_select.phenojson
64 #end if
65 ]]></command>
66 <inputs>
67 <conditional name="function_select">
68 <param name="function" type="select" label="Which function of PharmCAT should be run?">
69 <option value="all">Full PharmCAT pipeline</option>
70 <option value="name">Only named allele matcher</option>
71 <option value="pheno">Only phenotyper</option>
72 <option value="report">Only reporter</option>
73 </param>
74 <when value="all">
75 <param name="input" argument="-vcf" type="data" format="vcf" label="Input vcf file" help="Must be formatted in modified official VCF format as detailed here: https://github.com/PharmGKB/PharmCAT/wiki/VCF-Requirements"/>
76 <param name="outside_call" argument="-a" type="data" format="tsv,tabular" label="Gene call TSV file from an outside tool" optional="true"/>
77 <param name="json" argument="-j" type="boolean" truevalue="-j" falsevalue="" label="Output reporter JSON report"/>
78 <param name="phenojson" argument="-pj" type="boolean" truevalue="-pj" falsevalue="" label="Output phenotyper JSON report"/>
79 <!-- <param name="definitions" argument="-na" type="data" format="list" label="Alternative allele definitions" help="a directory containing allele definitions to use instead of the default packaged allele definitions"/> -->
80 </when>
81 <when value="name">
82 <param name="input" argument="-vcf" type="data" format="vcf" label="Input vcf file" help="Must be formatted in modified official VCF format as detailed here: https://github.com/PharmGKB/PharmCAT/wiki/VCF-Requirements"/>
83 <!-- <param name="definitions" argument="-d" type="data" format="list" label="Alternative allele definitions" help="a directory containing allele definitions to use instead of the default packaged allele definitions"/> -->
84 </when>
85 <when value="pheno">
86 <conditional name="method">
87 <param name="pheno_function" type="select" label="Which function of PharmCAT should be run?">
88 <option value="vcf">Run directly from vcf samples</option>
89 <option value="named">Run from the output of the NamedAlleleMatcher</option>
90 </param>
91 <when value="vcf">
92 <param name="input" argument="-vcf" type="data" format="vcf" label="Input vcf file" help="Must be formatted in modified official VCF format as detailed here: https://github.com/PharmGKB/PharmCAT/wiki/VCF-Requirements"/>
93 </when>
94 <when value="named">
95 <param name="input" argument="-c" type="data" format="json" label="Input json file" help="JSON output of the NamedAlleleCaller pharmcat function"/>
96 </when>
97 </conditional>
98 <param name="outside_call" argument="-o" type="data" format="tabular,tsv" label="Optional TSV of outside caller information" optional="true"/>
99 </when>
100 <when value="report">
101 <param name="input" argument="-p" type="data" format="json" label="JSON call data output from Phenotyper pharmCAT function"/>
102 <param name="title" argument="-t" type="text" label="text to add to the report title" optional="true"/>
103 </when>
104 </conditional>
105 </inputs>
106 <outputs>
107 <data name="all_out" from_work_dir="output/pharmCAT_report_Galaxy.report.html" format="html" label="Full pharmCAT report on ${on_string}">
108 <filter>function_select['function'] == "all"</filter>
109 </data>
110 <data name="all_pheno" from_work_dir="output/pharmCAT_report_Galaxy.phenotyper.json" format="json" label="pharmCAT Phenotyper report on ${on_string}">
111 <filter>function_select['function'] == "all" and function_select["phenojson"]</filter>
112 </data>
113 <data name="all_out_json" from_work_dir="output/pharmCAT_report_Galaxy.report.json" format="json" label="pharmCAT Reporter JSON on ${on_string}">
114 <filter>function_select['function'] == "all" and function_select["json"]</filter>
115 </data>
116 <data name="namer_html" from_work_dir="output.html" format="html" label="pharmCAT NamedAlleleMatcher html report on ${on_string}">
117 <filter>function_select['function'] == "name"</filter>
118 </data>
119 <data name="namer_json" from_work_dir="output.json" format="json" label="pharmCAT NamedAlleleMatcher json report on ${on_string}">
120 <filter>function_select['function'] == "name"</filter>
121 </data>
122 <data name="pheno_json" from_work_dir="output.json" format="json" label="pharmCAT Phenotyper report on ${on_string}">
123 <filter>function_select['function'] == "pheno"</filter>
124 </data>
125 <data name="report_html" from_work_dir="output.html" format="html" label="pharmCAT Reporter html report on ${on_string}">
126 <filter>function_select['function'] == "report"</filter>
127 </data>
128 <data name="report_json" from_work_dir="output.json" format="json" label="pharmCAT Reporter json report on ${on_string}">
129 <filter>function_select['function'] == "report"</filter>
130 </data>
131 </outputs>
132 <tests>
133 <!-- ALL FUNCTION -->
134 <test expect_num_outputs="3">
135 <conditional name="function_select">
136 <param name="input" ftype="vcf" value="test.vcf"/>
137 <param name="outside_call" ftype="tabular" value="test.tsv"/>
138 <param name="json" value="-j"/>
139 <param name="phenojson" value="-pj"/>
140 </conditional>
141 <output name="all_out">
142 <assert_contents>
143 <has_text text="rs9923231 reference"/>
144 <has_text text="Very high risk of developing hearing loss if administered an aminoglycoside antibiotic."/>
145 <has_text text="CPIC Allele Function, Phenotype and Recommendation"/>
146 </assert_contents>
147 </output>
148 <output name="all_pheno" file="test_1.pheno.json" lines_diff="1"/>
149 <output name="all_out_json">
150 <assert_contents>
151 <has_text text="Therapeutic range of 200 to 1000 ng/mL has been proposed (PMID 29493375)."/>
152 <has_text text="Activity Score for CYP2D6"/>
153 <has_text text="Implementation Consortium (CPIC) Guideline for CYP2D6 Genotype and Use of Ondansetron and Tropisetron"/>
154 </assert_contents>
155 </output>
156 </test>
157 <!-- NAMECALLER -->
158 <test expect_num_outputs="2">
159 <conditional name="function_select">
160 <param name="function" value="name"/>
161 <param name="input" ftype="vcf" value="test.vcf"/>
162 </conditional>
163 <output name="namer_html" file="test_2.html" lines_diff="2"/>
164 <output name="namer_json" file="test_2.json" lines_diff="2"/>
165 </test>
166 <!-- PHENOTYPER FROM VCF WITH OUTSIDE CALLER-->
167 <test expect_num_outputs="1">
168 <conditional name="function_select">
169 <param name="function" value="pheno"/>
170 <conditional name="method">
171 <param name="pheno_function" value="vcf"/>
172 <param name="input" ftype="vcf" value="test.vcf"/>
173 </conditional>
174 <param name="outside_call" value="test.tsv"/>
175 </conditional>
176 <output name="pheno_json" file="test_3.json" lines_diff="1"/>
177 </test>
178 <!-- PHENOTYPER FROM NAMECALLER AND NO OUTSIDE CALLER-->
179 <test expect_num_outputs="1">
180 <conditional name="function_select">
181 <param name="function" value="pheno"/>
182 <conditional name="method">
183 <param name="pheno_function" value="named"/>
184 <param name="input" value="test_2.json"/>
185 </conditional>
186 </conditional>
187 <output name="pheno_json" file="test_4.json" lines_diff="1"/>
188 </test>
189 <!-- REPORTER -->
190 <test expect_num_outputs="2">
191 <conditional name="function_select">
192 <param name="function" value="report"/>
193 <param name="input" value="test_3.json"/>
194 <param name="text" value="test text"/>
195 </conditional>
196 <output name="report_json">
197 <assert_contents>
198 <has_text text="Implication for CYP2C19"/>
199 <has_text text="Lower dose-adjusted trough concentrations of tacrolimus and decreased chance of achieving target tacrolimus concentrations."/>
200 <has_text text="c.1840C\u003eT"/>
201 </assert_contents>
202 </output>
203 <output name="report_html">
204 <assert_contents>
205 <has_text text="Two ivacaftor non-responsive alleles"/>
206 <has_text text="rs12979860 reference (C)/rs12979860 reference (C)"/>
207 <has_text text="MT-RNR1: 1555A"/>
208 </assert_contents>
209 </output>
210 </test>
211 </tests>
212 <help><![CDATA[
213 PharmCAT is a tool to extract all CPIC guideline gene variants from a genetic dataset (represented as a VCF file), interpret the variant alleles, and generate a report.
214 ]]></help>
215 <citations>
216 <citation type="doi" >10.1002/cpt.928</citation>
217 </citations>
218 </tool>