Entering edit mode
8.8 years ago
emmapead2
▴
60
Hello!
So I have a matrix like so
SNP
Allele C/G A/C C/G
1 0 1 1
2 0 0 1
3 0 1 0
of snps in alleles (1,2,3,ect...I have 20) and then a file of samples containing the haplotypes (eg. sample A has haplotype 1 and 2) and want to convert this to a genotype matrix for genetic association. Does anyone know how I could do this? So I would have a matrix like
SNP
Sample C/G A/C C/G
A 0 1 1
B 0 0 1
C 0 2 0
Where 2 would be heterozygous etc
Would really appreciate the help, been stuck on this for days!
Isn't this post a duplicate Haplotype to Genotype data and linking to SNP?
Yes it is, I reworded the question and posted again as I thought this post would be clearer.
Seems a bit specific, a Perl/Python script could probably do this easily.