igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
347 stars 51 forks source link

HTML report not generated if variant location does not exist (was HTML report does not work with hg19.fasta) #46

Closed stevekm closed 3 years ago

stevekm commented 3 years ago

I modified the example command to use the hg19 genome as shown;

create_report \
    examples/variants/variants.vcf.gz \
    https://s3.amazonaws.com/igv.broadinstitute.org/genomes/seq/hg19/hg19.fasta \
    --ideogram examples/variants/cytoBandIdeo.txt \
    --flanking 1000 \
    --info-columns GENE TISSUE TUMOR COSMIC_ID GENE SOMATIC \
    --tracks examples/variants/variants.vcf.gz examples/variants/recalibrated.bam \
    examples/variants/refGene.sort.bed.gz \
    --output igvjs_viewer.html

however the HTML output report does not show the IGV browser tracks. Is there something wrong with that genome file? I did not get any error messages.

jrobinso commented 3 years ago

@stevekm Thanks for the report. It took some investigation, but I found the issue. The vcf file references a location that doesn't exist in hg19, specifically the record below. Removing this from the VCF fixed the problem. The report doesn't handle this well, I will make a note to print a warning and exclude such loci, but this shouldn't occur with any real data.


chr5    181224474   .   G   A   349.77  PASS    GENE=TRIM41;AC=1;AF=0.5;AN=2;BaseQRankSum=0.32;DP=45;ExcessHet=3.0103;FS=1.237;MLEAC=1;MLEAF=0.5;MQ=60;MQRankSum=0;QD=7.77;ReadPosRankSum=0.504;SOR=0.945;ANN=A|missense_variant|MODERATE|TRIM41|TRIM41|transcript|NM_033549.4|Coding|1/6|c.475G>A|p.Glu159Lys|1212/3663|475/1893|159/630||,A|missense_variant|MODERATE|TRIM41|TRIM41|transcript|NM_201627.2|Coding|1/8|c.475G>A|p.Glu159Lys|1212/2723|475/1557|159/518||,A|non_coding_exon_variant|MODIFIER|TRIM41|TRIM41|transcript|NR_045218.1|Noncoding|1/7|n.1212G>A||||||;CHASM_PVALUE=0.0694;CHASM_FDR=0.15;VEST_PVALUE=0.48052;VEST_FDR=1   GT:AD:DP:GQ:PL  0/1:28,17:45:99:378,0,717
``
stevekm commented 3 years ago

Thanks for looking into this. Since hg19 is still relatively widely used, maybe it would be more helpful to just include an hg19 compatible example vcf? Or just regions in the current vcf that work in hg19.

stevekm commented 3 years ago

actually looks like this was a duplicate of this https://github.com/igvteam/igv-reports/issues/49 (or vice versa); feel free to close it if you like