I'm working with a data frame of genotypes produced from multiallelic indels, an example would be
|Column 1||Column 2|
The possible genotypes depends on how many alternative alleles there are for that indel (I have this data)
I need to recode the 0/0 into a single digit format so for example if an indel has 1 reference allele and 2 alternative alleles the possible genotypes would be 0/0 0/1 0/2 1/1 1/2 2/2.
I tried recoding them in bulk but as each column has a different number of alleles it doesn't work correctly, so I need to code the columns independently of one another.
Any help would be great thanks