Dear All,
I have an adjacency matrix as follows:
Gene1 Gene2 Gene3 Gene4 Gene5 Gene6 Gene7 Gene8 Gene9 Gene10 Gene11
miRNA1 0 0 0 0 0 0 1 0 0 0 2
miRNA2 0 0 0 0 0 0 1 0 0 0 2
miRNA3 0 0 0 0 0 0 1 0 0 0 2
miRNA4 0 0 0 0 0 0 1 0 0 0 2
miRNA5 0 0 0 0 0 0 1 0 0 0 2
miRNA6 0 0 0 0 0 0 1 0 0 0 2
I want to generate a miRNA-gene interaction network from this data (there are of course more columns and rows, showing only a portion here). I tried several packages like igraph, Rgraphviz etc.. but the thing is more data is not square so they gave me an error. I would appreciate any help
That was great. Thank you. Do you know how to put labels on nodes? Right now, it is only showing me with numbers 1,2 etc..
I am sorry posted that as an answer
Just use the indices returned by which() to fetch the desired labels. Following my previous example:
consider looking at introductory materials on how learn programming with R.