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!
1 answer
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?
Log in to answer this question.