This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Updating phenotype column for .ped .fam files (PLINK --pheno not working)

PLINK won't allow me to replace the phenotype column in the .fam or .ped files using the --pheno command. The output reads phenotypes as missing and reports "0 phenotype values present after --pheno."

Current phenotypes are binary: HTA, CAD, OSA... Options are Case (2) or Control (1). Phenotypes are coded in tab separated .txt files.

PLINK Input: .ped

1 NJV 0 0 1 0

2 3SA 0 0 1 0

3 7SA 0 0 2 0

Input phenotype: .txt (Example CAD)

1 NJV 0 0 1 1

2 3SA 0 0 1 2

3 7SA 0 0 2 2

PLINK Output: .fam

1 NJV 0 0 1 -9

2 3SA 0 0 1 -9

3 7SA 0 0 2 -9

I processed my data with GenomeStudio and was able to perform QC and PCA in Plink. Available files in .ped, .bed, .vcf formats.

What could I do? If there's another program to deal with this (hopefully compatible with R). Or, is there a procedure in PLINK to work this out?

phenotype plink --pheno gwas binary

1 answer

Your phenotype file should have only FID, IID and Pheno columns as below. Here column first is FID, second IID and their is Pheno (1=Control and 2=Case).

cat phenotype.txt
1 NJV 1
2 3SA 2
3 7SA 2

After you prepare the phenotype file, you can update phenotype info in your plink files using following command-

plink --bfile your_data --pheno phenotype.txt --make-bed --out your_data_phenotype_updated

Log in to answer this question.