Entering edit mode
8.2 years ago
zizigolu
★
4.3k
Hi
I have an edge list derived from a gene regulatory network inferring algorithm like below
edge_list <- read.table("dream_GENIE3_predictions.txt", header = T, sep = "\t")
edge_list <- edge_list[!duplicated(edge_list),]
AT2G03750 AT5G16030 0.036228
AT5G05410 AT2G26150 0.035889
AT4G29780 AT4G34410 0.035248
AT2G22500 AT4G29780 0.034398
AT3G43120 AT3G01270 0.033944
AT1G07000 AT1G10340 0.033512
AT4G14090 AT5G42800 0.032743
AT4G39480 AT1G24260 0.032410
AT4G29780 AT2G46400 0.032203
AT1G21460 AT5G15800 0.031520
AT5G02030 AT3G50640 0.031176
AT1G30350 AT1G28430 0.031169
AT1G74930 AT4G29780 0.030951
I found this syntax to convert my list to an adjacency matrix but I can't adapt the code to my data
library(dils)
edgelist <- cbind(expand.grid(letters[1:2], letters[1:2]), runif(4))
AdjacencyFromEdgelist(edgelist)
who will help me?
Thank you, I did so but telling
Make sure that you replace
weight
inattr="weight"
with the name of the column that contains the weights.Thank you, you all right it worked but my values converted to most 0 for example 0.036228 converted to 0
It looks like a type conversion problem. You can coerce the column types with colClasses e.g.
Thank you so much, your kindly helps always work well