Converting 0 1 2 in a format recognized by plink
2
0
Entering edit mode
8.3 years ago
akang ▴ 110

I have a text file with genotypes recoded as 0 1 2 (Additive) and a standard plink map file. I want to convert File1.txt into ped file. Is there a way to do that? TIA!

File1.txt
    ind1 ind2 ind3 ind4
snp1 1 1 0 1
snp2 1 2 0 0
snp3 2 2 2 2
plink recode genotype • 4.0k views
ADD COMMENT
0
Entering edit mode
8.3 years ago

This isn't built into plink (partly since plink requires allele code information). However, if you have some experience with C/C++, it is not difficult to write a program which translates this directly into the plink .bed format (https://www.cog-genomics.org/plink2/formats#bed ); this is actually easier than translating to a plink-readable text format. (If you do that, you will still need to create .bim and .fam files for plink to read with the .bed.)

ADD COMMENT
0
Entering edit mode

I know a little bit of programming but i don't understand exactly how to convert? Ill appreciate any pointers on that.

ADD REPLY
0
Entering edit mode
8.3 years ago
akang ▴ 110

I know a little bit of programming but i don't understand exactly how to convert? Ill appreciate any pointers on that.

ADD COMMENT

Login before adding your answer.

Traffic: 3103 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6