Apr-10-2019, 11:34 AM
Hi,
I have as input a matrix that I have created by collecting sequences together. Not all sequences are equal in length and thus I have appended zeros at the end.
This matrix has to be read row by row
[,1] [,2] [,3] [,4] [,5]
[1,] 95 111 81 0 0
[2,] 15 187 201 0 0
[3,] 120 121 0 0 0
[4,] 187 15 0 0 0
[5,] 188 189 0 0 0
[6,] 7 21 0 0 0
[7,] 108 93 0 0 0
[8,] 1 15 0 0 0
[9,] 99 105 0 0 0
[10,] 96 82 0 0 0
[11,] 90 118 0 0 0
so for example first row says that from state 95 I jump to state 111 and then to 81 and so on.
I would like to plot these transitions as a graph where the nodes are the numbers and the paths between the nodes are their connections.
Do you know python packages that can implement such graphs?
At a second level I would try to generate statistics on the transitions.
Can you please suggest me ways forward?
Regards
Alex
I have as input a matrix that I have created by collecting sequences together. Not all sequences are equal in length and thus I have appended zeros at the end.
This matrix has to be read row by row
[,1] [,2] [,3] [,4] [,5]
[1,] 95 111 81 0 0
[2,] 15 187 201 0 0
[3,] 120 121 0 0 0
[4,] 187 15 0 0 0
[5,] 188 189 0 0 0
[6,] 7 21 0 0 0
[7,] 108 93 0 0 0
[8,] 1 15 0 0 0
[9,] 99 105 0 0 0
[10,] 96 82 0 0 0
[11,] 90 118 0 0 0
so for example first row says that from state 95 I jump to state 111 and then to 81 and so on.
I would like to plot these transitions as a graph where the nodes are the numbers and the paths between the nodes are their connections.
Do you know python packages that can implement such graphs?
At a second level I would try to generate statistics on the transitions.
Can you please suggest me ways forward?
Regards
Alex