extract_outputs {GenomicOZone} | R Documentation |
Extract informtation from the output of GenomicOZone
function, including a gene annotation object, a zone annotation object, an outstanding zone annotation object, or a zone activity matrix, respectively. The activity of genes without annotation is appended at the bottom of the zone activity matrix.
extract_genes(GOZ.ds) extract_zones(GOZ.ds) extract_outstanding_zones( GOZ.ds, alpha = 0.05, min.effect.size = 0.8) extract_zone_expression(GOZ.ds)
GOZ.ds |
a object returned from the |
alpha |
a cutoff for adjusted |
min.effect.size |
the minimum effect size required for an outstanding zone. The effect size for ANOVA ranging from 0 to 1 is calculated by R package sjstats (Lüdecke 2019). Default to 0.8. |
These functions take the input of an object created by GOZDataSet
and processed by GenomicOZone
. The functions access the object and fetch the results.
The function extract_zone_expression
offers the zone activity matrix. The activity of a zone is the total activity of genes within the zone for each sample. The activity of genes without annotation is included as last rows in the zone activity matrix.
The first three functions return an object of GRanges
class (Lawrence et al. 2013) for all genes, all zones and outstanding genomic zones only. The gene GRanges
object includes genome annotation and the zones where the genes belong. The zone GRanges
object includes zone positions and p
-values of differential zone analysis. Outstanding genomic zones are a subset of all zones that satisfy required p
-value and effect size.
Lawrence M, Huber W, Pages H, Aboyoun P, Carlson M, Gentleman R, Morgan MT, Carey VJ (2013).
“Software for computing and annotating genomic ranges.”
PLoS computational biology, 9(8), e1003118.
Lüdecke D (2019).
sjstats: Statistical Functions for Regression Models (Version 0.17.5).
doi: 10.5281/zenodo.1284472, https://CRAN.R-project.org/package=sjstats.
See GOZDataSet
for how to create the input object before outstanding genomic zone analysis. The object must contain information obtained from outstanding zone analysis function GenomicOZone
.
# Create an object of GOZ.ds data <- matrix(c(1,5,2,6,5,1,6,2), ncol = 2, byrow = TRUE) rownames(data) <- paste("Gene", 1:4, sep='') colnames(data) <- paste("Sample", c(1:2), sep='') colData <- data.frame(Sample_name = paste("Sample", c(1:2), sep=''), Condition = c("Cancer", "Normal")) design <- ~ Condition rowData.GRanges <- GRanges(seqnames = Rle(rep("chr1", 4)), ranges = IRanges(start = c(1,2,3,4), end = c(5,6,7,8))) names(rowData.GRanges) <- paste("Gene", 1:4, sep='') ks <- c(2) names(ks) <- "chr1" GOZ.ds <- GOZDataSet(data, colData, design, rowData.GRanges = rowData.GRanges, ks = ks) #### # Run outstanding zone analysis GOZ.ds <- GenomicOZone(GOZ.ds) #### # Extract output in various formats Gene.GRanges <- extract_genes(GOZ.ds) head(Gene.GRanges) Zone.GRanges <- extract_zones(GOZ.ds) head(Zone.GRanges) OZone.GRanges <- extract_outstanding_zones( GOZ.ds, alpha = 0.05, min.effect.size = 0.8) head(OZone.GRanges) Zone.exp.mat <- extract_zone_expression(GOZ.ds) head(Zone.exp.mat)