Keeping A Set Of Data For Qc In Plink
1
0
Entering edit mode
10.2 years ago

I am using putty to run plink for this data analysis.

I have been asked to perform a QC on a subset of data from a given dataset. I have used the command to keep the data (plink --bfile data --keep mydata.txt) and it has saved the necessary files as a .txt file.

I have been told that for plink to read that the file I am reading in will not be a text file but a set of binary files.

When I enter (plink --file mydata --maf 0.05) it states that no mydata.ped file exists.

What am I missing?

plink data dataset qc • 3.6k views
ADD COMMENT
0
Entering edit mode

Duplicate of Keeping a subset of data for QC , which is in turn duplicate of Creation of a .BED file from .txt ? I suggest you read the plink manual thoroughly, reposting the same question will not help, especially when we cannot see your files, plink commands, etc.

ADD REPLY
0
Entering edit mode

Do I need to post a command list of what I've done so far then?

ADD REPLY
0
Entering edit mode

Here is the nice tutorial on how to do QC using plink. Yes, the more detail you give us the easier to answer...

ADD REPLY
0
Entering edit mode

I have already followed this protocol but could not see where it says to extract samples? My current task is: 1) to keep certain samples from a dataset 2) perform QC of this selected data (maf >0.05, call rate >0.97 and HW)

Do you need the commands too?

ADD REPLY
3
Entering edit mode
10.2 years ago
zx8754 11k

This works for me:

Note: Below I used --bfile option for binary file sets (bim, fam, bed), if you have normal (ped, map) file use --file. If you need output as normal (ped, map) format then use --recode instead of --make-bed.

1) To subset samples, we need mySubsetSamplesFile.txt file, it has 2 columsn, FID and IID:

plink --noweb \
--bfile myBinaryFile \
--keep mySubsetSamplesFile.txt \
--make-bed \
--out myBinaryFile_SubsetSampleFile

2) Above command should create binary plink files myBinaryFile_SubsetSampleFile, we use them as input for 2nd step.

plink --noweb \
--bfile myBinaryFile_SubsetSampleFile \
--hwe 1e-05 \
--mind 0.03 \
--maf 0.05 \
--make-bed \
--out myBinaryFile_SubsetSampleFile_QC

If any of above gives out an error, then something is wrong with input files, check them compare the formats with plink manuals.

ADD COMMENT
0
Entering edit mode

Yes this works for me, thank you very much.

ADD REPLY

Login before adding your answer.

Traffic: 3030 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