I think they need --recode transpose.
I made 3 binary files from MAP and PED files.
I'd like to know how to get individual genotypes per specific SNP.
When I open the .bim file, I just see the SNP and allele information but individual information (i.e. sample Id)
How to map the information?
I'd like to get information like this, and could open in Python or R.
Do I need some other tools for that? please let me know. For example,
SNP SAMPLE GENOTYPE
rs53576 1111 AA
rs53576 1112 GA
rs53576 1113 GG
rs53576 1114 GA
Thank you in advance.
1 answer
plink --bfile <Bed file prefix> --extract <File contain SNP ID> --recode --out <name of output>
This should generate the desired output
--recode will generate the ped file, which split the genotype into two columns. With --recode transpose you will get one variant per column, where the fifth and sixth fields are allele calls for the first sample in the .tfam file ('0' = no call); the 7th and 8th are allele calls for the second individual; and so on.
There are a large number of recode formats, maybe they can consult the manual page here https://www.cog-genomics.org/plink/1.9/data#recode
--list and --snp options also worked. Thank you
Log in to answer this question.