Skip to content

Why is deviation z-score in chromVar does not have 0 mean and 1 variance? #122

@Yijia-Jiang

Description

@Yijia-Jiang

Hello, I am investigating the output of chromVar, and I thought the z-scored deviation score normalizes the deviation score for each motif, and therefore the mean and variance of z-score matrix should be 0 and 1.

However, I tested both rowVars and colVars for the matrix, but the variance is not constantly 1. Could you explain why the variance of z-score is not 1?

This is the code I used:

computing deviations

dev <- chromVAR::computeDeviations(
object = chromvar.obj,
annotations = motif_ix,
background_peaks = bg
)

dev_score1 <- SummarizedExperiment::assays(dev)[[1]]
dev_score2 <- SummarizedExperiment::assays(dev)[[2]]

dev_score_z <- dev_score2
print(rowVars(dev_score_z))
print(colVars(dev_score_z))

And this is an example of row variance:

Image

example of column variance:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions