Extracting and converting genotypes to A/C/G/T format

67 views
Skip to first unread message

Lukas

unread,
Mar 7, 2024, 6:03:18 PM3/7/24
to plink2-users

Dear Christopher, Dear All,

I’m trying to export genotypes for several rs from a map/ped file. However, I’m getting the 0/1/2 format, but I need the A/C/G/T format.

1. I first recode the file to bed/bim/fam:

plink1.9 --file FILE --make-bed --out FILE_binary

2. Then I try to recode using --alleleACGT:

plink1.9 --bfile FILE_binary --alleleACGT --make-bed --out FILE_binary_ACGT

 3. Then I do extracting:

plink1.9 --bfile FILE_binary_ACGT --extract snp_list.txt --recodeA --out output_snps

Is it the right approach? Unfortunately, I’m not getting the A/C/G/T outcome.

Regards,

Lukas

Gabriel Doctor

unread,
Mar 13, 2024, 1:14:50 PM3/13/24
to plink2-users
not certain, but i think you've misunderstood file types in plink. 
the original ped file is not in 0,1,2 it is in either 1,2,3,4 or A,C,G,T, with each allele represented. 
the variant view is another format where, in reference to a given variant, a count of 0,1,2 is given.  
If your PED data has been encoded as 1234, alleleACGT will change the representation in the bim file (to ACGT);
But when you recodeA out, the data will be presented as an additive table (i.e. how many of the reference allele are present).
Reply all
Reply to author
Forward
0 new messages