Repository 'tbvcfreport'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/tbvcfreport

Changeset 0:02d81b994ef5 (2019-08-29)
Next changeset 1:adc0645b945c (2021-07-07)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/tbvcfreport commit f337505deb06b66961f77a64bfae244f88c6a865"
added:
tbvcfreport.xml
test-data/rif_resistant.results.json
test-data/rif_resistant.vcf
test-data/rif_resistant_drug_resistance_report.html
test-data/rif_resistant_drug_resistance_report.txt
test-data/rif_resistant_variants_report.html
test-data/rif_resistant_variants_report.txt
b
diff -r 000000000000 -r 02d81b994ef5 tbvcfreport.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tbvcfreport.xml Thu Aug 29 08:18:59 2019 -0400
[
@@ -0,0 +1,143 @@
+<?xml version="1.0" ?>
+<tool id="tbvcfreport" name="TB Variant Report" version="@TOOL_VERSION@+galaxy0">
+  <description>- generate HTML report from SnpEff annotated M.tb VCF(s)</description>
+  <macros>
+    <token name="@TOOL_VERSION@">0.1.7</token>
+  </macros>
+  <requirements>
+    <requirement type="package" version="@TOOL_VERSION@">tbvcfreport</requirement>
+  </requirements>
+  <command detect_errors="exit_code">
+    <![CDATA[
+    #if $adv.database_uri
+        export DATABASE_URI='${adv.database_uri}' &&
+    #end if
+    
+    #if not '.vcf' in str($input_vcf.element_identifier)
+        #set $input_vcf_filename = str($input_vcf.element_identifier).replace(' ', '') + '.vcf'
+    #else
+        #set $input_vcf_filename = str($input_vcf.element_identifier).replace(' ', '')
+    #end if
+
+    ln -s '${input_vcf}' '${input_vcf_filename}' &&
+    
+    #set vcf_name = os.path.splitext(os.path.basename($input_vcf_filename))[0]
+    
+    #if $tbprofiler_json
+        #if not '.json' in str($tbprofiler_json.element_identifier)
+          #set $tbprofiler_report = str($tbprofiler_json.element_identifier).replace(' ', '') + '.json'
+        #else
+            #set $tbprofiler_report = str($tbprofiler_json.element_identifier).replace(' ', '')
+        #end if
+        ln -s '${tbprofiler_json}' '${tbprofiler_report}' &&
+    #end if
+
+    tbvcfreport generate
+
+    $filter_udi
+    
+    #if $tbprofiler_json
+        --tbprofiler-report '${tbprofiler_report}'
+    #end if
+    
+    '${input_vcf_filename}' &&
+
+    #set variants_report = str(vcf_name) + '_variants_report'
+    #set html_variants_report = variants_report + '.html'
+    #set txt_variants_report = variants_report + '.txt'
+
+    mv '${html_variants_report}' '$variants_report_html' &&
+    mv '${txt_variants_report}' '$variants_report_txt'
+
+    #if $tbprofiler_json
+        #set drug_resistance_report = str(vcf_name) + '_drug_resistance_report'
+        #set html_drug_resistance_report = drug_resistance_report + '.html'
+        #set txt_drug_resistance_report = drug_resistance_report + '.txt'
+        
+        && mv '${html_drug_resistance_report}' '$drug_resistance_report_html'
+        && mv '${txt_drug_resistance_report}' '$drug_resistance_report_txt'
+    #end if
+    ]]>
+  </command>
+  <inputs>
+    <param name="input_vcf" type="data" format="vcf" label="Input SnpEff annotated M.tuberculosis VCF(s)" />
+    <param name="tbprofiler_json" type="data" format="json" optional="true" label="TBProfiler Drug Resistance Report (Optional)" help="--tbprofiler-report" />
+    <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" />
+    <section name="adv" title="Advanced options" expanded="false">
+      <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" />
+    </section>
+  </inputs>
+  <outputs>
+    <data name="variants_report_html" format="html" label="${tool.name} variants report (html) on ${on_string}" />
+    <data name="variants_report_txt" format="txt" label="${tool.name} variants report (text) on ${on_string}" />
+    <data name="drug_resistance_report_html" format="html" label="${tool.name} drug resistance report (html) on ${on_string}">
+      <filter>tbprofiler_json</filter>
+    </data>
+    <data name="drug_resistance_report_txt" format="txt" label="${tool.name} drug resistance report (text) on ${on_string}">
+      <filter>tbprofiler_json</filter>
+    </data>
+  </outputs>
+  <tests>
+    <test>
+      <param name="input_vcf" value="rif_resistant.vcf" ftype="vcf" />
+      <output name="variants_report_html" compare="diff" lines_diff="2" file="rif_resistant_variants_report.html" ftype="html" />
+      <output name="variants_report_txt" compare="diff" lines_diff="2" file="rif_resistant_variants_report.txt" ftype="txt" />
+    </test>
+    <test>
+      <param name="input_vcf" value="rif_resistant.vcf" ftype="vcf" />
+      <param name="tbprofiler_json" value="rif_resistant.results.json" ftype="json" />
+      <output name="variants_report_html" compare="diff" lines_diff="2" file="rif_resistant_variants_report.html" ftype="html" />
+      <output name="variants_report_txt" compare="diff" lines_diff="2" file="rif_resistant_variants_report.txt" ftype="txt" />
+      <output name="drug_resistance_report_html" file="rif_resistant_drug_resistance_report.html" lines_diff="2" ftype="html" />
+      <output name="drug_resistance_report_txt" compare="diff" lines_diff="2" file="rif_resistant_drug_resistance_report.txt" ftype="txt" />
+    </test>
+  </tests>
+  <help>
+    <![CDATA[
+    **tbvcfreport - @TOOL_VERSION@**
+
+    **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) 
+    and links to Combat-TB-eXplorer (https://explorer.sanbi.ac.za/).
+
+    **tbvcfreport** will generate an HTML-based Drug Resistance report if provided with a TBProfiler json report.
+    
+    Drug resistance predictions are for **Research Purposes Only** and are produced by TBProfiler (https://github.com/jodyphelan/TBProfiler)
+    
+    **Inputs**
+
+        - SnpEff annotated M.tuberculosis VCF file(s) - vcf - **required**
+        
+        - TBProfiler Drug Resistance JSON Report - json - **optional**
+
+    **Outputs**
+
+        - Variant Report in HTML and TXT format
+        
+        - Drug Resistance Report in HTML and TXT format if provided with a TBProfiler json report
+          
+        
+    **Advanced options**:
+
+        - database_uri - String - Use an on-premise COMBAT-TB-NeoDB (default 'neodb.sanbi.ac.za') - **optional**
+
+    **Further information**
+    
+    For more on the **COMBAT-TB Project**, see https://combattb.org.
+
+    For more on **tbvcfreport**, see https://github.com/COMBAT-TB/tbvcfreport.
+    
+    For more on **COMBAT-TB-NeoDB**, see https://github.com/COMBAT-TB/combat-tb-neodb.
+    ]]>
+  </help>
+  <citations>
+    <citation type="bibtex">
+@misc{githubtbvcfreport,
+  author = {COMBAT-TB},
+  year = {2019},
+  title = {tbvcfreport},
+  publisher = {GitHub},
+  journal = {GitHub repository},
+  url = {https://github.com/COMBAT-TB/tbvcfreport},
+}</citation>
+  </citations>
+</tool>
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant.results.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant.results.json Thu Aug 29 08:18:59 2019 -0400
[
@@ -0,0 +1,1 @@
+{"missing_pos": [["Chromosome", 763404], ["Chromosome", 763405], ["Chromosome", 763406], ["Chromosome", 763407], ["Chromosome", 763408], ["Chromosome", 763409], ["Chromosome", 763410], ["Chromosome", 763411], ["Chromosome", 763412], ["Chromosome", 763413], ["Chromosome", 763414], ["Chromosome", 763415], ["Chromosome", 763416], ["Chromosome", 763417], ["Chromosome", 763418], ["Chromosome", 763419], ["Chromosome", 763420], ["Chromosome", 1834082], ["Chromosome", 1834083], ["Chromosome", 1834084], ["Chromosome", 1834085], ["Chromosome", 1834086], ["Chromosome", 1834087], ["Chromosome", 1834088], ["Chromosome", 1834089], ["Chromosome", 1834090], ["Chromosome", 1834091], ["Chromosome", 1834092], ["Chromosome", 1834093], ["Chromosome", 1834094], ["Chromosome", 1834095], ["Chromosome", 1834251], ["Chromosome", 1834252], ["Chromosome", 1834253], ["Chromosome", 1834254], ["Chromosome", 1834255], ["Chromosome", 1834256], ["Chromosome", 1834257], ["Chromosome", 1834258], ["Chromosome", 1834259], ["Chromosome", 1834260], ["Chromosome", 1834261], ["Chromosome", 1834262], ["Chromosome", 1834263], ["Chromosome", 1834264], ["Chromosome", 1834265], ["Chromosome", 1834266], ["Chromosome", 1834267], ["Chromosome", 1834268], ["Chromosome", 1834269], ["Chromosome", 1834270], ["Chromosome", 1834271], ["Chromosome", 1834272], ["Chromosome", 1834273], ["Chromosome", 4245997], ["Chromosome", 4245998], ["Chromosome", 4245999], ["Chromosome", 4246000], ["Chromosome", 4246001], ["Chromosome", 4246002], ["Chromosome", 4246003], ["Chromosome", 4246004], ["Chromosome", 4246005], ["Chromosome", 4246006], ["Chromosome", 4246007], ["Chromosome", 4246008], ["Chromosome", 4246009], ["Chromosome", 4246010], ["Chromosome", 4246011], ["Chromosome", 4246012], ["Chromosome", 4246155], ["Chromosome", 4246156], ["Chromosome", 4246157], ["Chromosome", 4246158], ["Chromosome", 4246159], ["Chromosome", 4246160], ["Chromosome", 4246161], ["Chromosome", 4246162], ["Chromosome", 4246163], ["Chromosome", 4246164], ["Chromosome", 4246165], ["Chromosome", 4246166], ["Chromosome", 4246167], ["Chromosome", 4246168], ["Chromosome", 4246169], ["Chromosome", 4246170], ["Chromosome", 4246171], ["Chromosome", 4246172], ["Chromosome", 4246173], ["Chromosome", 4246174], ["Chromosome", 4246175], ["Chromosome", 4246176], ["Chromosome", 4246177], ["Chromosome", 4246178], ["Chromosome", 4246179], ["Chromosome", 4246180], ["Chromosome", 4246181], ["Chromosome", 4246182], ["Chromosome", 4246183], ["Chromosome", 4246184], ["Chromosome", 4248018], ["Chromosome", 4248019], ["Chromosome", 4248020], ["Chromosome", 4248021], ["Chromosome", 4248022], ["Chromosome", 4248023], ["Chromosome", 4248024], ["Chromosome", 4248025], ["Chromosome", 4248026], ["Chromosome", 4248027], ["Chromosome", 4248028], ["Chromosome", 4248029], ["Chromosome", 4248030], ["Chromosome", 4248031], ["Chromosome", 4248032], ["Chromosome", 4248033], ["Chromosome", 4248034], ["Chromosome", 4248035], ["Chromosome", 4248036], ["Chromosome", 4248037], ["Chromosome", 4248038], ["Chromosome", 4248039], ["Chromosome", 4248040], ["Chromosome", 4248041], ["Chromosome", 4248042], ["Chromosome", 4248043], ["Chromosome", 4248044], ["Chromosome", 4248045], ["Chromosome", 4248046], ["Chromosome", 4248047], ["Chromosome", 4248184], ["Chromosome", 4248185], ["Chromosome", 4248186], ["Chromosome", 4248187], ["Chromosome", 4248188], ["Chromosome", 4248189], ["Chromosome", 4248190], ["Chromosome", 4248191], ["Chromosome", 4248192], ["Chromosome", 4248193], ["Chromosome", 4248194], ["Chromosome", 4248195], ["Chromosome", 4248196], ["Chromosome", 4248197], ["Chromosome", 4248198], ["Chromosome", 4248199], ["Chromosome", 4248200], ["Chromosome", 4248201], ["Chromosome", 4248202], ["Chromosome", 4248203], ["Chromosome", 4248204], ["Chromosome", 4248205], ["Chromosome", 4248206], ["Chromosome", 4248207], ["Chromosome", 4248208], ["Chromosome", 4248209], ["Chromosome", 4248210], ["Chromosome", 4248211], ["Chromosome", 4248212], ["Chromosome", 4248213], ["Chromosome", 4248214], ["Chromosome", 4248215]], "qc": {"pct_reads_mapped": 87.21, "num_reads_mapped": 5515}, "missing_regions": {"Rv0005": 1.0, "Rv0006": 1.0, "Rv0667": 0.0, "Rv0668": 0.9804707060590886, "Rv0678": 1.0, "Rv0682": 1.0, "Rv0701": 1.0, "Rv1267c": 1.0, "rrs": 1.0, "rrl": 1.0, "Rv1483": 1.0, "Rv1484": 1.0, "Rv1630": 0.9029247044181705, "Rv1694": 1.0, "Rv1908c": 1.0, "Rv2043c": 1.0, "Rv2245": 1.0, "Rv2416c": 1.0, "Rv2428": 1.0, "Rv2447c": 1.0, "Rv2671": 1.0, "Rv2754c": 1.0, "Rv2764c": 1.0, "Rv2780": 1.0, "Rv3261": 1.0, "Rv3423c": 1.0, "Rv3601c": 1.0, "Rv3793": 1.0, "Rv3794": 0.9575037147102526, "Rv3795": 0.9584344660194175, "Rv3854c": 1.0, "Rv3855": 1.0, "Rv3919c": 1.0}, "lineage": [{"lin": "lineage2", "family": "East-Asian", "spoligotype": "Beijing", "rd": "RD105", "frac": 1.0}, {"lin": "lineage2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD207", "rd": "RD105;RD207", "frac": 1.0}, {"lin": "lineage2.2.2", "family": "East-Asian (Beijing)", "spoligotype": "Beijing-RD105/RD207", "rd": "RD105;RD207", "frac": 1.0}], "main_lin": "lineage2", "sublin": "lineage2.2.2", "dr_variants": [{"sample": "rif_resistant", "chr": "Chromosome", "genome_pos": 761110, "type": "missense", "change": "p.Asp435Val", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "435D>435V", "drug": "rifampicin"}], "other_variants": [{"sample": "rif_resistant", "chr": "Chromosome", "genome_pos": 763031, "type": "synonymous", "change": "c.3225T>C", "freq": 1.0, "locus_tag": "Rv0667", "gene": "rpoB", "_internal_change": "3225T>C"}, {"sample": "rif_resistant", "chr": "Chromosome", "genome_pos": 1834177, "type": "synonymous", "change": "c.636A>C", "freq": 1.0, "locus_tag": "Rv1630", "gene": "rpsA", "_internal_change": "636A>C"}], "XDR": "", "MDR": "", "drtype": "Drug-resistant", "id": "rif_resistant", "tbprofiler_version": "2.1.0", "pipeline": {"mapper": "bwa", "variant_caller": "BCFtools"}}
\ No newline at end of file
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant.vcf Thu Aug 29 08:18:59 2019 -0400
b
@@ -0,0 +1,53 @@
+##fileformat=VCFv4.2
+##FILTER=<ID=PASS,Description="All filters passed">
+##bcftoolsVersion=1.9+htslib-1.9
+##bcftoolsCommand=mpileup --fasta-ref /home/pvh/Data/fasta/Mycobacterium_tuberculosis_h37rv.GCA_000195955.2.29.dna.chromosome.Chromosome.fa rif_resistant.bam
+##reference=file:///home/pvh/Data/fasta/Mycobacterium_tuberculosis_h37rv.GCA_000195955.2.29.dna.chromosome.Chromosome.fa
+##contig=<ID=MT_H37RV_BRD_V5,length=4411532>
+##ALT=<ID=*,Description="Represents allele(s) other than observed.">
+##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
+##INFO=<ID=IDV,Number=1,Type=Integer,Description="Maximum number of reads supporting an indel">
+##INFO=<ID=IMF,Number=1,Type=Float,Description="Maximum fraction of reads supporting an indel">
+##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw read depth">
+##INFO=<ID=VDB,Number=1,Type=Float,Description="Variant Distance Bias for filtering splice-site artefacts in RNA-seq data (bigger is better)",Version="3">
+##INFO=<ID=RPB,Number=1,Type=Float,Description="Mann-Whitney U test of Read Position Bias (bigger is better)">
+##INFO=<ID=MQB,Number=1,Type=Float,Description="Mann-Whitney U test of Mapping Quality Bias (bigger is better)">
+##INFO=<ID=BQB,Number=1,Type=Float,Description="Mann-Whitney U test of Base Quality Bias (bigger is better)">
+##INFO=<ID=MQSB,Number=1,Type=Float,Description="Mann-Whitney U test of Mapping Quality vs Strand Bias (bigger is better)">
+##INFO=<ID=SGB,Number=1,Type=Float,Description="Segregation based metric.">
+##INFO=<ID=MQ0F,Number=1,Type=Float,Description="Fraction of MQ0 reads (smaller is better)">
+##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele frequency (assuming HWE)">
+##INFO=<ID=AF2,Number=1,Type=Float,Description="Max-likelihood estimate of the first and second group ALT allele frequency (assuming HWE)">
+##INFO=<ID=AC1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele count (no HWE assumption)">
+##INFO=<ID=MQ,Number=1,Type=Integer,Description="Root-mean-square mapping quality of covering reads">
+##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability of all samples being the same">
+##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
+##INFO=<ID=G3,Number=3,Type=Float,Description="ML estimate of genotype frequencies">
+##INFO=<ID=HWE,Number=1,Type=Float,Description="Chi^2 based HWE test P-value based on G3">
+##INFO=<ID=DP4,Number=4,Type=Integer,Description="Number of high-quality ref-forward , ref-reverse, alt-forward and alt-reverse bases">
+##bcftools_callVersion=1.9+htslib-1.9
+##bcftools_callCommand=call --ploidy 1 -c -v rif_resistant.mpileup; Date=Tue Apr  2 06:47:33 2019
+#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT rif_resistant.bam
+MT_H37RV_BRD_V5 15890 . G A 225.007 . DP=58;VDB=0.0163018;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,29,24;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 154990 . G T 225.007 . DP=57;VDB=0.997362;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,18,38;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 346693 . G T 225.007 . DP=27;VDB=0.365109;SGB=-0.692976;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,14,12;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 449194 . G A 225.007 . DP=29;VDB=0.387982;SGB=-0.692976;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,5,21;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 497491 . G A 225.007 . DP=78;VDB=0.57291;SGB=-0.693147;MQSB=0.99133;MQ0F=0;AF1=1;AC1=1;DP4=0,0,53,24;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 761110 . A T 225.007 . DP=59;VDB=0.35459;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,25,32;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 763031 . T C 225.007 . DP=85;VDB=0.401561;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,38,46;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 811753 . C T 225.007 . DP=55;VDB=0.241716;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,27,24;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 1565566 . C T 225.007 . DP=52;VDB=0.650985;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,13,36;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 1833729 . TCCCC TCCCCCC 12.7055 . INDEL;IDV=1;IMF=1;DP=1;SGB=-0.379885;MQ0F=0;AF1=1;AC1=1;DP4=0,0,0,1;MQ=54;FQ=-999 GT:PL 1:50,3,0
+MT_H37RV_BRD_V5 1834177 . A C 225.007 . DP=76;VDB=0.880419;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,42,29;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 1849051 . C T 225.007 . DP=86;VDB=0.199205;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,38,45;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 2505085 . G A 225.007 . DP=48;VDB=0.280048;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,32,13;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 2543395 . T C 225.007 . DP=88;VDB=0.167176;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,37,46;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 2640807 . G A 225.007 . DP=55;VDB=0.218547;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,29,21;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 2775361 . C T 225.007 . DP=99;VDB=0.0864314;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,46,44;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 2789798 . G T 225.007 . DP=72;VDB=0.231858;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,33,35;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 3477942 . A G 225.007 . DP=100;VDB=0.912557;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,45,52;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 3587446 . G A 225.007 . DP=59;VDB=0.0078857;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,33,24;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 4254431 . G A 225.007 . DP=58;VDB=0.120561;SGB=-0.693147;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,25,33;MQ=60;FQ=-999 GT:PL 1:255,0
+MT_H37RV_BRD_V5 4254477 . T C 225.007 . DP=30;VDB=0.000342098;SGB=-0.693021;MQSB=1;MQ0F=0;AF1=1;AC1=1;DP4=0,0,10,17;MQ=60;FQ=-999 GT:PL 1:255,0
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant_drug_resistance_report.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant_drug_resistance_report.html Thu Aug 29 08:18:59 2019 -0400
[
b'@@ -0,0 +1,202 @@\n+<!DOCTYPE html>\n+<html>\n+\n+<head>\n+        <title></title>\n+    <meta charset="utf-8">\n+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">\n+    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"\n+        integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">\n+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">\n+    <link rel="stylesheet" type="text/css"\n+        href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.bootstrap4.min.css">\n+    <link rel="stylesheet" type="text/css"\n+        href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">\n+    </head>\n+\n+<body>\n+    <div class="container">\n+        <div class="row">\n+            <h2 class="mt-5">\n+                rif_resistant Report\n+            </h2>\n+        </div>\n+                <div class="row">\n+            <table class="table table-striped table-hover">\n+                <caption>Lineage Info</caption>\n+                <thead class="thead-light">\n+                    <tr>\n+                        <th scope="col">Species</th>\n+                        <th scope="col">Lineage</th>\n+                        <th scope="col">Sub-lineage</th>\n+                        <th scope="col">Agreement with SNPs from this lineage</th>\n+                    </tr>\n+                </thead>\n+                <tbody>\n+                    <tr>\n+                        <td>M. tuberculosis</td>\n+                        <td>Lineage 4</td>\n+                        <td>\n+                                                        Not Available\n+                                                    </td>\n+                        <td>99%</td>\n+                    </tr>\n+                </tbody>\n+            </table>\n+        </div>\n+                        <hr>\n+        <div class="row">\n+    <h3 class="mb-2">\n+        <a class="text-body" href="https://github.com/jodyphelan/TBProfiler" target="_blank"\n+            rel="noreferrer noopener">TBProfiler</a>\n+        Drug Resistance Report\n+    </h3>\n+</div>\n+<div class="row">\n+    <table id="drug_resistance" class="table table-hover table-bordered table-striped table-sm" cellspacing="0">\n+        <caption class="mb-3 text-info">\n+            <strong>Disclaimer</strong>:\n+            Drug resistance predictions are for <strong>Research Purposes Only</strong> and are produced by\n+            <a class="text-info" href="https://github.com/jodyphelan/TBProfiler" target="_blank"\n+                rel="noreferrer noopener">TBProfiler</a>.\n+        </caption>\n+        <thead class="thead-light">\n+            <tr>\n+                <th scope="col">Drug</th>\n+                <th scope="col">Resistance</th>\n+                <th scope="col">Supporting Mutations</th>\n+            </tr>\n+        </thead>\n+                <tr>\n+            <td>Isoniazid</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Rifampicin</td>\n+            <td>R</td>\n+            <td>                <a target="_blank" href="https://explorer.sanbi.ac.za/gene?q=rpoB"\n+                    rel="noreferrer noopener">rpoB</a>\n+                (1.0 p.Asp435Val)\n+                </td>\n+        </tr>\n+                <tr>\n+            <td>Ethambutol</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Pyrazinamide</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Streptomycin</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Ethionamide</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Fluoroquinolones</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+      '..b'   <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Capreomycin</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Kanamycin</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Para-aminosalicylic acid</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Linezolid</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Cycloserine</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Delaminid</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Clofazimine</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+                <tr>\n+            <td>Bedaquiline</td>\n+            <td>S</td>\n+            <td></td>\n+        </tr>\n+            </table>\n+</div>\n+                <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"\n+            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">\n+        </script>\n+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"\n+            integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous">\n+        </script>\n+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"\n+            integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous">\n+        </script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.bootstrap4.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>\n+        <script type="text/javascript" charset="utf8"\n+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.colVis.min.js"></script>\n+        <script type="text/javascript" language="javascript" class="init">\n+            $(function () {\n+                var table = $(\'#vcfreport\').DataTable({\n+                    lengthChange: false,\n+                    buttons: [{\n+                        extend: \'csv\',\n+                        text: \'Download CSV\',\n+                        filename: \'rif_resistant\'\n+                    }]\n+                });\n+                table.buttons().container().appendTo(\'#vcfreport_wrapper .col-md-6:eq(0)\');\n+            });\n+        </script>\n+            </div>\n+</body>\n+\n+</html>\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant_drug_resistance_report.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant_drug_resistance_report.txt Thu Aug 29 08:18:59 2019 -0400
b
@@ -0,0 +1,25 @@
+#Rif_resistant Report
+#Species Lineage Sub-lineage Agreement
+M. tuberculosis Lineage 4 99%
+
+#TBProfiler Drug Resistance Report
+
+#Drug Resistance Supporting Mutations
+Isoniazid S
+Rifampicin R rpoB(1.0-p.Asp435Val)
+Ethambutol S
+Pyrazinamide S
+Streptomycin S
+Ethionamide S
+Fluoroquinolones S
+Amikacin S
+Capreomycin S
+Kanamycin S
+Para-aminosalicylic acid S
+Linezolid S
+Cycloserine S
+Delaminid S
+Clofazimine S
+Bedaquiline S
+
+#Drug resistance predictions are for research purposes only and are produced by the TBProfiler software.
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant_variants_report.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant_variants_report.html Thu Aug 29 08:18:59 2019 -0400
[
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+        <title></title>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"
+        integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
+    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
+    <link rel="stylesheet" type="text/css"
+        href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.bootstrap4.min.css">
+    <link rel="stylesheet" type="text/css"
+        href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">
+    </head>
+
+<body>
+    <div class="container">
+        <div class="row">
+            <h2 class="mt-5">
+                rif_resistant Report
+            </h2>
+        </div>
+                <div class="row">
+            <table class="table table-striped table-hover">
+                <caption>Lineage Info</caption>
+                <thead class="thead-light">
+                    <tr>
+                        <th scope="col">Species</th>
+                        <th scope="col">Lineage</th>
+                        <th scope="col">Sub-lineage</th>
+                        <th scope="col">Agreement with SNPs from this lineage</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td>M. tuberculosis</td>
+                        <td>Lineage 4</td>
+                        <td>
+                                                        Not Available
+                                                    </td>
+                        <td>99%</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+                        <hr>
+        <div>
+    <p>No variant data was found for this VCF file. Is it a <a href="http://snpeff.sourceforge.net/SnpEff_manual.html"
+            target="_blank" rel="noreferrer noopener">SnpEff</a> annotated VCF file?</p>
+    <p>Kindly check if the '<strong>ANN</strong>' field is present.</p>
+</div>
+                <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
+            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
+        </script>
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
+            integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous">
+        </script>
+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
+            integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous">
+        </script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.bootstrap4.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>
+        <script type="text/javascript" charset="utf8"
+            src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.colVis.min.js"></script>
+        <script type="text/javascript" language="javascript" class="init">
+            $(function () {
+                var table = $('#vcfreport').DataTable({
+                    lengthChange: false,
+                    buttons: [{
+                        extend: 'csv',
+                        text: 'Download CSV',
+                        filename: 'rif_resistant'
+                    }]
+                });
+                table.buttons().container().appendTo('#vcfreport_wrapper .col-md-6:eq(0)');
+            });
+        </script>
+            </div>
+</body>
+
+</html>
\ No newline at end of file
b
diff -r 000000000000 -r 02d81b994ef5 test-data/rif_resistant_variants_report.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rif_resistant_variants_report.txt Thu Aug 29 08:18:59 2019 -0400
b
@@ -0,0 +1,5 @@
+#Rif_resistant Report
+#Species Lineage Sub-lineage Agreement
+M. tuberculosis Lineage 4 99%
+
+#CHR GENE IDENTIFIER PRODUCT TYPE ANNOTATION POS REF ALT CONSEQUENCE IMPACT PATHAWAY