is it possible to know individual genotype(alleles) by SNP in plink?
1
1
Entering edit mode
9 months ago
nayeona.hi ▴ 50

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


plink SNP individual • 368 views
2
Entering edit mode
9 months ago
Sam ★ 3.6k
plink --bfile <Bed file prefix> --extract <File contain SNP ID> --recode --out <name of output>


This should generate the desired output

0
Entering edit mode

I think they need --recode transpose.

1
Entering edit mode

--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

0
Entering edit mode

--list and --snp options also worked. Thank you