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

Execution Speed of LayerData & co. #222

Open
vertesy opened this issue Sep 27, 2024 · 0 comments
Open

Execution Speed of LayerData & co. #222

vertesy opened this issue Sep 27, 2024 · 0 comments

Comments

@vertesy
Copy link

vertesy commented Sep 27, 2024

Dear Seurat Team,

I am using object properties to annotate plots in my Seurat.utils package.

I noticed that the proper way to access data slots seem to be very slow:

> tic(); nrow(LayerData(obj, assay = "RNA", layer = "scale.data")); toc();
[1] 2000
1.323 sec elapsed

## Compared to
> tic(); nrow(obj@assays$RNA@layers$scale.data); toc();
[1] 2000
0.001 sec elapsed

Speed matters if you call this at every UMAP, and you plot 30 genes (DGEA).

Is there any suggestion how to use your suggested approach and maintain speed?
Or did I misunderstood the use case / instructions?

Thank you,
Abel

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

No branches or pull requests

1 participant