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

Error in t.default(obj@reductions$harmony@misc$R) : argument is not a matrix #10

Closed
dcruz5h opened this issue Jul 30, 2021 · 3 comments
Closed

Comments

@dcruz5h
Copy link

dcruz5h commented Jul 30, 2021

Thank you, I recently installed symphony and I'm trying it with a reference Seurat object composed of four integrated samples with harmony. After running buildReferenceFromSeurat, it gives an error:
Error in t.default(obj@reductions$harmony@misc$R) :
argument is not a matrix

What suppose to be stored in misc slot of my harmony metadata ? what is R in this case ?
Thank you !

@joycekang
Copy link
Collaborator

Hi @dcruz5h,

R represents the assignment of cells to soft clusters in the Harmony model, which is used to perform the integration of the reference. The obj@reductions$harmony@misc$R should hold a matrix of dimensions n x k where n is the number of cells and k is the number of Harmony soft cluster centroids (default is 100). You should not need to calculate or set R yourself - it should have been calculated during the Harmony integration step and saved already in to the @misc$R slot.

It's hard to debug what might be going on in your case - are you able to run the Seurat.ipynb notebook from beginning to end? Do you have the most recent version of Harmony? Is your obj@reductions$harmony@misc$R slot empty or does it contain something that is not a matrix?

@dcruz5h
Copy link
Author

dcruz5h commented Aug 3, 2021

I do have the most recent version of harmony, and when I run runHarmony ( a harmony function) I get a beautiful integrated object but the obj@reductions$harmony@misc$R slot is empty. If I run RunHarmony.Seurat ( from utils_seurat.R), I get a obj@reductions$harmony@misc$R with a matrix. Strange, I wouldn't know why, nonetheless I managed to run symphony on my samples. :)

@NK-HD
Copy link

NK-HD commented Jan 15, 2022

Hey @joycekang ! I have a similar issue, but I would like to avoid having to (re)run the RunHarmony.Seurat function, since I already did alot of downstream analysis on this object and would like to keep the identical clusters.

Is there a way to get/calculate this data of of an existing object processed with the default RunHarmony function?

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

3 participants