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

Significant differences found between same matrix #10

Open
cfuses opened this issue Sep 18, 2024 · 0 comments
Open

Significant differences found between same matrix #10

cfuses opened this issue Sep 18, 2024 · 0 comments

Comments

@cfuses
Copy link

cfuses commented Sep 18, 2024

I have two adjacency matrices created with CellOracle, and I wanted to compare them directly using manifolAlignment() followed by dRegulation(). My range of values inside the matrix is smaller than (1, -1), as they do not represent strict correlations between entries. Nevertheless, I normalize and symmetrize the matrices as done by scTenifoldNet before using its functions. The issue I am encountering is that when I compare one matrix to itself, the output shows around 10 significant distances between elements, when there should not be any significant difference as it is the same matrix.

Here you have everything I am doing with the matrix:

# Set diagonal values to zero
diag(adj_matrix_wt) <- 0

# Normalize the matrix by dividing by the maximum absolute value
adj_matrix_wt <- adj_matrix_wt / max(abs(adj_matrix_wt))

# Symmetrize matrix
adj_matrix_wt <- (adj_matrix_wt + t(adj_matrix_wt)) / 2

# Align matrices 
maOutput <- manifoldAlignment(adj_matrix_wt, adj_matrix_wt)

# Evaluate the difference in regulation
dcOutput <- dRegulation(maOutput)

And I also attach my matrix in a tab separated txt file so you can test what I am dealing with:
adj_matrix_wt.txt

Am I misusing these functions? Is there a reason why this is happening?

Thank you for your help!

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