This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Picard Exception: "Multiple Samrecord With Read Name..."

Hi folks:

How to get around that exception?

So, I am iterating over mapped to genome pairs using SAMRecordIterator, and when I am trying to retrieve the mate's SAMRecord by calling readerRight.queryMate(samRecord) I am having that exception:

 net.sf.samtools.SAMFormatException: Multiple SAMRecord with read name HWI-ST314_0082:8:1107:19789:73933#ATCACG for first end.
    at net.sf.samtools.SAMFileReader.queryMate(SAMFileReader.java:474)...

Is there a way to get them all - those mate-pair records - as a collection??

picard java

1 answer

It seems you have multiple reads with same read name. Grep the input file to check those reads.

well, i do understand that, moreover, i have they names and can get them iterating with a second instance of samiterator, theoretically... just seems to be odd to see that exception and being unable to get ALL of them to deal with in the same loop.

Log in to answer this question.