sraConvert: Cross-reference between GEO data types

Description Usage Arguments Value Author(s) See Also Examples

Description

A common task is to find all the SRA entities of one type associated with another SRA entity (eg., find all SRA samples associated with SRA study 'SRP001990'). This function provides a very fast mapping between entity types to facilitate queries of this type.

Usage

1
sraConvert(in_acc, out_type = c("sra", "submission", "study", "sample", "experiment", "run"), sra_con)

Arguments

in_acc

Character vector of SRA accessions and should be of same SRA data type, either one of SRA submission, SRA study, SRA sample, SRA experiment and SRA run'

out_type

Character vector of the following SRA data types: 'sra', 'submission','study','sample','experiment','run'; if 'sra' is in out_type, out_type will be c("submission", "study", "sample", "experiment", "run")

sra_con

Connection to the SRAmetadb SQLite database

Value

A data.frame containing all matched SRA accessions.

Author(s)

Jack Zhu <zhujack@mail.nih.gov>

See Also

getSRA, listSRAfile, getSRAinfo

Examples

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

	library(SRAdb)
	sra_dbname <- 'SRAmetadb.sqlite'	
	sra_con <- dbConnect(dbDriver("SQLite"), sra_dbname)

	## Convert SRA experiment accessions to other types
	a <- sraConvert( in_acc=c(" SRR000137", "SRR000138 "), out_type=c('sample'), sra_con=sra_con )
	b <- sraConvert (in_acc=c("SRX000089"), sra_con=sra_con) 

} 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.