This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Keep A Subset Of Samples In Plink

I have been asked to select a subset of a whole dataset and make a binary file of these using PLINK via putty. I am unsure how to do this command

plink dataset

3 answers

From plink manual: Extract a subset of individuals plink --bfile data --keep mylist.txt --make-bed --out data_keep

It would help if you could add the names of files, and a copy of plink command.

Hi because you are using wrong input file, keep command ponly works on ped and map files, if you have only binary files (bed, bim, fam), use the following command to make ped and map files: ./plink --bfile data_ld --recode12 --tab --out data_ld

than use keep command, ./plink --file data_id --keep keep_indviduals.txt --make-bed --out data_keep

In this way you will get binary formatted files as output!

Hi Summaira, I am trying to remove ID patients from my data and I am using the original PED file for doing that. I create a .txt file with the number of ID family and ID patients that I want to remove put in two columns, but it still doesn't work. The analysis seems to go until the end of the process (creating temporary files) when appears the message saying: Error: duplicates ID.

My command is: plink --file name --remove IDlist.txt --out subset2 --make-bed

And my IDlist.txt is:

1 2204
2 1146 So I know I have few duplicates but I don't understand why the presence of duplicates does not allow the removing process.

Log in to answer this question.