initializeResults: Initialize RegspliceResults object.

View source: R/initializeResults.R

initializeResultsR Documentation

Initialize RegspliceResults object.

Description

Initialize a RegspliceResults object, which will contain the results of the regsplice analysis.

Usage

initializeResults(rs_data)

Arguments

rs_data

RegspliceData object. This should contain gene IDs in a column named gene_IDs in the row meta-data, which can be accessed with the accessor function rowData.

Details

Creates a RegspliceResults object containing gene names only. This object will subsequently be populated using the functions fitRegMultiple, fitNullMultiple, fitFullMultiple, and LRTests.

Previous step: Calculate limma-voom transformation and weights with runVoom. Next step: Fit models with fitRegMultiple, fitNullMultiple, and fitFullMultiple.

Value

Returns a RegspliceResults object containing gene IDs only.

See Also

RegspliceData RegspliceResults fitRegMultiple fitNullMultiple fitFullMultiple LRTests summaryTable

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)
rs_data <- filterLowCounts(rs_data)
rs_data <- runNormalization(rs_data)
rs_data <- runVoom(rs_data)

rs_results <- initializeResults(rs_data)


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