How do I add annotation information to ped file and run on PLINK?
0
0
Entering edit mode
2.2 years ago

My original ped file does not contain annotation information. Hence, I edited the first 6 columns of the original ped file by using the annotation info from clinical_table.txt and saved it as subjects_153_edited.txt.

> library(dplyr)
> library(data.table)
> subjects_153_ped <- read.table("subjects_153.ped")
> ann <- read.table("clinical_table.txt", header=T, sep="\t")
> subjects_edited <- ann %>% transmute(FID=Database_ID, IID=1, PAT=1, MAT=1, SEX=sex, PHENOTYPE=Profile) %>% mutate(SEX=recode(SEX,"M"="1","F"="2")) %>% left_join(subjects_153_ped, by=c("FID"="V1"))
> write.table(subjects_edited, "subjects_153_edited.txt", sep="\t", row.names=F, col.names=F)

I then try to run plink to filter based on several conditions:

./plink –file subjects_153_edited.txt –map subjects_153.map --maf 0.1 --geno 0.1 --mind 0.3 --hwe 0.001 –recode –make-bed --out filtered

Traceback:

Error: Half-missing call in .ped file at variant 1, line 1.

plink r bed snps dplyr • 334 views
ADD COMMENT

Login before adding your answer.

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