1

I have a dataframe like this:

Genome       Evolved_from 
3435XY      233Z
5662YY      1099N
1099N       234YY
234YY       22QQ
43543Z      232XX
4566Y       1099N
213TY       15Q
234YY       12Q
7968ZT      2132X
77792       213TY
2455Z       12Q

First I want to determine the generation of genome, so resulting output should be something like this:

Genome       Evolved_from  generation
3435XY      233Z          1
5662YY      1099N         1
1099N       234YY         3
2212QQ      234YY         3
43543Z      232XX         1
4566Y       1099N         1
213TY       15Q           1
234YY       12Q           2
7968ZT      2132X         1  
77792       213TY         2  
2455Z       12Q           2

How could I achieve this? and how could I represent this relationship on the graph, let's say for one particular chain

edyvedy13
  • 2,156
  • 4
  • 17
  • 39

0 Answers0