How to convert plink data from 38th assembly to 37
1
1
Entering edit mode
7 months ago
eyb ▴ 230

My goal is to downgrade plink(.bed, bim, fam) data from the 38th build to 37. What is the easiest way to do this?

I was reading liftOver documentation and I am confused. Because it only accepts its own .bed format to do the lifting. It looks like I can prepare such a file, from plink bim, but what with the rest plink files, bed, and fam? Are they not require any modification? Also if I were to create a liftOver bed file, I notice that there are two coordinates for each SNP:

chr1    743267  743268  rs3115860
chr1    766408  766409  rs12124819
chr1    773885  773886  rs17160939

And there is only one coordinate in the plink .map file, how do I convert my map file?

assembly SNP plink liftOver genome • 520 views
ADD COMMENT
0
Entering edit mode

Hi,

There is a liftover library in python that you could use to liftover only a position like in

from pyliftover import LiftOver
lo = LiftOver('hg17', 'hg18')
lo.convert_coordinate('chr1', 1000000)

To convert the map file to bed you can add 1 for the second coordinate

ADD REPLY
1
Entering edit mode
9 weeks ago
wenbinm ▴ 40

I am having the same problem. This tool offers a good tutorial and a script to lift plink format data: https://genome.sph.umich.edu/wiki/LiftOver. We need to update both map and ped files. There is also a polished version: https://github.com/sritchie73/liftOverPlink/blob/master/README.md.

Another way is to first convert your plink data to vcf files using plink --recode. Then use GATK's LiftoverVcf tool to liftover vcf files.

ADD COMMENT

Login before adding your answer.

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