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

Changing back to [[]] for feature-level metadata #1510

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

Gesmira
Copy link
Contributor

@Gesmira Gesmira commented Oct 20, 2023

SeuratObject is going back to using the double bracket [[]] for feature-level metadata and using single brackets [] for accessing layer data. This switch caused the below code to fail.

> pbmc.atac <- LoadData("pbmcMultiome", "pbmc.atac")
> pbmc.atac <- subset(pbmc.atac, seurat_annotations != 'filtered')
Error in `LayerData<-`(object = `*tmp*`, layer = i, ..., value = value) : 
  'value' must be a 'matrix' or 'dgCMatrix' in v3 Assays, not a 'data.frame'

I just removed the specific check for SeuratObject version as now the previous code will work normally.

@timoast
Copy link
Collaborator

timoast commented Oct 23, 2023

Thanks!

@timoast timoast merged commit b31a388 into stuart-lab:seurat5 Oct 23, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants