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 when using addClusters() on multiome data #2011

Open
klgoss opened this issue Aug 24, 2023 · 18 comments
Open

Error when using addClusters() on multiome data #2011

klgoss opened this issue Aug 24, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@klgoss
Copy link

klgoss commented Aug 24, 2023

Hello,

Thank you so much for creating such a great tool. I really appreciate how thorough you are in the manual and do a great job of explaining what you're doing/why you're doing it. I'm trying to use ArchR on 10X Multiome data. I'm following the tutorial here: https://greenleaflab.github.io/ArchR_2020/Ex-Analyze-Multiome.html and am getting an error on the addCluster() step.

Attach your log file
ArchR-addClusters-f90d110034e1-Date-2023-08-24_Time-15-28-08.442722.log

Describe the bug
I'm following the tutorial but get an error when I try to run addClusters(): <simpleError in validObject(.Object): invalid class “DimReduc” object: dimensions for ‘cell.embeddings’ must be in order>

Additional context
I did remove some cells that I previously determined to be low quality, so I'm not sure if this is causing the issue or not.

@klgoss klgoss added the bug Something isn't working label Aug 24, 2023
@rcorces
Copy link
Collaborator

rcorces commented Aug 24, 2023

Hi @klgoss! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.

It is worth noting that there are very few actual bugs in ArchR. If you are getting an error, it is probably something specific to your dataset, usage, or computational environment, all of which are extremely challenging to troubleshoot. As such, we require reproducible examples (preferably using the tutorial dataset) from users who want assistance. If you cannot reproduce your error, we will not be able to help.
Before going through the work of making a reproducible example, search the previous Issues, Discussions, function definitions, or the ArchR manual and you will likely find the answers you are looking for.
If your post does not contain a reproducible example, it is unlikely to receive a response.

__In addition to a reproducible example, you must do the following things before we help you, unless your original post already contained this information:
1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved?
2. Did you post your log file? If not, add it now.
3. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

@rcorces
Copy link
Collaborator

rcorces commented Aug 25, 2023

satijalab/seurat#3287

@rcorces rcorces closed this as completed Aug 25, 2023
@rcorces rcorces reopened this Aug 25, 2023
@rcorces
Copy link
Collaborator

rcorces commented Aug 25, 2023

Sorry - hit enter too soon. The above post is from a related post. You can see that this error is coming from Seurat because your object is not properly formatted. If you need additional help, this seems like a Seurat issue to me.

@rcorces rcorces closed this as completed Aug 25, 2023
@bingy007
Copy link

bingy007 commented Nov 7, 2023

Hello,

Thank you so much for creating such a great tool. I really appreciate how thorough you are in the manual and do a great job of explaining what you're doing/why you're doing it. I'm trying to use ArchR on 10X Multiome data. I'm following the tutorial here: https://greenleaflab.github.io/ArchR_2020/Ex-Analyze-Multiome.html and am getting an error on the addCluster() step.

Attach your log file ArchR-addClusters-f90d110034e1-Date-2023-08-24_Time-15-28-08.442722.log

Describe the bug I'm following the tutorial but get an error when I try to run addClusters(): <simpleError in validObject(.Object): invalid class “DimReduc” object: dimensions for ‘cell.embeddings’ must be in order>

Additional context I did remove some cells that I previously determined to be low quality, so I'm not sure if this is causing the issue or not.

Hi klgoss,

Have you figured this out?

B

@Qi-Qiao
Copy link

Qi-Qiao commented Nov 21, 2023

Hello,
Thank you so much for creating such a great tool. I really appreciate how thorough you are in the manual and do a great job of explaining what you're doing/why you're doing it. I'm trying to use ArchR on 10X Multiome data. I'm following the tutorial here: https://greenleaflab.github.io/ArchR_2020/Ex-Analyze-Multiome.html and am getting an error on the addCluster() step.
Attach your log file ArchR-addClusters-f90d110034e1-Date-2023-08-24_Time-15-28-08.442722.log
Describe the bug I'm following the tutorial but get an error when I try to run addClusters(): <simpleError in validObject(.Object): invalid class “DimReduc” object: dimensions for ‘cell.embeddings’ must be in order>
Additional context I did remove some cells that I previously determined to be low quality, so I'm not sure if this is causing the issue or not.

Hi klgoss,

Have you figured this out?

B

Hi,

I have the same issue here. Any suggestions will be appreciated!

@Sky970415
Copy link

I am having the same issue. Seurat recently made an update, I guess that might be relevant?


2023-12-08 14:22:58.983551 : ERROR Found in FindNeighbors for
LogFile = ArchRLogs/ArchR-addClusters-2fc412d3fa3b-Date-2023-12-08_Time-14-22-58.155241.log

<simpleError in validObject(.Object): invalid class “DimReduc” object: dimensions for ‘cell.embeddings’ must be in order>



2023-12-08 14:22:58.988674 : ERROR Found in runClusters for
LogFile = ArchRLogs/ArchR-addClusters-2fc412d3fa3b-Date-2023-12-08_Time-14-22-58.155241.log

<simpleError in .logError(e, fn = "FindNeighbors", info = "", errorList = errorList, logFile = logFile): Exiting See Error Above>


@ZayaAyush
Copy link

@rcorces @Sky970415 @Qi-Qiao @klgoss
I have the same issue; could you figure it out?

<simpleError in validObject(.Object): invalid class “DimReduc” object: dimensions for ‘cell.embeddings’ must be in order>

@sylestiel
Copy link

Reverting to Seurat 4.3.0 fixes the problem with addClusters()

@ZayaAyush
Copy link

Reverting to Seurat 4.3.0 fixes the problem with addClusters()

Thank you! It worked:))

@ShashTrip1
Copy link

I reverted to Seurat 4.3.0 and still getting the same error. Any ideas?

@sylestiel
Copy link

@ShashTrip1
Try
devtools::install_github("GreenleafLab/ArchR", ref="release_1.0.2", repos = BiocManager::repositories(), force=TRUE).

@heheige
Copy link

heheige commented Mar 19, 2024

I have the same problem after converting the seurat to 4.3.0. Any one figure it out? Many thank.

@colquittlab
Copy link

I'm having the same issue as well. I'm using Seurat v5 for other analyses, so an update in ArchR to accommodate these changes would be very much appreciated. Thanks.

@ZayaAyush
Copy link

Hi, I removed Seurat v5 and installed the packages below. Then it worked. I hope it will help.

Install the remotes package

install.packages('remotes')

Replace '4.3.0' with your desired version

remotes::install_version(package = 'Seurat', version = package_version('4.3.0'))
library(Seurat)
packageVersion("Seurat")
remotes::install_version("Matrix", version = "1.6.3")
packageVersion("Matrix")
library(Matrix)

@shamer3
Copy link

shamer3 commented Apr 15, 2024

I have done both just Seurat downgraded to 4.3.0 and the combined Seurat and Matrix downgrade and I am still having issues. Anyone else found a fix ?

@juliabelk
Copy link

One option is to use addClusters(proj, method="scran", reducedDims = "LSI_Combined") to get around the Seurat issues. However I had trouble tuning the number of clusters (equivalent to resolution in Seurat) with scran, so I'm trying to downgrade Seurat as well.

@rcorces
Copy link
Collaborator

rcorces commented Aug 26, 2024

Credit to @catpetersen for looking into this.
This problem presumably occurs here:

obj[['pca']] <- Seurat::CreateDimReducObject(embeddings=mat, key='PC_', assay='RNA')

Seurat won’t accept the embeddings matrix mat because the column names are not numbered perfectly in order. This only comes up in the multi-omic context where you run iterative LSI twice, so your column names are LSI1-30 and then LSI1-30 again. The fix should be simple but I dont have bandwidth to address it nor am I actively working with multiome data to test a fix.

In theory, all you need to do is add a line directly before the one that errors out that renumbers the column names from LSI1-60 instead or similar so that they are in order.

@rcorces rcorces reopened this Aug 26, 2024
@galib36
Copy link

galib36 commented Sep 11, 2024

Following code solved the problem for me

#Combined Dims
archrProj <- addCombinedDims(archrProj, reducedDims = c("LSI_ATAC", "LSI_RNA"), name =  "LSI_Combined")
                                         
colnames(archrProj@reducedDims$LSI_Combined$matRD) <- paste0('LSI',1:length(colnames(getReducedDims(archrProj,'LSI_Combined'))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests