You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run FastMNN on a Seurat object from an existing analysis where I previously used Harmony integration but now I want the expression values to be batch corrected so I'm trying to use fastMNN instead.
This is my call: int_obj1 <- IntegrateLayers(soup_obj, method=FastMNNIntegration, orig.reduction="pca", new.reduction="integrated.mnn", assay="SCT")
And I get the following error:
Converting layers to SingleCellExperiment
Running fastMNN
Error in .check_valid_batch(batches[[1]], batch = batch) :
'batch' must be specified if '...' has only one object
Each layer contains 1 batch - any advise on how to correct format it for use with FastMNNIntegration please?
The text was updated successfully, but these errors were encountered:
I am not the dev, but I obtain the same issue when I accidentally integrate layers before running the IntegrateLayers with the FastMNNIntegration. If I don't integrate layers, everything works ok. I think what happens in your case is that SCT-integrated assay gets treated as a single object rather than multiple separate layers, hence the error.
Alternatively, if you cannot un-integrate the object, I suggest you provide the batch argument to IntegrateLayers with the vector of group affiliations for each cell (e.g. batch = soup_obj$orig.ident), and it might work.
I'm trying to run FastMNN on a Seurat object from an existing analysis where I previously used Harmony integration but now I want the expression values to be batch corrected so I'm trying to use fastMNN instead.
This is my call:
int_obj1 <- IntegrateLayers(soup_obj, method=FastMNNIntegration, orig.reduction="pca", new.reduction="integrated.mnn", assay="SCT")
And I get the following error:
Each layer contains 1 batch - any advise on how to correct format it for use with FastMNNIntegration please?
The text was updated successfully, but these errors were encountered: