I have a PLINK formatted database (bed/bim/fam files) and corresponding recoded files (hh/ped/map). I am looking for an effective way to extract samples from this database with specific genotypes. I have looked through the PLINK manual and found that I can extract set of samples using "--keep" parameter and extract set of genotypes using "--extract", am wondering if this can be done in a single step using another parameter or tool.
My input is a list of rsIDs and genotypes; I need to get sample ids and genotype as output. INPUT
rs1800562 AA
OUTPUT
Sample1 AA
Sample5 AA
Sample22 AA
...
Is there any option in PLINK to do this or I should use unix 'grep' and/or a custom script to extract data. Suggestions on other computational genomics tools to do similar task is also welcome.
Thanks a lot Stephen. I worked out a solution based on your suggestion - tped was the hat-tip :). Please see if you can add this as an answer for future reference.