check-scalar-isTximport: Does the input contain a tximport list?

check-scalar-isTximportR Documentation

Does the input contain a tximport list?

Description

Does the input contain a tximport list?

Usage

isTximport(x)

Arguments

x

Object.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2023-07-21.

See Also

tximport::tximport.

Examples

## TRUE ====
if (allAreInstalled(c("tximport", "tximportData"))) {
    dir <- system.file("extdata", package = "tximportData")
    samples <- read.table(file.path(dir, "samples.txt"), header = TRUE)
    files <- file.path(dir, "salmon", samples[["run"]], "quant.sf.gz")
    names(files) <- paste0("sample", seq(from = 1L, to = length(files)))
    object <- tximport::tximport(
        files = files,
        type = "salmon",
        txIn = TRUE,
        txOut = TRUE
    )
    isTximport(object)
}

## FALSE ====
object <- list()
isTximport(object)

steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.