Exporting graphs from StrinGDB R package
0
0
Entering edit mode
4.6 years ago

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

StringGDB Protein-Protein-interaction • 2.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 2731 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6