Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yijia-Jiang opened this issue Feb 25, 2025 · 0 comments

Comments

@Yijia-Jiang
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant