I have a bam file with chromosomal notation 1,2.... and i need it to be as chr1,chr2.....
For this i have tried, samtools view -H sample.bam > header.sam
Then edited the header.sam file with required chromosomal notation and tried samtools reheader header.sam sample.bam > out.bam
when in tried to view out.bam using samtools it says "Segemntation fault".
I also tried with PICARD, java -Xmx4g -jar ReplaceSamHeader.jar INPUT=sample.bam HEADER=header.sam OUTPUT=out.bam CREATE_INDEX=TRUE
It reports the same error with samtools i.e. segmenation fault.
Could anyone help me to fix this?
This question has been answered elsewhere: Bam File: Change Chromosome Notation (see my script there). I think segmentation fault means your computer ran out of memory.