Entering edit mode
4.6 years ago
Rogerio Ribeiro
▴
110
Hi all, I´m currently using StrinGDB (R package) to do some analysis in my DEG set I obtained from my experience. I want to modify the network using Cytoscape, but I´m having trouble exporting the graph from R. Bellow in an abbreviated version of my code:
library(STRINGdb)
library(igraph)
DEG_expressed_genes <- read.delim("DEG.txt") #1434 genes
string_db <- STRINGdb$new(version = "11", species= 3702, score_threshold=400, input_directory="02_databasefiles/")
string_db$plot_network(DEG_expressed_genes) #plots the network
graph <- string_db_meso_vs_idio$get_subnetwork(DEG_expressed_genes) #t
write_graph(graph, file = "graph.1")
I was expecting to generate a graph file with the write_graph function, but instead, the following error occurs in the write_graph function:
Error in write.graph.edgelist(graph, file, ...) :
At rinterface.c:5099 : Cannot write edgelist, File operation error
Any help on how to export the graph would be appreciated