Replies: 3 comments 1 reply
-
Hi @sameelab Thanks for your interest in GeneWalk. Could you share the code how you generated the adjacency matrix starting with the networkx.MultiGraph object? I suspect that the numbers you mentioned are either a one hot encoding of the label attributes or the number of edges between the two nodes. Without the commands you ran I cannot determine this. Best, |
Beta Was this translation helpful? Give feedback.
-
Hi @ri23! This was the code used to extract the adjacency matrix ` LOAD GRAPHg = nx.read_gpickle('./test_tp53/multi_graph.pkl') PRUNE GRAPH IF NEEDED (LIST OF GENES)genes_and_terms = ['TP53','GO:0000785','GO:0000976','GO:0000978','GO:0000981','GO:0000987','GO:0001046','GO:0001094','GO:0001216','GO:0001228'] TO ADJg_adj = nx.to_pandas_adjacency(g) Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
Hi @sameelab For the GeneWalk algorithm these numbers actually don't matter because multiple edges in the multi graph are collapsed into 1 when sampling the random walks. So to be precise: if a neighbor is defined as an adjacent node connected with at least 1 edge in the multigraph, then the probability to walk to a neighbor is simply 1/n with n the number of neighbors for a node. The rationale for this is that some genes and GO terms have multiple types of annotations, resulting in multiple edges between the same node pair. This is not really a biological aspect, because in reality there is really one physical interaction. Hope this clarifies! |
Beta Was this translation helpful? Give feedback.
-
Hi Churchman Lab!
I'm trying to understand the multi_graph.pkl file and the edge attributes.
For example, I ran genewalk for one gene (TP53) and I'm able to see this adjacency matrix
What does the attributes value between GO terms represent?
and
It's possible that the attribute value of the gene of interest to GO term is more than 1?
Best
Francisco Grisanti
Beta Was this translation helpful? Give feedback.
All reactions