igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need an error message if the wrong reference genome is being used

stevekm opened this issue · comments

Just spent a lot of time trying to debug why the output html reports were not working, getting errors like this in the Firefox web console;

Error: Unrecognized locus chr5:181224454-181224494
Uncaught (in promise) TypeError: e is undefined


Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: file:///Users/steve/Downloads/igvjs_viewer-2.html
Source Map URL: igv.css.map

Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: file:///Users/steve/Downloads/igvjs_viewer-2.html
Source Map URL: igv.min.js.map

with the variant table showing but the IGV browser not showing up

Turns out its because I was using hg19 instead of hg38;

create_report \
--standalone \
--ideogram /igv-reports/examples/variants/cytoBandIdeo.txt \
--flanking 1000 \
--info-columns GENE TISSUE TUMOR COSMIC_ID GENE SOMATIC \
--tracks \
/igv-reports/examples/variants/variants.vcf.gz \
/igv-reports/examples/variants/recalibrated.bam \
/igv-reports/examples/variants/refGene.sort.bed.gz \
--output igvjs_viewer.html \
/igv-reports/examples/variants/variants.vcf.gz \
hg19.fasta

Would have been really nice to have gotten an error about this from create_report instead of having to debug it inside the web browser after loading the HTML report output. Is that possible?

@stevekm How would IGV know what reference you intended to use? Secondly, the wrong reference should not give you those messages. Actually maybe the first one, the other 2 are not actual errors.

I am not sure but it would be helpful to know when creating the report that my input is going to break IGV. Especially since broken IGV in the web browser does not produce a readily visible error message like the command line would, I never would have know what was going on if I did not know to check the browser console. Maybe its outside the scope of igv-reports

I'll close this since it sounds like something outside the scope of igv-reports

I'm reopening to see if I can reproduce that first error. There is no way to know what reference genome you intend, but you shouldn't get an error. I suspect the igv.js version embedded here is out of date.

I'm closing this, I can't reproduce the error using your command line with an hg19 fasta, specifically I tried

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.hg19.html

Its possible this was due to out-of-date code in the previous pypi release.