JetBrains-Research / jbr

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

Error loading zero bytes track with index #162

Open olegs opened 3 years ago

olegs commented 3 years ago

File /Users/Oleg.Shpynov/Desktop/2021_comparative_analysis/fdr0.05/H1_H3K79me2_2_1__broad0.05_peaks.broadPeak is zero bytes long.

[Aug 24, 2021 14:12:45] ERROR TrackViewLoader Cannot load Track "H1_H3K79me2_2_1__broad0.05_peaks.broadPeak" file:
Caused by: ERROR IllegalArgumentException finalFilePosition != 0, -> 0
htsjdk.tribble.index.linear.LinearIndexCreator.finalizeIndex(LinearIndexCreator.java:114)
htsjdk.tribble.index.IndexFactory.createIndex(IndexFactory.java:401)
htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:242)
htsjdk.tribble.index.IndexFactory.createLinearIndex(IndexFactory.java:228)
org.jetbrains.bio.browser.tracks.IndexedBedTrackView$Companion.create(IndexedBedTrackView.kt:233)
org.jetbrains.bio.browser.tracks.IndexedBedTrackView$Companion.create$default(IndexedBedTrackView.kt:219)
org.jetbrains.bio.browser.file.PeaksTrackViewExtensionPoint$Companion$BED_LOCATIONS$1.createTrackViewImpl(TrackViewTypeExtensionPoints.kt:98)
org.jetbrains.bio.browser.file.PeaksTrackViewExtensionPoint$Companion$BED_LOCATIONS$1.createTrackViewImpl(TrackViewTypeExtensionPoints.kt:90)
org.jetbrains.bio.browser.file.TrackViewType.createTrackView(TrackViewType.kt:46)
org.jetbrains.bio.browser.file.TrackViewLoader.createTrackViews(TrackViewLoader.kt:53)
org.jetbrains.bio.browser.file.Session$Companion$new$1.invoke(Session.kt:176)
org.jetbrains.bio.browser.file.Session$Companion$new$1.invoke(Session.kt:117)
org.jetbrains.bio.browser.desktop.DesktopGenomeBrowser$addAndProcessNewTracks$1.invoke(DesktopGenomeBrowser.kt:341)
org.jetbrains.bio.browser.desktop.DesktopGenomeBrowser$addAndProcessNewTracks$1.invoke(DesktopGenomeBrowser.kt:42)
org.jetbrains.bio.browser.desktop.dialogs.ProgressDialog$display$block$1$1.run(ProgressDialog.kt:173)
java.lang.Thread.run(Thread.java:748)
receed commented 3 years ago

Setting minimal size of file for which index is used (https://github.com/JetBrains-Research/epigenome/pull/1455/commits/44d52565c57fc269486bec76368c15975ba54d7b) fixed this, but the issue may become relevant again if the user is prompted whether index should be used or not.