Entering edit mode
5.9 years ago
seymakatrinli
•
0
I have a large data frame with HLA alleles like that:
> sample.id allele1 allele2
1 44:03 45:01
2 15:16 15:16
3 07:02 15:03
4 07:02 18:01
5 35:01 44:03
I want to convert HLA alleles in genotypes such as:
> sample.id 44:03 45:01 15:16 07:02 15:03 18:01 35:01
1 1 1 0 0 0 0 0
2 0 0 2 0 0 0 0
3 0 0 0 1 1 0 0
4 0 0 0 1 0 1 0
5 1 0 0 0 0 0 1
I have a large data frame with 5000 samples and 65 alleles. So at the end I should have a column for each sample and each allele. So dimensions should be 5000x65. Do you know any R package, tools etc for that conversion?
Thanks!
Hi Kevin,
what about the conversion of HLA allele to popgene format; could you please take a look at this post ? do you have any suggestion?
Thanks