Does the input contain a tximport list?
Source:R/check-scalar-isTximport.R
check-scalar-isTximport.Rd
Does the input contain a tximport list?
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