Change chromosome names in bed file
1
0
Entering edit mode
2.3 years ago
rk.khayami94 ▴ 10

I have a bed file like this:

chr1    11869   12227   +       processed_transcript
chr2    12613   12721   +       processed_transcript
chr3    13221   14409   +       processed_transcript
chr4    12010   12057   +       transcribed_unprocessed_pseudogene
chr5    12179   12227   +       transcribed_unprocessed_pseudogene
`

I want to change the chromosomes to NCBI format which is like this:

NC_000001.11    11869   12227   +       processed_transcript
NC_000002.12    12613   12721   +       processed_transcript
NC_000003.12    13221   14409   +       processed_transcript
NC_000004.12    12010   12057   +       transcribed_unprocessed_pseudogene
NC_000005.10    12179   12227   +       transcribed_unprocessed_pseudogene

How to do that?

RNA-seq next-gen • 1.5k views
ADD COMMENT
4
Entering edit mode
2.3 years ago

find a file mapping the two notations e.g: https://github.com/dpryan79/ChromosomeMappings/blob/master/GRCh37_NCBI2UCSC.txt

sort both files on chromosome

join both files on the chromosome using join https://linux.die.net/man/1/join

ADD COMMENT
0
Entering edit mode

Thank you very much.

ADD REPLY

Login before adding your answer.

Traffic: 2073 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