0

I have an issue with intermittently getting an exception from htsjdk.samtools.reference.IndexedFastaSequenceFile:

htsjdk.samtools.SAMException: Sequence dictionary and index contain different numbers of contigs or htsjdk.samtools.SAMException: Unable to get ...

The problem is that I'm invoking the same code over and over and only getting this error intermittently.

I propose that the error message is in fact misleading, particularly in the case of the sequence dictionary response.

Kyle
  • 401
  • 4
  • 10

1 Answers1

0

I eventually tracked this down to a thread interrupt exception.
The program was using multiple threads each with it's own instance of the fasta reader. I redesigned the software so that I do not call interrupt on the thread and close by a different mechanism but this took quite a while to track down.

Perhaps obvious in retrospect.

Suggestion, htsjdk.samtools should try to catch interrupt exceptions so that it's easier to track down what the problem is.

Kyle
  • 401
  • 4
  • 10