enrichment_by_annotation: Enrichment of rare variants stratified by their annotation

Description Usage Arguments Value

View source: R/enrichment_functions.R

Description

Enrichment of rare variants stratified by their annotation

Usage

1
2
3
enrichment_by_annotation(outlier.calls, rare.variants,
  limit.to.genes.w.outliers = T, sig = 0.05, verbose = T,
  draw.plot = T)

Arguments

outlier.calls

A data frame with columns GeneID, SampleName, and outlier.score. The outlier.score is the result of any expression based test which designates a gene as an outlier at some threshold.

rare.variants

A data frame that lists all rare variants found near individual-gene pairs. Must columsn titled SampleName, GeneID, chr, start, and end

limit.to.genes.w.outliers

Default to 'TRUE'. Should I remove genes that are never outliers in any individual?

verbose

Defaults to 'TRUE' Should I print annoying but helpful messages?

annotations

The corresponding annotations for the 'rare.variants' table. This will be joined together.

outlier.thresholds

Defaults to 'c(0.05, 1e-2, 1e-3, 1e-4, 1e-5, 1e-7)'. This script will calculate enrichment at every threshold.

base.significance.cutoff

Default to '0.05'. Only needed if 'limit.to.genes.w.outliers' is true. Use this threshold for deciding whether to exclude genes that are never outliers.

Value

A data frame with enrichment scores at each significance level.

This function takes a data frame of outlier calls and a data frame of rare variant genotype data and produces a data frame with enrichment values representing the relative risk of having a rare variant given outlier status at different significance levels.


jeinson/ExOutBench documentation built on Nov. 4, 2019, 2:38 p.m.