JetBrains-Research / span

SPAN Semi-supervised Peak Analyzer
https://doi.org/10.1093/bioinformatics/btab376
MIT License
9 stars 1 forks source link

Invalid coverage caches: fail or recreate? #2

Closed dievsky closed 5 years ago

dievsky commented 5 years ago
java.lang.IllegalStateException: Cache file [cache].npz doesn't contain chr6_ssto_hap7/+.
It's likely that chrom.sizes file used for its creation differs from the one being used to read it now.
If problem persists, delete the cache file [cache].npz and Span will recreate it with correct settings.
dievsky commented 5 years ago

Though on further thought, there's not much we can do about it. It's too dangerous to just ignore the missing data. The one thing that we could do is to force Span to recreate the cache if it's invalid, instead of informing the user that they should do it.

olegs commented 5 years ago

Luckily JBR is compatible!

dievsky commented 5 years ago

Mostly because JBR doesn't use the coverage cache files. :))

dievsky commented 5 years ago

So, to reiterate, the question is: should Span just delete and create coverage caches if invalid, or continue to fail with an exception, like now?

Pros:

Cons:

It should be noted that cache creation normally takes only about a few minutes. Anyway, there's no need to change this in the upcoming release. This can wait until a later time.

olegs commented 5 years ago

I think that failure is better option here, given the user instructions how to overcome this. Deleting something by mistake is worse than making user to remove caches manually.

dievsky commented 5 years ago

If you say so. (Deleting a cache is not such a big deal, though.) Since instructions are already being provided, I'm closing this as won't-fix.