Question: Haplotype matrix to genotype matrix
0
gravatar for emmapead2
4.9 years ago by
emmapead260
emmapead260 wrote:

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!

sequence snp haplotype R gene • 2.0k views
ADD COMMENTlink modified 2.3 years ago by _r_am32k • written 4.9 years ago by emmapead260

Isn't this post a duplicate Haplotype to Genotype data and linking to SNP  ? 

ADD REPLYlink written 4.9 years ago by Zev.Kronenberg11k

Yes it is, I reworded the question and posted again as I thought this post would be clearer. 

ADD REPLYlink written 4.9 years ago by emmapead260

seems a bit specific, a Perl/Python script could probably do this easily.

ADD REPLYlink written 4.9 years ago by Gabriel R.2.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1166 users visited in the last hour
_