Keep A Subset Of Samples In Plink
3
0
Entering edit mode
7.7 years ago

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

5
Entering edit mode
7.7 years ago
zx8754 10k

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

0
Entering edit mode

It says "ERROR: No file ( name of file.txt ) exists.

0
Entering edit mode

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

2
Entering edit mode
3.6 years ago
Summaira ▴ 20

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!

0
Entering edit mode
3.5 years ago
Ginevra • 0

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.