Entering edit mode
6.0 years ago
jonessara770
▴
240
Hi,
I have a bam file that chromosome names are like chr1, chr2 etc. I want to convert it to the form where chromosome naming is just numbered e.g. 1,2,3. I don't know how to change the below code for removing chr instead of adding it?
samtools view -h $B | \
sed -e '/^@SQ/s/SN\:/SN\:chr/' -e '/^[^@]/s/\t/\tchr/2' | \
samtools view -bS - > temp.bam
Thanks Sara
duplicates: Bam File: Change Chromosome Notation ; Change Notation Of Chromosome In Bam File ;