Does header replacement have an effect on alignment part in a BAM file?
1
0
Entering edit mode
7.9 years ago
tlgolan • 0

Hi, Does a change of BAM header (using the reheader funcion of GALAXY genome) change the alignment data? Thanks, Tal

header BAM • 1.2k views
ADD COMMENT
0
Entering edit mode
7.9 years ago

It can, yes. You can change the names of chromosomes (e.g., "chr1" -> "1"), but don't change their order or remove chromosomes/contigs, since that'll screw up the alignments.

ADD COMMENT
0
Entering edit mode

Hi Devon, Thanks for your answer. My strategy for changing the names of chromosomes is to change the header of the file (I am replacing the header with another header of BAM files with chr prefix and I am wondering if this step will damage the data; in both cases the reads are arranged according to their coordinates)

ADD REPLY
0
Entering edit mode

As long as you're only adding/removing "chr" (or changing "MT" to "chrM") then you'll be OK. That won't mess up any of the alignments. The alignments themselves don't actually contain the chromosome name that they're aligned to. They just contain a number saying which chromosome in the header they're on. So changing names is fine, but if you happen to change the order at all then the number held in the alignments will suddenly be the wrong chromosome (this has caused a number of people to have very very bad days).

ADD REPLY

Login before adding your answer.

Traffic: 1318 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6