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

Transpose AnnData in Python #9

Closed
lazappi opened this issue Jun 17, 2020 · 1 comment
Closed

Transpose AnnData in Python #9

lazappi opened this issue Jun 17, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@lazappi
Copy link
Member

lazappi commented Jun 17, 2020

AnnData objects have a .T method which transposes the whole object. It may be more efficient to use that rather than transpose each matrix in R as we do currently in AnnData2SCE()

May lead to confusion in the code though as .var would no longer refer to variable (features) and .obs to observations (cells).

@lazappi
Copy link
Member Author

lazappi commented Jun 25, 2020

Did a quick benchmark and it doesn't seem to make a lot of difference so don't think it's worth the effort.

Unit: seconds
                  expr       min        lq     mean   median       uq      max neval
   AnnData2SCE(adata2) 10.606434 11.042323 11.34995 11.27907 11.49126 14.75223   100
 AnnData2SCE_T(adata2)  9.521594  9.891049 10.12624 10.03706 10.33960 12.24301   100

@lazappi lazappi closed this as completed Jun 25, 2020
@lazappi lazappi added the enhancement New feature or request label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant