Skip to content

How index RNA@data in Seurat V5? #8328

Answered by samuel-marsh
RobinPranter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Yes this is to be expected given the new structure of Seurat V5 objects (https://satijalab.org/seurat/articles/essential_commands). This example also shows the benefit of using Seurat-based accessor functions as they will function across versions.

In this case what you are looking for is FetchData.

norm_data_subset <- FetchData(object = obj, vars = c("gene1", "gene2", etc), layer = "data")

# or as sparse matrix
norm_data_subset_mat <- as.sparse(FetchData(object = obj, vars = c("gene1", "gene2", etc), layer = "data"))

Best,
Sam

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@RobinPranter
Comment options

@samuel-marsh
Comment options

@RobinPranter
Comment options

Answer selected by samuel-marsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants