readTxResults: Read transcript quantification data with tximport package

Description Usage Arguments Details Value References Examples

View source: R/tximport-wrapper.R

Description

After generating transcript/feature abundance results using kallisto, Salmon, Sailfish or RSEM for a batch of samples, read these abundance values into an SCESet object.

Usage

1
2
3
readTxResults(samples = NULL, files = NULL, log = NULL,
  type = "kallisto", txOut = TRUE, logExprsOffset = 1, verbose = TRUE,
  ...)

Arguments

samples

character vector providing a set of sample names to use for the abundance results.

files

character vector providing a set of filenames containing kallisto abundance results to be read in.

log

list (optional), generated by runKallisto. If provided, then samples and files arguments are ignored.

type

character, the type of software used to generate the abundances. Options are "kallisto", "salmon", "sailfish", "rsem". This argument is passed to tximport.

txOut

logical, whether the function should just output transcript-level (default TRUE)

logExprsOffset

numeric scalar, providing the offset used when doing log2-transformations of expression data to avoid trying to take logs of zero. Default offset value is 1.

verbose

logical, should function provide output about progress?

...

optional parameters passed to tximport. See documentation for tximport for options and details.

Details

Note: tximport does not import bootstrap estimates from kallisto, Salmon, or Sailfish. If you want bootstrap estimates use the readKallistoResults or readSalmonResults functions.

Value

an SCESet object containing the abundance, count and feature length data from the supplied samples.

References

Soneson C, Love MI, Robinson MD. Differential analyses for RNA-seq: transcript-level estimates improve gene-level inferences. F1000Res. 2015;4: 1521.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## 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)

dynverse/scaterlegacy documentation built on Feb. 17, 2020, 5:07 a.m.