IGV error: Error loading SAM header: For sequence 34711, text and binary have different lengths in file.
HI,
I have sam file and I converted into a bam and later sorted it. I also created bam index for the sorted_bam file. When I am trying to load the bam files into IGV, I am getting the following error:
Error loading SAM header: For sequence 34711, text and binary have different lengths in file.
Can I anyone guide me why the error is popping out.
Thanks in advance
• 4,120 views
•
link
1 answer
Usually I see that different lengths in file error when different versions of the reference assembly have been used in whatever process is being performed. In this case, if the reference.fa you used for building a bam index is different from the original sam alignment, you get this error.
• 0 views
•
link
Log in to answer this question.
Please be as complete as possible and add the following:
Command for converting sam to bam file:
Command for sorting:
Command for indexing:
error is here: https://github.com/samtools/htsjdk/blob/master/src/main/java/htsjdk/samtools/BAMFileReader.java#L686
it happens when you have a difference between the chromosome/contig associated to your read, and what was defined in the SAM header. Did you re-header something ?
All i did was mapping the reads onto transcriptome and obtained a sam file which is later converted into bam as I shown below. Is there any way to look which transcript_Id/Contig_Id got corrupted? or should I have to remap