sanitizeTximportIdentifiers: Sanitize tximport identifiers

View source: R/sanitizeTximportIdentifiers.R

sanitizeTximportIdentifiersR Documentation

Sanitize tximport identifiers

Description

Sanitize tximport identifiers

Usage

sanitizeTximportIdentifiers(txi)

Arguments

txi

list. tximport list.

Details

Fix transcript identifiers that contain "|" delimters. This can occur when importing GENCODE-aligned data from kallisto, and BAM files from salmon.

No modification occurs for objects not containing these types of identifier.

Value

list. tximport list with corrected transcript identifiers.

Note

Updated 2023-07-25.

Examples

suppressPackageStartupMessages({
    library(tximport)
    library(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)))
txi <- tximport(files, type = "salmon", txIn = TRUE, txOut = TRUE)
txi <- sanitizeTximportIdentifiers(txi)
print(head(rownames(txi[["counts"]])))

acidgenomics/r-deseqanalysis documentation built on March 30, 2024, 12:08 p.m.