extract SNPs

674 views
Skip to first unread message

Pablo Perez

unread,
Nov 12, 2014, 7:45:47 AM11/12/14
to plink2...@googlegroups.com
Dear Plink experts
I have received a .bim .fam .bed file from our collaborators along with 6 SNPs with it corresponding .map and .ped set of files.
When I load plink I get the following:


If I try to extract any of the 6 SNPs already extracted by the collaborators, plink works fine:

plink --bfile xxx_xxx_xxxxxx --snp rsxxxxx


But when I try to extract different SNPs I get the following: ERROR --from {marker} not found


Also, same error when I try to extract in the following way:

plink --bfile xxx_xxx_xxxxxx --snp rsxxxxxx --out /user/xxxx/Documents/Directory/Output_snp --recode


I am assuming that I should be able to extract the additional SNPs as when I do

plink --file 'mydata' --bfile xxx_xxx_xxxxxx

I get:

Reading genotype bitfile from [ xxx_xxx_xxxxxx.bed ] 

Detected that binary PED file is v1.00 SNP-major mode

Before frequency and genotyping pruning, there are 620901 SNPs

375 founders and 0 non-founders found 

I wanted to check which were the SNPs in my .bim .fam files but I understand that for this I need to have the hapmap1 file which I did not get from my collaborators. 

I assume that the command should be run as follow:

plink head --file hapmap1.

Is there any other command line I could try to get around this?

Thank you in advance for your consideration,

Pablo 


Christopher Chang

unread,
Nov 12, 2014, 1:23:13 PM11/12/14
to plink2...@googlegroups.com
Hmm, the --bfile --snp --recode command line should work as long as the named SNP is actually in your binary fileset.  Try the following command:

grep rsxxxxx xxx_xxx_xxxxxx.bim

If you get an empty result, either you misspelled the SNP ID, or the SNP simply isn't in your data (you might need to talk to your collaborators about the latter).

Pablo Perez

unread,
Nov 13, 2014, 9:30:26 AM11/13/14
to plink2...@googlegroups.com
Thank you. You were right the SNPs I was testing for are missing in the dataset. 

May I please ask your advice for pulling out a table with the numbers for affected and not affected individuals, by genotype (TT, AT), by sex for a specific snp?
Pablo

Chandra Mukhopadhyay

unread,
Jan 9, 2017, 12:18:06 AM1/9/17
to plink2-users
Thank you for your reply. It's really helpful.
Reply all
Reply to author
Forward
0 new messages