initializeResults: Initialize RegspliceResults object.

Description Usage Arguments Details Value See Also Examples

View source: R/initializeResults.R

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

regsplice documentation built on Nov. 1, 2018, 5:06 a.m.