CalculateEnrichment: Calculate Enrichment

Description Usage Arguments Value

View source: R/funcivar.R

Description

Calculates the enrichment of foreground variants vs background variants against a list of biofeatures.

Usage

1
2
3
CalculateEnrichment(variants, features, feature.type = "biofeatures",
  CI = 0.95, prior = c(a = 0.5, b = 0.5), strict.subset = "guess",
  return.overlaps = FALSE)

Arguments

variants

a list of two GRanges or VCF objects representing the foreground and background variants to be compared. In the format list(fg = object, bg = object).

features

A GRangesList of biofeatures or segmentations to calculate enrichment of the variants against. This field is optional if feature.type = "biofeatures", and the variants objects have already had SetOverlaps performed against them.

feature.type

a character vector, either "biofeatures" for generic feature overlaps, or "segmentations" specifying that the features slot is populated with disjoint genomic segmentations imported by GetSegmentations()

CI

numeric, the width of the credible interval for the calculation of the beta-binomal test for enrichment

prior

numeric vector of length two setting the parameters of the prior of the beta distribution, in the form, e.g., c(a = 0.5, b = 0.5)

strict.subset

either a boolean value, or "guess" indicating if the foreground is a strict subset of the background, or an independant set.

return.overlaps

boolean value indicating if, in addition to the enrichment data.frame, a GRanges object representing the overlaps of the variants and features be returned.

Value

either a data.frame indicating the enrichment statistics of the variant set in the features, or a list including the overlaps of the the variants and features, in addition to the enrichment data.frame. log1p(oddsratio) are reported from fisher.test


Simon-Coetzee/funcivar documentation built on Aug. 2, 2021, 9:55 a.m.