failed to convert from cram to bam (parse error CIGAR character)

In order to convert a bioinformatic file from CRAM to BAM format, I naively used the samtools command available on a cluster but got this error:

samtools view -T reference.fa -b -o output.bam input.cram
[sam_header_read2] 3366 sequences loaded.
[sam_read1] reference 'VN:1.4' is recognized as '*'.
Parse error at line 1: invalid CIGAR character

After a few commands trying to fix the issue, I realised that the error message contained the SAM label. This indicates that samtools version is a bit old. And indeed it was. I then used version 1.6 of samtools and it worked out of the box.

Please follow and like us:
error
This entry was posted in bioinformatics and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.