-
Notifications
You must be signed in to change notification settings - Fork 346
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
fix docstrings example stereoscope #959
Conversation
Codecov Report
@@ Coverage Diff @@
## master #959 +/- ##
=======================================
Coverage 89.57% 89.57%
=======================================
Files 86 86
Lines 6121 6121
=======================================
Hits 5483 5483
Misses 638 638
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! One quick comment
>>> scvi.data.setup_anndata(sc_adata, label_key="labels") | ||
>>> stereo = scvi.external.RNAStereoscope(sc_adata) | ||
>>> scvi.data.setup_anndata(sc_adata, labels_key="labels") | ||
>>> stereo = scvi.external.stereoscope.RNAStereoscope(sc_adata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be accessible from just scvi.external
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both scRNA and spatial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scvi.external
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-f706a22e0ee9> in <module>
----> 1 scvi.external
AttributeError: module 'scvi' has no attribute 'external'
my feeling (but might be wrong) is that you should import it explicitly here
https://github.com/YosefLab/scvi-tools/blob/9b9370aa502b308f84e3129a7c940a9bea06426b/scvi/__init__.py#L10
If I import external
there, it works.
totally unrelated/unwanted request, and (very) minor pet peeve, but adding the ''
to pip install -e .'[dev,tutorials]'
would makes it easier for zsh
users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just committed the latter change you suggested.
I suppose that pattern we can use in the examples here is from scvi.external import RNAStereoscope
I think we just aren't 100% sure we want to import into the top-level yet, as we are still figuring out what external is to some extent. This is also consistent with what scanpy does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whatever you think it's best, I actually like the idea of not having explicit imports, and just implicit import scvi
in the examples. Let me know what to do.
btw also really cool that cellassign is already there! Is this the port of the original implementation in tensorflow or the more recent one in torch https://github.com/camlab-bioml/astir/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok we can leave it like you have it haha.
This is a port of the original implementation, except that we minibatch during inference where they do "full-batch" EM. We'll have a notebook soon showing consistency with their implementation. We'd be happy for you to try it out!
We also talked to the Astir team about using scvi-tools... stay tuned!
Hi,
noticed minor bugs in the docstrings examples of stereoscope and thought to push a fix real quick. Feel free to reject if not needed.
looks really great btw, looking forward to official release!