create_dummy_txi: Create a dummy txi objects

View source: R/txi.R

create_dummy_txiR Documentation

Create a dummy txi objects

Description

This function will create a dummy txi object that will have placeholders for some of the tables.

Usage

create_dummy_txi(tables, txOut = FALSE)

Arguments

tables

A list of the tables to add to the dummy_txi object. Must contains at counts (raw counts) or abundance (usually TPM). The anno is also mandatory.

txOut

Are the counts corresponding to transcripts abundance? Default: FALSE.

Details

This function is useful if you only have access to raw counts or abundance tables. Otherwise, it is recommended to use the import_kallisto function as it will create a complete and valid txi object.

The txi will contains extra elements to specify how it was created and will provide extra checks to avoid using it incorrectly with the other functions. For instance, to use the produce_pca_df function, the txi must have a valid abundance table. If the dummy_txi was created without such a table, it will return an error message to avoid producing an invalid result.

You have to provide at least the raw counts or the abundance table **and** the corresponding annotation in the same format as the one produced by the anno:prepare_anno function.

Value

The dummy_txi object.

Examples

txi <- get_demo_txi()

lst <- list()
lst$counts <- txi$counts
lst$abundance <- txi$abundance
lst$anno <- txi$anno

# We then create a dummy txi object
dummy_txi <- create_dummy_txi(txi)
# This dummy_txi contains a placeholder for the length matrix


CharlesJB/rnaseq documentation built on Oct. 17, 2023, 5:37 p.m.