Skip to contents

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

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)
}
#> reading in files with read_tsv
#> 1 
#> 2 
#> 3 
#> 4 
#> 5 
#> 6 
#> 
#> [1] TRUE

## FALSE ====
object <- list()
isTximport(object)
#> [1] FALSE