This is a test version of Biostars. For the public version, visit https://www.biostars.org.
PLINK file format case control status

I have the joint vcf file for both case and control samples, I wonder how can I convert it to the ped and map format to be used by PLINK tools. I need to distinguish the case and control sample which I can not find any answers on the internet before!

gwas plink

Note that ped+map has not been plink’s preferred format since 2007, and is not even supported at all by plink 2.0 alpha builds (while VCF is supported). You probably want to convert to a plink binary format (bed+bim+fam) instead.

1 answer

VCF file does not contain phenotype. First we need to convert it to plink format:

plink --vcf myFile.vcf --recode --out myPlink

Then supply the phenotype file when running other tests, for example association:

plink --file myPlink --pheno myPhenotypeFile.txt --pheno-name CaseControl --assoc --out myPlinkAssociation

The phenotype file myPhenotypeFile.txt will contain 3 columns, something like:

FID IID CaseControl
Fam1 Sample1 1
Fam2 Sample2 2
...

The positions are different among this vcf files so how can I handle this problem?

Log in to answer this question.