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
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
Please be as complete as possible and add the following:
Command for converting sam to bam file:
Command for sorting:
Command for indexing: