igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
646 stars 387 forks source link

When I use igvtools count, keep getting error that " Cannot invoke "java.util.List.iterator()" because the return value of "org.broad.igv.feature.genome.Genome.getLongChromosomeNames()" is null" #1540

Closed leefall closed 3 months ago

leefall commented 3 months ago

I used command like below

igvtools count -z 5 -w 1 --query chr12:25245351-25245351 Addedsample-WES37.sorted_markdup.bam TestRunResult.tsv hg38

The bam files is indexed. Then this is log I got.

INFO [Aug 07,2024 23:08] [GenomeManager] Loading genome: /ahg/regevdata/projects/ICA_Lung/Wooseung/conda/spmg_r/share/igvtools-2.17.3-0/lib/genomes/hg38.chrom.sizes SEVERE [Aug 07,2024 23:08] [IgvTools] Cannot invoke "java.util.List.iterator()" because the return value of "org.broad.igv.feature.genome.Genome.getLongChromosomeNames()" is null SEVERE [Aug 07,2024 23:08] [IgvTools] java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "org.broad.igv.feature.genome.Genome.getLongChromosomeNames()" is null at org.igv/org.broad.igv.feature.genome.Genome.getWGLength(Genome.java:648) at org.igv/org.broad.igv.tools.IgvTools.doCount(IgvTools.java:861) at org.igv/org.broad.igv.tools.IgvTools.run(IgvTools.java:371) at org.igv/org.broad.igv.tools.IgvTools.main(IgvTools.java:254)

Done

I checked that ther is file of hg38.chrom.sizes like below

head /ahg/regevdata/projects/ICA_Lung/Wooseung/conda/spmg_r/share/igvtools-2.17.3-0/lib/genomes/hg38.chrom.sizes chr1 248956422 chr2 242193529 chr3 198295559 chr4 190214555 chr5 181538259 chr6 170805979 chr7 159345973 chr8 145138636 chr9 138394717 chr10 133797422

What is the issue to make this error?

jrobinso commented 3 months ago

Thanks for the report. This looks like a bug introduced in version 2.17. We will fix this for the next release. If you need a solution in the meantime you can download an earlier version from the archive https://data.broadinstitute.org/igv/projects/downloads/

leefall commented 3 months ago

Thank you. I really appreciate it.

helgathorv commented 3 months ago

Let's keep this open until it's been fixed.

jrobinso commented 3 months ago

This should be fixed in version 2.18.1

NanoCoreUSA commented 2 months ago

Can you please update the conda repo for igvtools with this fix please.

jrobinso commented 2 months ago

@NanoCoreUSA We don't update conda, I wasn't aware there was an igvtools in the conda repo. I'm unsure who added that.

NanoCoreUSA commented 2 months ago

@jrobinso Ah good to know... well whoever it is seems to update it relatively frequently. I just ended up installing an older version to get around this issue. Thanks for the info.