Sorry to bother all you experts but I have a "newbie" problem. Please help!!
I want to filter my BAM sequencing files to get rid of all alignments that map to regions such as chrM etc. I've tried using the "Filter SAM/BAM, output SAM/BAM" module for this and by inputting into the "Select region parameter" chr1 chr2 etc etc (to include all 22 plus X and Y). However I keep getting the error message:-
[bam_index_core] the alignment is not sorted (NS500375:111:HCM3KBGXX:1:21112:6686:13429): 134945990 > 72989 in 2-th chr [bam_index_build2] fail to index the BAM file. *** glibc detected *** python: double free or corruption (!prev): 0x00000000077c6440 **
I thought this would be due to the fact that my BAM files are not co-ordinate sorted. I've tried running the SortSam module (Picard tools) and the Sort module (SAM tools) and this didn't fix the problem. I don't think it is an issue with my files not being co-ordinate sorted as I've managed to use them in Picard.MarkDuplicates in the publicly available GenePattern software suite. I think someone may have had a similar issue with this before and you were trying to sort it. Have you managed to figure it out yet? I'm a little bit stuck with my analysis otherwise!
Thanks in advance