Question: Convert Plink files to UCSC BED files
0
gravatar for devenvyas
2.9 years ago by
devenvyas580
Stony Brook
devenvyas580 wrote:

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!

ucsc snp • 1.3k views
ADD COMMENTlink modified 2.8 years ago by Vincent Laufer1.0k • written 2.9 years ago by devenvyas580
0
gravatar for Vincent Laufer
2.8 years ago by
Vincent Laufer1.0k
United States
Vincent Laufer1.0k wrote:

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 COMMENTlink written 2.8 years ago by Vincent Laufer1.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1252 users visited in the last hour