Okay, I've run out of ideas. I cannot get this BAM file to sort. I have a reference sequence in FASTA format that has 2 'Chromosomes' that are actually just scaffolds from a genome that isn't finished yet. The first time I ran my illumina reads through the workflow (BWA>SAM>BAM>sort>index... etc) Then when I tried to view it, it failed because there were replications in the BAM headers. I discovered that these were my fault from the python script I wrote to pull out the FASTA scaffolds that matched the gene I was looking for in the pile of scaffolds. Anyway: I fixed the script, and got the new reference, that is the same as the old one, but without the repetitive '>header' accidentally added 11 times. I ran BWA, no problem. I converted the SAM to BAM with samtools, no problem. But now I am trying to sort and index the BAM so I can look at it an whatnot, and the command I am running is:
samtools sort M6scaff_BWA.bam M6scaff_BWA.bam.sorted
the error I get is:
[bam_sort_core] merging from 142 files...
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated.
[E::hts_open] fail to open file 'M6scaff_BWA.sorted.0118.bam'
[bam_merge_core] fail to open file M6scaff_BWA.sorted.0118.bam
I have looked around the interwebs for a solution, and most of the people that have this error are using the -f argument in samtool sort, and when they remove it, it's fixed. I am not using the -f argument, so I have no recourse. Can someone please suggest something to try? I am banging my head against a wall for a whole weekend now, and I just don't know what to do.
Thanks so much
samtools sort M6scaff_BWA.bam M6scaff_BWA.bam.sorted
the error I get is:
[bam_sort_core] merging from 142 files...
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated.
[E::hts_open] fail to open file 'M6scaff_BWA.sorted.0118.bam'
[bam_merge_core] fail to open file M6scaff_BWA.sorted.0118.bam
I have looked around the interwebs for a solution, and most of the people that have this error are using the -f argument in samtool sort, and when they remove it, it's fixed. I am not using the -f argument, so I have no recourse. Can someone please suggest something to try? I am banging my head against a wall for a whole weekend now, and I just don't know what to do.
Thanks so much
Comment