JetBrains-Research / jbr

JBR Genome Browser
https://doi.org/10.1093/bioinformatics/btab376
11 stars 0 forks source link

UncheckedIOException: Error loading chrY from ~/.jbr_browser/genomes/hg38/hg38.2bit #197

Closed iromeo closed 1 year ago

iromeo commented 1 year ago

An exception sometimes occurs on BAM fast scrolling:

java.io.UncheckedIOException: Error loading chrY from /Users/romeo/.jbr_browser/genomes/hg38/hg38.2bit
    at org.jetbrains.bio.genome.Chromosome.getSequence(Genome.kt:564)
    at org.jetbrains.bio.browser.bam.BamTrackView.paintAlignments(BamTrackView.kt:470)
    at org.jetbrains.bio.browser.bam.BamTrackView.paintTrack(BamTrackView.kt:1103)
    at org.jetbrains.bio.browser.tracks.TrackViewRenderer.renderSingleLocationModel(TrackViewRenderer.kt:152)
    at org.jetbrains.bio.browser.tracks.TrackViewRenderer.renderTrack(TrackViewRenderer.kt:54)
    at org.jetbrains.bio.browser.desktop.TrackViewRenderComponent$restart$1$2.invoke(TrackViewRenderComponent.kt:102)
    at org.jetbrains.bio.browser.desktop.TrackViewRenderComponent$restart$1$2.invoke(TrackViewRenderComponent.kt:101)
    at org.jetbrains.bio.util.LoggerExtensionsKt.time(LoggerExtensions.kt:20)
    at org.jetbrains.bio.browser.desktop.TrackViewRenderComponent.restart$lambda-2(TrackViewRenderComponent.kt:101)
    at org.jetbrains.bio.util.CancellableTask.execute$lambda-1(Cancellable.kt:108)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.channels.ClosedByInterruptException: null
    at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:199)
    at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:171)
    at java.base/sun.nio.ch.FileChannelImpl.mapInternal(FileChannelImpl.java:1150)
    at java.base/sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:1032)
    at org.jetbrains.bio.genome.format.TwoBitReader.getBuffer(TwoBit.kt:315)
    at org.jetbrains.bio.genome.format.TwoBitReader.length(TwoBit.kt:256)
    at org.jetbrains.bio.genome.Chromosome.getSequence(Genome.kt:558)
    ... 13 common frames omitted
iromeo commented 1 year ago

Fixed in https://github.com/JetBrains-Research/epigenome/commit/a5d90c4b89569351f6b8535a98e9da371a75afcc, https://github.com/JetBrains-Research/epigenome/commit/6dcbbc2cf5ddd921e890eebff81d47a430cff412