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")
}
Run the code above in your browser using DataLab