> when all the nodes are loaded, if I want to color the proteins say in red and 
> the genes say in blue, is that possible?
>  
>  


def is_protein(vertex):
    return vertex[“name”].startswith(“protein”)

g.vs[“color”] = [“red” if is_protein(vertex) else “blue” for vertex in g.vs]
plot(g)

The above assumes that proteins are those vertices whose name starts with 
“protein”.

—  
T.
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to