Description Usage Arguments Value Examples
Scales the values in the matrix by rows and/or columns
1 2 3 4 5 | scaleScoreMatrix(mat, columns = FALSE, rows = TRUE, scalefun = NULL)
## S4 method for signature 'ScoreMatrix'
scaleScoreMatrix(mat, columns = FALSE, rows = TRUE,
scalefun = NULL)
|
mat |
|
columns |
|
rows |
|
scalefun |
function object that takes as input a matrix and returns a matrix. By default the argument is set to (x - mean(x))/(max(x)-min(x)+1) |
ScoreMatrix
object
1 2 3 4 5 6 7 8 9 | # scale the rows of a scoreMatrix object
library(GenomicRanges)
target = GRanges(rep(c(1,2),each=7), IRanges(rep(c(1,1,2,3,7,8,9), times=2), width=5),
weight = rep(c(1,2),each=7),
strand=c('-', '-', '-', '-', '+', '-', '+', '-', '-', '-', '-', '-', '-', '+'))
windows = GRanges(rep(c(1,2),each=2), IRanges(rep(c(1,2), times=2), width=5),
strand=c('-','+','-','+'))
sm = ScoreMatrix(target, windows)
ssm = scaleScoreMatrix(sm, rows=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.