Collapse TF motif matrix of arbitrary values by aggregating values over motif cluster assignment

collapseMotifMatrix(
  X,
  motifClust = NULL,
  assembly = "hg38",
  motifs = "jaspar",
  aggrFun = mean
)

Arguments

X

matrix to be collapsed. Must have the motif names as rownames. E.g. matrix obtained by chromVAR::deviationScores

motifClust

optional: motif clustering computed by getMotifClustering. If NULL (default) the default clustering will be retrieved

assembly

genome assembly for which the motif clustering should be retrieved. Only required if for automatic mode (i.e. motifClust=NULL).

motifs

a character string specifying the motif set (currently only "jaspar" is supported)

aggrFun

function to use to aggregate values

Value

list containing two elements: X: Collapsed matrix containing motif cluster aggregated values;

clustering: clustering result used for aggregation (seegetMotifClustering for details)

Author

Fabian Mueller