Entering edit mode
2.8 years ago
melissachua90
▴
70
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.