Extract pattern from bfile in Plink
1
0
Entering edit mode
5.3 years ago
D H ▴ 20

I have a list of SNPs of the type rs17004888. I want to extract the corresponding SNPs from binary plink files and generate a .raw subset of the binary file.

When I ran the command

plink --bfile (path to binary)  --extract (path to SNP list) --recodeA  --out (output name)

I get the following:

0 SNPs failed missingness test ( GENO > 1 )
0 SNPs failed frequency test ( MAF < 0 )
After frequency and genotyping pruning, there are 0 SNPs

I suspect that the SNP names in the binary file are of the type rs17004888_A, and thus it cannot find any matches.

How can I deal with that?

plink • 1.1k views
ADD COMMENT
0
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLY
0
Entering edit mode
5.3 years ago
zx8754 11k

I don't think plink supports pattern matching, so instead clean up your SNP list, something like:

cut -f1 -d"_" mySNPlist.txt > mySNPlistClean.txt

Meaning: (-d) delimiter is an underscore "_" and get the first column (-f field).

ADD COMMENT

Login before adding your answer.

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