entityGraph: Create a new graphNEL object from an input entity matrix or...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function will create a new graphNEL object from an input entity matrix or data.frame

Usage

1

Arguments

df

A matrix or data.frame

Details

A graphNEL object with edgemode='directed' is created from input data.frame and the plot function will draw a graph

Value

A graphNEL object with edgemode='directed'

Author(s)

Jack Zhu <zhujack@mail.nih.gov> and Sean Davis <sdavis2@mail.nih.gov>

See Also

getSRA, sraConvert, sraGraph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
if(file.exists('SRAmetadb.sqlite')) {

	library(SRAdb)
	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'
  	acc <- getSRA (search_terms ='primary thyroid cell line', out_types=c('sra'), sra_con=sra_con, acc_only=TRUE) 
  	g <- entityGraph(acc)
  	## Not run: 
  	library(Rgraphviz)
  	attrs <- getDefaultAttrs(list(node=list(fillcolor='lightblue', shape='ellipse')))
  	plot(g, attrs= attrs)
  	
## End(Not run)

} else {
  	print("use getSRAdbFile() to get a copy of the SRAmetadb.sqlite file
and then rerun the example")
}

seandavi/SRAdb documentation built on May 29, 2019, 4:33 p.m.