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
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
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.)
I know a little bit of programming but i don't understand exactly how to convert? Ill appreciate any pointers on that.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
I know a little bit of programming but i don't understand exactly how to convert? Ill appreciate any pointers on that.