addInfo | R Documentation |
The function adds information at the bin and gene level by running addBinInfo
,
and addGeneInfo
addInfo(cnr, df, gdf = NULL, ...)
cnr |
a cnr bundle |
df |
a data.frame with the data to incorporate into chromInfo. Particularly useful for adding p-values, genetic effects, etc to the bins |
gdf |
a data.frame with the data to incorporate into gene.index. Particularly useful for adding p-values, genetic effects, etc to the genes |
... |
other parameters passed to |
Returns a CNR object with added columns to the chromInfo and to the gene.index. e.g. p-values for genome wide scans,
data(cnr)
fakeBinPval <- data.frame(pval = runif(5000))
fakeGenePval <- data.frame(hgnc.symbol = cnr$gene.index$hgnc.symbol,
pval = runif(nrow(cnr$gene.index)))
cnr <- addInfo(cnr, df = fakeBinPval, gdf = fakeGenePval)
head(cnr$chromInfo)
head(cnr$gene.index)
## add info only to bins
fakeBinPval2 <- data.frame(pval = runif(5000))
cnr <- addInfo(cnr, df = fakeBinPval2)
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.