comparison tbvcfreport.xml @ 0:02d81b994ef5 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/tbvcfreport commit f337505deb06b66961f77a64bfae244f88c6a865"
author iuc
date Thu, 29 Aug 2019 08:18:59 -0400
parents
children adc0645b945c
comparison
equal deleted inserted replaced
-1:000000000000 0:02d81b994ef5
1 <?xml version="1.0" ?>
2 <tool id="tbvcfreport" name="TB Variant Report" version="@TOOL_VERSION@+galaxy0">
3 <description>- generate HTML report from SnpEff annotated M.tb VCF(s)</description>
4 <macros>
5 <token name="@TOOL_VERSION@">0.1.7</token>
6 </macros>
7 <requirements>
8 <requirement type="package" version="@TOOL_VERSION@">tbvcfreport</requirement>
9 </requirements>
10 <command detect_errors="exit_code">
11 <![CDATA[
12 #if $adv.database_uri
13 export DATABASE_URI='${adv.database_uri}' &&
14 #end if
15
16 #if not '.vcf' in str($input_vcf.element_identifier)
17 #set $input_vcf_filename = str($input_vcf.element_identifier).replace(' ', '') + '.vcf'
18 #else
19 #set $input_vcf_filename = str($input_vcf.element_identifier).replace(' ', '')
20 #end if
21
22 ln -s '${input_vcf}' '${input_vcf_filename}' &&
23
24 #set vcf_name = os.path.splitext(os.path.basename($input_vcf_filename))[0]
25
26 #if $tbprofiler_json
27 #if not '.json' in str($tbprofiler_json.element_identifier)
28 #set $tbprofiler_report = str($tbprofiler_json.element_identifier).replace(' ', '') + '.json'
29 #else
30 #set $tbprofiler_report = str($tbprofiler_json.element_identifier).replace(' ', '')
31 #end if
32 ln -s '${tbprofiler_json}' '${tbprofiler_report}' &&
33 #end if
34
35 tbvcfreport generate
36
37 $filter_udi
38
39 #if $tbprofiler_json
40 --tbprofiler-report '${tbprofiler_report}'
41 #end if
42
43 '${input_vcf_filename}' &&
44
45 #set variants_report = str(vcf_name) + '_variants_report'
46 #set html_variants_report = variants_report + '.html'
47 #set txt_variants_report = variants_report + '.txt'
48
49 mv '${html_variants_report}' '$variants_report_html' &&
50 mv '${txt_variants_report}' '$variants_report_txt'
51
52 #if $tbprofiler_json
53 #set drug_resistance_report = str(vcf_name) + '_drug_resistance_report'
54 #set html_drug_resistance_report = drug_resistance_report + '.html'
55 #set txt_drug_resistance_report = drug_resistance_report + '.txt'
56
57 && mv '${html_drug_resistance_report}' '$drug_resistance_report_html'
58 && mv '${txt_drug_resistance_report}' '$drug_resistance_report_txt'
59 #end if
60 ]]>
61 </command>
62 <inputs>
63 <param name="input_vcf" type="data" format="vcf" label="Input SnpEff annotated M.tuberculosis VCF(s)" />
64 <param name="tbprofiler_json" type="data" format="json" optional="true" label="TBProfiler Drug Resistance Report (Optional)" help="--tbprofiler-report" />
65 <param name="filter_udi" argument="--filter-udi" type="boolean" truevalue="--filter-udi" falsevalue="--no-filter-udi" checked="true" label="Filter UPSTREAM, DOWNSTREAM and INTERGENIC variants" />
66 <section name="adv" title="Advanced options" expanded="false">
67 <param name="database_uri" type="text" optional="true" value="neodb.sanbi.ac.za" label="Specify on-premise COMBAT-TB-NeoDB URI" help="For people with an on-premise deployment of COMBAT-TB-NeoDB" />
68 </section>
69 </inputs>
70 <outputs>
71 <data name="variants_report_html" format="html" label="${tool.name} variants report (html) on ${on_string}" />
72 <data name="variants_report_txt" format="txt" label="${tool.name} variants report (text) on ${on_string}" />
73 <data name="drug_resistance_report_html" format="html" label="${tool.name} drug resistance report (html) on ${on_string}">
74 <filter>tbprofiler_json</filter>
75 </data>
76 <data name="drug_resistance_report_txt" format="txt" label="${tool.name} drug resistance report (text) on ${on_string}">
77 <filter>tbprofiler_json</filter>
78 </data>
79 </outputs>
80 <tests>
81 <test>
82 <param name="input_vcf" value="rif_resistant.vcf" ftype="vcf" />
83 <output name="variants_report_html" compare="diff" lines_diff="2" file="rif_resistant_variants_report.html" ftype="html" />
84 <output name="variants_report_txt" compare="diff" lines_diff="2" file="rif_resistant_variants_report.txt" ftype="txt" />
85 </test>
86 <test>
87 <param name="input_vcf" value="rif_resistant.vcf" ftype="vcf" />
88 <param name="tbprofiler_json" value="rif_resistant.results.json" ftype="json" />
89 <output name="variants_report_html" compare="diff" lines_diff="2" file="rif_resistant_variants_report.html" ftype="html" />
90 <output name="variants_report_txt" compare="diff" lines_diff="2" file="rif_resistant_variants_report.txt" ftype="txt" />
91 <output name="drug_resistance_report_html" file="rif_resistant_drug_resistance_report.html" lines_diff="2" ftype="html" />
92 <output name="drug_resistance_report_txt" compare="diff" lines_diff="2" file="rif_resistant_drug_resistance_report.txt" ftype="txt" />
93 </test>
94 </tests>
95 <help>
96 <![CDATA[
97 **tbvcfreport - @TOOL_VERSION@**
98
99 **tbvcfreport** takes SnpEff annotated M.tuberculosis VCF file(s) and generates an HTML-based report with data from Combat-TB-NeoDB (https://neodb.sanbi.ac.za)
100 and links to Combat-TB-eXplorer (https://explorer.sanbi.ac.za/).
101
102 **tbvcfreport** will generate an HTML-based Drug Resistance report if provided with a TBProfiler json report.
103
104 Drug resistance predictions are for **Research Purposes Only** and are produced by TBProfiler (https://github.com/jodyphelan/TBProfiler)
105
106 **Inputs**
107
108 - SnpEff annotated M.tuberculosis VCF file(s) - vcf - **required**
109
110 - TBProfiler Drug Resistance JSON Report - json - **optional**
111
112 **Outputs**
113
114 - Variant Report in HTML and TXT format
115
116 - Drug Resistance Report in HTML and TXT format if provided with a TBProfiler json report
117
118
119 **Advanced options**:
120
121 - database_uri - String - Use an on-premise COMBAT-TB-NeoDB (default 'neodb.sanbi.ac.za') - **optional**
122
123 **Further information**
124
125 For more on the **COMBAT-TB Project**, see https://combattb.org.
126
127 For more on **tbvcfreport**, see https://github.com/COMBAT-TB/tbvcfreport.
128
129 For more on **COMBAT-TB-NeoDB**, see https://github.com/COMBAT-TB/combat-tb-neodb.
130 ]]>
131 </help>
132 <citations>
133 <citation type="bibtex">
134 @misc{githubtbvcfreport,
135 author = {COMBAT-TB},
136 year = {2019},
137 title = {tbvcfreport},
138 publisher = {GitHub},
139 journal = {GitHub repository},
140 url = {https://github.com/COMBAT-TB/tbvcfreport},
141 }</citation>
142 </citations>
143 </tool>