Question: How I do lift over a Plink bim file from Hg18 to Hg19.
0
gravatar for devenvyas
2.7 years ago by
devenvyas610
Stony Brook
devenvyas610 wrote:

I've got some very old SNP data from Data Dryad. The BIM files uses coordinates from Hg18, but my dataset uses coordinates from Hg19.

I was wondering if anyone knows how to liftover coordinates in a Plink BIM file?

snp plink • 3.7k views
ADD COMMENTlink modified 6 weeks ago by Shicheng Guo8.0k • written 2.7 years ago by devenvyas610
1
gravatar for h.mon
2.7 years ago by
h.mon29k
Brazil
h.mon29k wrote:

Had you searched, you would find plenty of resources, like here and here and here and here. Google even auto-fill your query for me.

ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by h.mon29k
2
gravatar for Shicheng Guo
6 weeks ago by
Shicheng Guo8.0k
Shicheng Guo8.0k wrote:

Share my script with you. It can do liftover automatically (be careful about chrX and chrY):

# download database and script
wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/liftOver
wget http://hgdownload.soe.ucsc.edu/goldenPath/hg18/liftOver/hg18ToHg19.over.chain.gz
wget http://hgdownload.soe.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg38.over.chain.gz
wget https://raw.githubusercontent.com/Shicheng-Guo/GscPythonUtility/master/liftOverPlink.py
wget https://raw.githubusercontent.com/Shicheng-Guo/Gscutility/master/ibdqc.pl
# rebuild plink file to avoid chromsome-miss-order problem
plink --bfile Th17Set1 --make-bed --out Th17Set1.sort
# space to tab to generate bed files for liftOver from hg18 to hg19
plink --bfile Th17Set1.sort --recode tab --out Th17Set1.tab
# apply liftOverPlink.py to update hg18 to hg19 or hg38
# Only works in BIRC10, Not HPC, Caused by Python version
mkdir liftOver
./liftOverPlink.py -m Th17Set1.tab.map -p  Th17Set1.tab.ped -o Th17Set1.hg19 -c hg18ToHg19.over.chain.gz -e ./liftOver
ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by Shicheng Guo8.0k
0
gravatar for ml.endale
2.6 years ago by
ml.endale0
ml.endale0 wrote:

Liftover does not natively process plink formatted files. But you can have a look to this wrapper: https://github.com/sritchie73/liftOverPlink/blob/master/README.md

ADD COMMENTlink written 2.6 years ago by ml.endale0
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: 1738 users visited in the last hour