Convert Plink files to UCSC BED files
1
0
Entering edit mode
7.7 years ago
devenvyas ▴ 740

I have a Plink dataset, and I have been suggested to load it into UCSC Genome Browser (see http://biology.stackexchange.com/questions/50567/figuring-out-if-populations-from-two-regions-share-the-same-neanderthal-haplotyp for more details). To do so, I need to convert to BED/GFF/GTF files, and I have been told that BED files are the easiest.

I was wondering anyone here can show me how to do that? Thanks!

snp UCSC • 3.3k views
ADD COMMENT
1
Entering edit mode
7.7 years ago
LauferVA 4.2k

I will answer this question with the hope of drawing out a bit more information - I think you will see why.

Assuming you have a .map file of the form:

 1  snp1   0  5000650

(that is chr SNP_ID GD Position)

and you want a .bed of the form specified in https://genome.ucsc.edu/FAQ/FAQformat.html#format1

you could write

awk '{print $1, $4-1, $4}' my.map > my.bed

As this contains the 3 required fields to make a bed, it qualifies as a .bed file. However this exercise is nearly meaningless unless you then add annotations that you would like to view using UCSC.

Thus, if someone has suggested this to you, I am assuming that you have other files that give you some interesting values for each variant; ones that you might like to visualize. Is this the case?

ADD COMMENT

Login before adding your answer.

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