sraGraph: Create a new graphNEL object of SRA accessios from SRA full...

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

Description

This function will create a new graphNEL object from SRA accessions using function of entityGraph and SRA accessions are returned from SRA full text search using function of getSRA

Usage

1
sraGraph(search_terms, sra_con)

Arguments

search_terms

Free text search terms constructed according to SQLite query syntax defined here: http://www.sqlite.org/fts3.html#section_1_3

sra_con

Connection to the SRAmetadb SQLite database

Details

This function is a wrapper of two functions: acc <- getSRA(search_terms, out_types='sra', sra_con, acc_only=TRUE) and g <- entityGraph(acc). A graphNEL object with edgemode='directed' is created from input data.frame of SRA accessions 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, entityGraph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
## Using the SRAmetadb demo database

	library(SRAdb)
  	library(Rgraphviz)
	
	sra_dbname <- file.path(system.file('extdata', package='SRAdb'), 'SRAmetadb_demo.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('MCF7 OR "MCF-7"', 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('MCF', sra_con)
	## Not run: 
	plot(g)	
	
## End(Not run)

## The actual SRAmetadb sqlite database can be downloaded using function: getSRAdbFile. Warning: the actual SRAmetadb sqlite database is pretty large (> 35GB as of May, 2018) after uncompression. So, downloading and uncompressing of the actual SRAmetadb sqlite could take quite a few minutes depending on your network bandwidth. Direct links for downloading the SRAmetadb sqlite database:  https://s3.amazonaws.com/starbuck1/sradb/SRAmetadb.sqlite.gz https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz

SRAdb documentation built on Nov. 8, 2020, 6:49 p.m.