Description Usage Arguments Value Examples
View source: R/helper_functions.R
Normalizes a set of columns representing read counts from different samples by their mean. Then calculates a statistic across the rows of normalized counts.
1 | generateBackground(sample.names, gr, fn=median)
|
sample.names |
A vector of metadata column names in gr to be used as background samples |
gr |
A GRanges object containing the read counts |
fn |
The statistic to be applied across the rows of normalized counts. Defaults to median, but the standard deviation can also be calculated in this way. |
The value of fn applied across the rows of normalized read counts.
1 2 3 4 | data(exomecounts)
sample.names <- grep("HG.+",colnames(mcols(exomecounts)),value=TRUE)
exomecounts$bg <- generateBackground(sample.names, exomecounts, median)
exomecounts$bg.sd <- generateBackground(sample.names, exomecounts, sd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.