get_alteration_frequencies: estimate bin and gene alteration frequencies

View source: R/get_frequencies.R

get_alteration_frequenciesR Documentation

estimate bin and gene alteration frequencies

Description

Wrapper function to calculate alteration frequencies (amplifications, deletions, and both combined) at the bin level, and gene level.

Usage

get_alteration_frequencies(cnr, symbol = "hgnc.symbol", ...)

Arguments

cnr

a cnr bundle

symbol

gene symbol used on cnr[["genes"]] as column names, e.g. HGNC symbol or ensembl ID. defaults to hgnc.symbol on package gene.index

...

other parameters passed to merge

Value

Calls on get_bin_frequencies and get_gene_frequencies, respectively, to estimate amplification frequencies, deletion frequencies, and the total of both alterations (amp + del combined) at every bin, and gene.

It then merges the bin frequencies to the chromInfo, and gene frequencies to the gene.index.

Currently only tested on integer copy number, where amplifications are hard-coded as three (3) or more copies, and deletions as one (1) or zero (0).

Examples


data(cnr)

head(cnr$gene.index)
head(cnr$chromInfo)

cnr <- get_alteration_frequencies(cnr)

head(cnr$chromInfo)
head(cnr$gene.index)


SingerLab/gac documentation built on Oct. 14, 2022, 4:09 a.m.