Entering edit mode
5 weeks ago
Chris
▴
340
Hi all,
I try to subset seurat object by sample:
subset(x = combined_seurat_large, subset = sample == "1") Error in .subscript.2ary(x, i, j, drop = drop) : subscript out of bounds
I found other people asked this error on the internet but don't have a clear answer yet. Would you please have a suggestion? The error persists with seurat version 4.3 and 5.1. Thank you so much!
Seems that the bug still exists and they are working on it.
...and maybe you should try switch to Scanpy as @stefanonard85 said here: github issue
Thank you for the suggestion. Another way is to recreate the seurat object and use only the sample you want.
If
sample
is one of the column inmeta.data
, you can subset sample "1" using following commands:Thank you for your reply! Unfortunately, I got the same error message.