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

New user guide / tutorials #1127

Merged
merged 49 commits into from
Sep 11, 2021
Merged

New user guide / tutorials #1127

merged 49 commits into from
Sep 11, 2021

Conversation

adamgayoso
Copy link
Member

@adamgayoso adamgayoso commented Aug 31, 2021

Closes #1108

This is the initial skeleton for the new docs. We can merge this and then continue to make PRs for the rest of the models.

@codecov
Copy link

codecov bot commented Aug 31, 2021

Codecov Report

Merging #1127 (60886f8) into master (f7daf6b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1127   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files          93       93           
  Lines        7341     7341           
=======================================
  Hits         6627     6627           
  Misses        714      714           
Impacted Files Coverage Δ
scvi/model/_linear_scvi.py 100.00% <ø> (ø)
scvi/model/_scvi.py 100.00% <ø> (ø)
scvi/model/_totalvi.py 84.21% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7daf6b...60886f8. Read the comment docs.

@adamgayoso adamgayoso changed the title [WIP] New user guide New user guide / tutorials Sep 8, 2021
@watiss
Copy link
Contributor

watiss commented Sep 8, 2021

@adamgayoso Can you send a link to a draft version of the site generated from these changes?

@adamgayoso
Copy link
Member Author

@watiss https://scvi--1127.org.readthedocs.build/en/1127/user_guide/index.html

You can also find it in the checks of the PR, via the readthedocs check, after it completes.

Copy link
Contributor

@justjhong justjhong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a bunch of nits, but overall the structure of stuff looks nice. Also, if there is a way to have a hierarchical structure on the outline on the left sidebar, it would be nice to match it with the User Guide landing page.

docs/user_guide/background/variational_inference.rst Outdated Show resolved Hide resolved
docs/user_guide/background/variational_inference.rst Outdated Show resolved Hide resolved
docs/user_guide/background/variational_inference.rst Outdated Show resolved Hide resolved
docs/user_guide/background/variational_inference.rst Outdated Show resolved Hide resolved
docs/user_guide/models/cellassign.rst Outdated Show resolved Hide resolved
docs/user_guide/models/cellassign.rst Outdated Show resolved Hide resolved
where `predictions` stores :math:`\gamma_{nc}` for each cell :math:`n` and cell type :math:`c`.


Implementation details
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the number of variables here, I think a table like in the scVI guide would be helpful.

Thus, for each cell, we observe both RNA and protein information.
Additionally, a design matrix :math:`S` containing :math:`p` observed covariates, such as day, donor, etc, is an optional input.
While :math:`S` can include both categorical covariates and continuous covariates, in the following, we assume it contains only one
categorical covariate with :math:`B` categories, which represents the common case of having multiple batches of data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of categories was K in the scVI guide, should we be consistent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably yes

Generative process
========================

.. figure:: figures/totalvi_graphical_model.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would suggest moving this further below once you have defined the variables

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also noticed that this image doesnt include the global parameters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

going to leave this as is, we typically haven't included global params in these graphical models

docs/user_guide/index.rst Outdated Show resolved Hide resolved
* - :doc:`/user_guide/models/scvi`
- [Lopez18]_
- :class:`~scvi.model.SCVI`
- Dimensionality reduction, removal of unwanted variation, integration across replicates, donors, and technologies, differential expression, imputation, normalization of other cell- and sample-level confounding factors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd bullet point-ify this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the totalVI one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to figure this out, will post in the issue.




.. topic:: References:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also link the scvi-tools preprint?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that scvi-tools encompasses all the methods. Best to make the original method called scVI seem independent so others don't think including their methods in scvi-tools means that it's scVI.

docs/user_guide/models/cellassign.rst Outdated Show resolved Hide resolved
Comment on lines +87 to +89
* - Latent variable
- Description
- Code variable (if different)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The table header looks a bit funny because the last column name is too long relative to its width. Consider adjusting column widths or this column name

docs/user_guide/background/variational_inference.rst Outdated Show resolved Hide resolved
@adamgayoso adamgayoso merged commit 320a4bc into master Sep 11, 2021
@adamgayoso adamgayoso deleted the new_user_guide branch September 11, 2021 23:52
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.

Sklearn-style user guide
3 participants