From a table like this:
ID POS REF ALT AD_REF_P AD_ALT_P
Pop1 Locus1 A G 0 10
Pop1 Locus2 A G 0 10
Pop2 Locus1 A G 1 9
Pop2 Locus3 C T 6 4
I would like to generate a table like this, in such a way that in Pop1 it appears 10 times and of those ten times 10 G appear in the column of Locus1 and 10 G in the column of Locus 2 and on the other hand Pop2 appears another ten times, with 1 A and 9 G in the locus 1 column and 6 C and 4 T in the Locus 3 column.
Pop Locus1 Locus2 Locus3
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop1 G G 0
Pop2 A 0 C
Pop2 G 0 C
Pop2 G 0 C
Pop2 G 0 C
Pop2 G 0 C
Pop2 G 0 C
Pop2 G 0 T
Pop2 G 0 T
Pop2 G 0 T
Pop2 G 0 T
How could I make this table? Thanks in advance
I hope the following code will help you
#it stays like this