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

no slot name "defaultCluster" for this object of class "liger" #310

Open
Obtusah opened this issue Apr 16, 2024 · 1 comment
Open

no slot name "defaultCluster" for this object of class "liger" #310

Obtusah opened this issue Apr 16, 2024 · 1 comment

Comments

@Obtusah
Copy link

Obtusah commented Apr 16, 2024

Hi, while running a code using liger package,
The error seems to be caused of liger object. My

object@uns

doesn't have attribute 'defaultCluster'.
I printed out the 'object@uns'. The contents were lines below "+++...++" in the image.
only attributes named factorization and factorization$k were present.

I searched liger code and am guessing 'defaultCluster' is some kind of getter.

image

@mvfki
Copy link
Collaborator

mvfki commented Apr 16, 2024

Hi @Obtusah ,

defaultCluster is technically not a "slot" of a <liger> class object in R terms. You'll be able to access it with getter function defaultCluster(sr_liger) once you have it set. From the screenshot, it doesn't seem that you have any clustering result present at this moment, so you should get NULL when you call that getter. It'll be automatically set when you have your first clustering run. If you need to tweak parameters and save an alternative result with a different variable name, you might need to reset with defaultCluster(sr_liger) <- <newVariable>. If you really need to use symbol access like @, it is accessible at sr_liger@uns$defaultCluster. Note that defaultDimRed is accessed in a similar way.

Best,
Yichen

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

2 participants