filterZeros: Filter zero-count exons.

View source: R/filterZeros.R

filterZerosR Documentation

Filter zero-count exons.

Description

Filter exons with zero RNA-seq read counts in all biological samples.

Usage

filterZeros(rs_data)

Arguments

rs_data

RegspliceData object.

Details

Removes exon bins with zero RNA-seq read counts in all biological samples. Any remaining single-exon genes (after filtering) are also removed (since differential splicing requires multiple exon bins).

Input data is assumed to be in the form of a RegspliceData object. See RegspliceData for details.

After filtering zero-count exon bins, any remaining genes containing only a single exon bin are also removed (since differential splicing requires multiple exon bins).

Filtering should be skipped when using exon microarray data. (When using the regsplice wrapper function, filtering can be disabled with the argument filter = FALSE).

Previous step: Create RegspliceData object with RegspliceData constructor function. Next step: Filter low-count exon bins with filterLowCounts.

Value

Returns a RegspliceData object.

See Also

RegspliceData filterLowCounts

Examples

file_counts <- system.file("extdata/vignette_counts.txt", package = "regsplice")
data <- read.table(file_counts, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
head(data)

counts <- data[, 2:7]
tbl_exons <- table(sapply(strsplit(data$exon, ":"), function(s) s[[1]]))
gene_IDs <- names(tbl_exons)
n_exons <- unname(tbl_exons)
condition <- rep(c("untreated", "treated"), each = 3)

rs_data <- RegspliceData(counts, gene_IDs, n_exons, condition)

rs_data <- filterZeros(rs_data)


lmweber/regsplice documentation built on March 19, 2024, 1:45 p.m.