addGeneInfo | R Documentation |
The function adds information to the gene.index.#'
addGeneInfo(
cnr,
df,
gene.ids = "hgnc.symbol",
sort = FALSE,
all.index = TRUE,
...
)
cnr |
a cnr bundle |
df |
a data.frame with the data to incorporate. Particularly useful for gene annotations, filters e.g. OncoKB, or results from analyses e.g. p-values, genetic effects, etc to the genes |
gene.ids |
column for gene.ids, must be included in both |
sort |
wether to sort the ouput object, default is FALSE |
all.index |
logical, use all of gene.index. When FALSE, return only the intersect of gene.idex and df. default TRUE |
... |
additional parameters passed to |
Returns a CNR object with added columns from df to the gene.index. e.g. p-values for genome wide scans.
By default merge occurs using the intersect of column names of
the gene.index and df. To change this, use by.x and by.y. See
merge
. Rownames are added after the merge
from the column specified as gene.ids
data(cnr)
fakeGenePval <- data.frame(hgnc.symbol = cnr$gene.index$hgnc.symbol,
pval = runif(nrow(cnr$gene.index)))
cnr <- addGeneInfo(cnr, df = fakeGenePval)
head(cnr$gene.index)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.