Learn R Programming

genomation (version 1.4.2)

scaleScoreMatrixList: Scale the ScoreMatrixList

Description

Scales each ScoreMatrix in the ScoreMatrixList object, by rows and/or columns

Usage

scaleScoreMatrixList(sml, columns, rows, scalefun)

## S3 method for class 'ScoreMatrixList': scaleScoreMatrixList(sml, columns = FALSE, rows = TRUE, scalefun = NULL)

Arguments

sml
a ScoreMatrixList object
columns
a columns whether to scale the matrix by columns. Set by default to FALSE
rows
a rows Whether to scale the matrix by rows. Set by default to TRUE
scalefun
a function object that takes as input a matrix and returns a matrix. By default the argument is set to the R scale function with center=TRUE and scale=TRUE

Value

  • ScoreMatrixList object

Examples

Run this code
library(GenomicRanges)
data(cage)
data(cpgi)
data(promoters)

cage$tpm = NULL
targets = GRangesList(cage=cage, cpgi=cpgi)
sml = ScoreMatrixList(targets, promoters, bin.num=10, strand.aware=TRUE)
sml.scaled = scaleScoreMatrixList(sml, rows=TRUE)
sml.scaled
multiHeatMatrix(sml)

Run the code above in your browser using DataLab