if(file.exists('SRAmetadb.sqlite')) {
library(SRAdb)
library(Rgraphviz)
sra_dbname <- 'SRAmetadb.sqlite'
sra_con <- dbConnect(dbDriver("SQLite"), sra_dbname)
## create a graphNEL object from SRA accessions, which are full text search results of terms 'primary thyroid cell line'
g <- sraGraph('primary thyroid cell line', sra_con)
attrs <- getDefaultAttrs(list(node=list(fillcolor='lightblue', shape='ellipse')))
plot(g, attrs=attrs)
## similiar search as the above, returned much larger data.frame and graph is too clouded
g <- sraGraph('Ewing Sarcoma', sra_con)
## Not run:
# plot(g)
# ## End(Not run)
} else {
print("use getSRAdbFile() to get a copy of the SRAmetadb.sqlite file
and then rerun the example")
}
Run the code above in your browser using DataLab