This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plink: --keep flag

I want to subset my genotype files (ped and map) to get the data for a few samples only. I used the --keep flag from plink to do the same.

Command used : plink --file <filename> --keep keep_individuals.txt --make-bed --out data_keep

ERROR : Error: Line 1 of --keep file has fewer tokens than expected.

My --keep file (keep_individuals.txt) looks like this with the sample names:

VD19843994GD QG64443798DS RH77483094DT LK12525917MG SC30880954YF

Can somebody please tell me how should I work around this error?

--keep subset plink

1 answer

.ped files have two-part sample IDs ("FID" and "IID"). When using plink 1.x, your --keep file must have two columns, where the first column has FIDs and the second column has IIDs.

Log in to answer this question.