View source: R/get_frequencies.R
get_alteration_frequencies | R Documentation |
Wrapper function to calculate alteration frequencies (amplifications, deletions, and both combined) at the bin level, and gene level.
get_alteration_frequencies(cnr, symbol = "hgnc.symbol", ...)
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 |
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).
data(cnr)
head(cnr$gene.index)
head(cnr$chromInfo)
cnr <- get_alteration_frequencies(cnr)
head(cnr$chromInfo)
head(cnr$gene.index)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.