Question: How to form network using tanimoto distance
0
gravatar for swap
15 months ago by
swap0
swap0 wrote:

Hi, I have data like this

column-1   Column-2      Similarity_dist
chemical-1 chemical-2    0.6
chemical-1 chemical-3    0.1
chemical-1 chemical-4    0.7
chemical-1 chemical-5    0.3
chemical-2 chemical-1    0.05
chemical-2 chemical-3    0.65
chemical-2 chemical-4    0.75
chemical-2 chemical-5    0.4

. . such hundered rows. Now I filtered them with similarity cutoff of 0.5, and my data looks like

column-1   Column-2      Similarity_dist
chemical-1 chemical-2    0.6
chemical-1 chemical-4    0.7
chemical-2 chemical-3    0.65
chemical-2 chemical-4    0.75

. .

I want to find interaction network among these chemicals. Does anyone knows method in R by which I can use chemicals as nodes and distances as edges and then form network? Any other suggestion? Any code?

network R pathway • 353 views
ADD COMMENTlink modified 15 months ago by Jean-Karim Heriche19k • written 15 months ago by swap0
1
gravatar for Jean-Karim Heriche
15 months ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche19k wrote:

Your data is basically an adjacency matrix in edge list format which you can read in R with the igraph package using the read_graph() function or by reading it in a data frame first and converting to an igraph object, something like:

G.data <- read.table("myData.txt")
G <- graph_from_data_frame(G.data, directed = FALSE)

or

G <-read_graph("myData.txt",format="ncol")
ADD COMMENTlink written 15 months ago by Jean-Karim Heriche19k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2127 users visited in the last hour