nh13 / SRMA

Short-read Micro-Aligner

Home Page:http://srma.sf.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CIGAR should have zero elements for unmapped read

colindaven opened this issue · comments

I'll try to correct the BAM myself, if you have any suggestions which correction tool to use I'd be grateful.

Colin

Records processsed: 2817876 (last Mt:496782-496881)java.lang.RuntimeException: SAM validation error: ERROR: Record 2883069, Read name DE18INS651:91:D29G3ACXX:1:1206:12970:100434, CIGAR should have zero elements for unmapped read.
at net.sf.samtools.SAMUtils.processValidationErrors(SAMUtils.java:334)
at net.sf.samtools.BAMFileReader$BAMFileIterator.advance(BAMFileReader.java:449)
at net.sf.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:430)
at net.sf.samtools.BAMFileReader$BAMFileIterator.next(BAMFileReader.java:397)
at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:612)
at net.sf.samtools.SAMFileReader$AssertableIterator.next(SAMFileReader.java:590)
at srma.SAMRecordIO.getNextAlignRecord(SAMRecordIO.java:185)
at srma.SRMA.getNextAlignRecord(SRMA.java:333)
at srma.SRMA.doWork(SRMA.java:271)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:156)
at srma.SRMA.main(SRMA.java:98)

It's been a really long time since I have worked on this tool. Can you set the the VALIDATION_STRINGENCY to LENIENT or SILENT? Nonetheless, downstream tools likely would have a problem too. Consider using Picard's MergeBamAlignments to post-process the BAM produced by SRMA, similar to how it is used to post-process mapped BAMs.

Also, for a full-fix, I'd likely need a small/manageable test case on which to debug and test.

Hi, thanks for this. I've tried the validation fix, but to no avail. I have a few other errors too, but will need to demonstrate (if I can) in a test case. I have downloaded public data for this and will try to get it to you soon.

In most cases I can't post process SRMA output since I get this problem when using samtools index on output:
[bam_header_read] EOF marker is absent. The input is probably truncated.