I have a plink map+ped file ("genotypes.map" and "genotypes.ped") with 43k filtered out SNPs for cow genotyped in assembly Bostaurus6 (UMD 3.1 genome assembly). I need to convert the coordinate positions of that file into the recent assembly bostaurus9 (ARS-UCD1.2). I have already downloaded the chain file "bosTau6ToBosTau9.over.chain" Is there anyone in the community who has already done a similar kind of task !! What would be the steps, tools, and pipeline to accomplish this liftover task! I would appreciate it if you could share ideas and codes !!
After, liftover is done from the step above - I need to merge the "liftedover_plink_above_file" generated from the above steps with another "plink_data_second_file" with 84k SNPs that were genotyped in btau9 assembly !! Hoping that there are some overlaps !!
1 answer
First, convert map+ped data to VCF format. Use the following commands:
./plink --file genotypes --make-bed --maf 0.05 --out genotypes
./plink --bfile genotypes --recode vcf --out genotypes_vcf
then, do the liftover using the following R code:
Library(rtracklayer)
ch <- import.chain("bosTau6ToBosTau9.over.chain")
bosTau6 <- import("genotypes_vcf.vcf")
seqlevelsStyle(ch) = "UCSC"
BosTau9 <- liftOver(bosTau6, ch)
BosTau9 <- unlist(BosTau9)
finally, export the BosTau9 to a file.
Log in to answer this question.