Entering edit mode
12 weeks ago
While splitting my bam files using split command creates 'could not open file' error. my ulimit has been changed to unlimited. Headers in my bam file contain special characters like this '/'. Could headers be a reason for the problem?
PS- I could not edit my bam headers.
What was the commands you run? What errors did you get?
Sorry. This is the command I used:
Your command looks incomplete and the error message is referencing something not included in the command here. Is that a copy-paste error?
I am quite sure that the provided command is complete. Initially i thought I am encountering an error similar to these below,
But I could not get this rectified based on the solutions given there. So I suspect, it could be due to special characters in the headers. Could anyone help me edit/replace those special characters in the bam file headers?
You need to grab the header from the current file and then edit it to remove
/characters. Then use the edited header to reheader the BAM file. Process is roughly described here: Bam Header Edit
Take a look at
samtools reheaderin-line help.