Keep A Subset Of Samples In Plink
3
0
Entering edit mode
10.8 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

plink dataset • 24k views
ADD COMMENT
5
Entering edit mode
10.8 years ago
zx8754 12k

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode
6.8 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!

ADD COMMENT
0
Entering edit mode
6.7 years ago
Ginevra ▴ 10

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2305 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6