Hi,
I have scaffold level data, and I know the chromosomal assignment of each scaffold, and am trying to rename each scaffold to each chromosome it belongs to.
Here's the command I tried to rename one scaffold to chromosome 1 as a test:
samtools view -h s2907.bam |sed -e 's/SN:QRBIO1000092.1/SN:chr1/' | samtools reheader - s2907.bam > test_s2907.bam
It appears to work, but then when I check the test_s2907.bam file, the original scaffold name (QRBIO1000092.1) is still there, not the new chromosome name (chr1) I tried to assign.
I'd appreciate any help.
Thanks.
Any help is appreciated.