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
Brief Overview
I'm working with six Seurat objects corresponding to 6 reactions/batches (GEM-A, GEM-B, GEM-1, GEM-2, GEM-3, GEM-4) each of these contain x4 samples multiplexed together (so a total of 24 samples). I want to merge and integrate by sample rather than batch. However, the objects contain batch-separated layers (e.g., 'counts.GEM-A', 'data.GEM-A', etc.) within the 'RNA' assay. After merging, I intend to run NormalizeData(), ScaleData(), and RunPCA() before proceeding with integration as per this vignette https://satijalab.org/seurat/articles/seurat5_integration.
Problems Encountered
Failure to Rebuild Assays using JoinLayers() When I try to combine all split layers within the 'RNA' assay using JoinLayers(), I encounter the following error:
Error in fn():
! Cannot add new cells with [[<-
Error during wrapup: long vectors not supported yet: ../../src/include/Rinlinedfuns.h:537
Even when requesting up to 500GB of memory, this approach fails. This error occurs particularly when I try to JoinLayers() on all six objects together. However, the same approach works perfectly fine when I merged four objects together (total 16 samples), suggesting the error is related to memory exhaustion or the number of split layers.
Splitting Merged Object with SplitObject() Fails I attempted to directly split the merged object by sample using:
split_object <- SplitObject(merged, split.by = 'sample')
This results in:
RNA assay doesn't leave any cells, so it is removed
Error in subset.Seurat(x = object, cells = cells) :
No cells left in the default assay, please change the default assay
Errors Occur When Attempting Normalisation and other processing
Even if I proceed WITHOUT splitlayers and keep the merged object as is, NormalizeData(), FindVariableFeatures(), ScaleData(), etc., all return similar errors:
Error in fn():
! Cannot add new cells with [[<-
Attempting to process only the counts layer via:
merged <- NormalizeData(merged, normalization.method = 'LogNormalize', layers = 'counts')
Fails with the same error.
What I Have Tried
Rebuilding the RNA assay for each object independently with JoinLayers() before merging.
Removing scale.data layers before merging to reduce memory usage.
Processing each object separately before merging.
Specifying layers = 'counts' during normalization.
Attempting to split the merged object directly using SplitObject().
Request
I am hoping you could help me with how to properly handle my merged objects, normalising, and splitting the merged object by sample. I would greatly appreciate any insights or suggestions you can provide. Do I need to break my data down into smaller pieces? How should I go about combining them together for analysis then?
My main goal is to be able to integrate all 6 runs (24 samples) together using Harmony and carry on with DEX
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Brief Overview
I'm working with six Seurat objects corresponding to 6 reactions/batches (GEM-A, GEM-B, GEM-1, GEM-2, GEM-3, GEM-4) each of these contain x4 samples multiplexed together (so a total of 24 samples). I want to merge and integrate by sample rather than batch. However, the objects contain batch-separated layers (e.g., 'counts.GEM-A', 'data.GEM-A', etc.) within the 'RNA' assay. After merging, I intend to run NormalizeData(), ScaleData(), and RunPCA() before proceeding with integration as per this vignette https://satijalab.org/seurat/articles/seurat5_integration.
Problems Encountered
Failure to Rebuild Assays using JoinLayers() When I try to combine all split layers within the 'RNA' assay using JoinLayers(), I encounter the following error:
Error in
fn()
:! Cannot add new cells with [[<-
Error during wrapup: long vectors not supported yet: ../../src/include/Rinlinedfuns.h:537
Even when requesting up to 500GB of memory, this approach fails. This error occurs particularly when I try to JoinLayers() on all six objects together. However, the same approach works perfectly fine when I merged four objects together (total 16 samples), suggesting the error is related to memory exhaustion or the number of split layers.
Splitting Merged Object with SplitObject() Fails I attempted to directly split the merged object by sample using:
split_object <- SplitObject(merged, split.by = 'sample')
This results in:
RNA assay doesn't leave any cells, so it is removed
Error in subset.Seurat(x = object, cells = cells) :
No cells left in the default assay, please change the default assay
Errors Occur When Attempting Normalisation and other processing
Even if I proceed WITHOUT splitlayers and keep the merged object as is, NormalizeData(), FindVariableFeatures(), ScaleData(), etc., all return similar errors:
Error in
fn()
:! Cannot add new cells with [[<-
Attempting to process only the counts layer via:
merged <- NormalizeData(merged, normalization.method = 'LogNormalize', layers = 'counts')
Fails with the same error.
What I Have Tried
Request
I am hoping you could help me with how to properly handle my merged objects, normalising, and splitting the merged object by sample. I would greatly appreciate any insights or suggestions you can provide. Do I need to break my data down into smaller pieces? How should I go about combining them together for analysis then?
My main goal is to be able to integrate all 6 runs (24 samples) together using Harmony and carry on with DEX
Beta Was this translation helpful? Give feedback.
All reactions