Skip to content

Commit

Permalink
Merge pull request #834 from YosefLab/staging
Browse files Browse the repository at this point in the history
Staging for official release
  • Loading branch information
adamgayoso authored Oct 14, 2020
2 parents 19119c7 + 17fea50 commit 2f07ef4
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 1,624 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you find a model useful for your research, please consider citing the corresp
Package transition
------------------

``scvi`` is transitioning to ``scvi-tools``. If you're looking for ``scvi`` source code, please use the branch tags. ``scvi`` is still available via pypi and bioconda, but there will be no future releases past ``0.6.8``. A beta release of ``scvi-tools`` is currently available. We expect an official release by October 14th.
``scvi`` is now ``scvi-tools``. If you're looking for ``scvi`` source code, please use the branch tags. ``scvi`` is still available via pypi and bioconda, but there will be no future releases past ``0.6.8``. Documentation for ``scvi`` is available at the same documentation website.

.. _documentation: https://scvi-tools.org/
.. _`contributing guide`: https://scvi.readthedocs.io/en/stable/contributing.html
Expand Down
Binary file added docs/_static/tutorials/scanvi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,585 changes: 0 additions & 1,585 deletions docs/_static/tutorials/scanvi.svg

This file was deleted.

2 changes: 1 addition & 1 deletion docs/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Many have diverse contributions to the code. Here we highlight some specific pro
.. _Valentine Svensson: http://www.nxn.se/
.. _Achille Nazaret: https://nazaret.me/
.. _Galen Xing: https://galenxing.com/
.. _Yosef Lab: https://niryosef.wordpress.com/
.. _Yosef Lab: https://yoseflab.github.io/
14 changes: 7 additions & 7 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
Release notes
=============

0.7.0 (2020-X-XX)
0.7.0 (2020-10-14)
-----------------
scvi is now scvi-tools. Version 0.7 introduces many breaking changes. The best way to learn how to use scvi-tools is with our documentation and tutorials.

* New high-level API and data loading, please see tutorials and examples for usage.
* ``GeneExpressionDataset`` and associated classes have been removed.
* Built-in dataests now return ``AnnData`` objects.
* ``scvi`` now relies entirely on the AnnData_ format.
* ``scvi.models`` has been moved to ``scvi.core.modules``.
* `GeneExpressionDataset` and associated classes have been removed.
* Built-in datasets now return `AnnData` objects.
* `scvi-tools` now relies entirely on the AnnData_ format.
* `scvi.models` has been moved to `scvi.core.modules`.
* `Posterior` classes have been reduced to wrappers on `DataLoaders`
* ``scvi.inference`` has been split to ``scvi.core.data_loaders`` for `ScviDataLoader` classes and ``scvi.core.trainers`` for trainer classes.
* Usage of classes like ``Trainer`` and ``ScviDataLoader`` now require the ``AnnData`` data object as input.
* `scvi.inference` has been split to `scvi.core.data_loaders` for `ScviDataLoader` classes and `scvi.core.trainers` for trainer classes.
* Usage of classes like `Trainer` and `ScviDataLoader` now require the `AnnData` data object as input.


0.6.7 (2020-8-05)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ These models are able to simultaneously perform many downstream tasks such as le
* If you find a model useful for your research, please consider citing the corresponding publication.

.. important:: ``scvi`` is now ``scvi-tools``.
If you'd like to view documentation for ``scvi``, please change the documentation version using the menu at the bottom right.
If you'd like to view documentation for ``scvi``, please change the documentation version using the menu at the bottom right (versions <= 0.6.8).

.. raw:: html

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ This is a walkthrough of a totalVI-based analysis pipeline, from dimension reduc

Here we describe how to use scVI and scANVI for integrating data from Tabula Muris.

.. image:: ../_static/tutorials/scanvi.svg
.. image:: ../_static/tutorials/scanvi.png
:align: center
:height: 300px

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/notebooks
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages = [
{include = "scvi"},
]
readme = "README.rst"
version = "0.7.0-beta.0"
version = "0.7.0"

[tool.poetry.dependencies]
anndata = ">=0.7.4"
Expand Down
6 changes: 3 additions & 3 deletions scvi/data/_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ def _verify_and_correct_data_format(adata, data_registry):
for k in keys:
data = get_from_registry(adata, k)
if isspmatrix(data) and (data.getformat() != "csr"):
logger.debug("{} is csc_matrix. Overwriting to csr_matrix.".format(k))
data = data.tocsr()
_set_data_in_registry(adata, data, k)
logger.warning(
"Training will be faster when sparse matrix is formatted as CSR. It is safe to cast before model initialization."
)
elif isinstance(data, np.ndarray) and (data.flags["C_CONTIGUOUS"] is False):
logger.debug(
"{} is not C_CONTIGUOUS. Overwriting to C_CONTIGUOUS.".format(k)
Expand Down
23 changes: 0 additions & 23 deletions tests/dataset/test_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
)
from scvi import _CONSTANTS
from scvi.data._anndata import get_from_registry
from scipy.sparse import csc_matrix


def test_transfer_anndata_setup():
Expand Down Expand Up @@ -124,28 +123,6 @@ def test_data_format():
get_from_registry(adata, _CONSTANTS.PROTEIN_EXP_KEY),
)

# if data is sparse, check that after setup_anndata, data is csr_matrix
adata = synthetic_iid(run_setup_anndata=False)
adata.X = csc_matrix(adata.X)
adata.obsm["protein_expression"] = csc_matrix(adata.obsm["protein_expression"])
old_x = adata.X
old_pro = adata.obsm["protein_expression"]
setup_anndata(adata, protein_expression_obsm_key="protein_expression")

assert adata.X.getformat() == "csr"
assert adata.obsm["protein_expression"].getformat() == "csr"

assert np.array_equal(old_x.toarray(), adata.X.toarray())
assert np.array_equal(old_pro.toarray(), adata.obsm["protein_expression"].toarray())

assert np.array_equal(
adata.X.toarray(), get_from_registry(adata, _CONSTANTS.X_KEY).toarray()
)
assert np.array_equal(
adata.obsm["protein_expression"].toarray(),
get_from_registry(adata, _CONSTANTS.PROTEIN_EXP_KEY).toarray(),
)

# if obsm is dataframe, make it C_CONTIGUOUS if it isnt
adata = synthetic_iid()
pe = np.asfortranarray(adata.obsm["protein_expression"])
Expand Down

0 comments on commit 2f07ef4

Please sign in to comment.