This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fam file information lost on conversation to VCF file

Hi,

I am using PLINK 1.9 and am trying to convert a bim, bed, and fam file into VCF format. I use the command

plink --bfile filename --keep-allele-order --recode vcf -- out filename

I then receive the message: 1512 people (184 males, 1319 females, 9 ambiguous) loaded from .fam

I also receive the message: 1503 phenotype values loaded from .fam (this suggests to me that it is successfully reading in my sex and phenotype information into the vcf file)

However, the issue I run into is that when I try to convert the vcf file back into a bim, bed, and fam file using the code below, the fam file ends up having all 0's in the sex column and all -9's in the phenotype column

--vcf filename.vcf --out output_files

Does anyone know why I am losing all my sex and phenotype information when converting my fam file from vcf and back to fam

sex plink phenotype fam vcf

1 answer

Because there isn't a natural way for a vcf to store phenotype or sex information - they aren't really designed for that kind of data. It's not present in the vcf, so it can't be present in the resulting fam file.

Log in to answer this question.