## Not run:
# ## this example requires installation of the tximportData package from
# ## Bioconductor
# library(tximportData)
# dir <- system.file("extdata", package = "tximportData")
# list.files(dir)
# samples <- read.table(file.path(dir, "samples.txt"), header = TRUE)
# samples
# directories <- file.path(dir, "kallisto", samples$run)
# names(directories) <- paste0("sample", 1:6)
# files <- file.path(directories, "abundance.tsv")
# sce_example <- readTxResults(samples = names(directories),
# files = files, type = "kallisto")
#
# ## for faster reading of results use the read_tsv function from the readr pkg
# library(readr)
# sce_example <- readTxResults(samples = names(directories),
# files = files, type = "kallisto", reader = read_tsv)
# ## End(Not run)
Run the code above in your browser using DataLab