inst/testScripts/bwa/01b.downloadRawData.R

path <- system.file("testScripts/R", package="aroma.seq")
pathname <- file.path(path, "downloadUtils.R")
source(pathname)

library("aroma.seq")
verbose && enter(verbose, "Downloading raw data")


##########################################################################
# Data set:
# LambdaVirusExample/
#   Lambda_phage/
#    reads_1.fq reads_1.fq [2]
#
# The example data that comes with the bowtie2 software.
#
# URL: http://bowtie-bio.sourceforge.net/bowtie2/
##########################################################################
rootPath <- "fastqData"
dataSet <- "LambdaVirusExample"
organism <- "Lambda_phage"

verbose && cat(verbose, "Data set: ", dataSet)

path <- filePath(rootPath, dataSet, organism, expandLinks="any")
ds <- tryCatch({
  FastqDataSet$byPath(path)
}, error = function(ex) FastqDataSet())
if (length(ds) < 2) {
  downloadBowtie2ExampleData()
}

ds <- FastqDataSet$byPath(path)
print(ds)

verbose && exit(verbose)
HenrikBengtsson/aroma.seq documentation built on Feb. 15, 2021, 2:21 a.m.