How to do it...

Finding experiments and reads from SRA/ENA can be done using the following steps:

  1. Download the SQL database and make the connection:
library(SRAdb)
sqlfile <- file.path(system.file('extdata', package='SRAdb'), 'SRAmetadb_demo.sqlite')
sra_con <- dbConnect(SQLite(),sqlfile)

  1. Get the study information:
dbGetQuery(sra_con, "select study_accession, study_description from study where study_description like '%coli%' ")
  1. Get information on what is contained in that study:
sraConvert( c('ERP000350'), sra_con = sra_con )
  1. Get a list of the files available:
listSRAfile( c("ERR019652","ERR019653"), sra_con, fileType = 'sra' )
  1. Download the sequence files:
getSRAfile( c("ERR019652","ERR019653"), sra_con, fileType = 'fastq', destDir = file.path(getwd(), "datasets", "ch8") )
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.66.149