Skip to content

Commit

Permalink
Release 0.2.5 (#934)
Browse files Browse the repository at this point in the history
* Add .editorconfig (#529)

* Add TestCleanObsNames (#530)

Add test class for `scvelo/core/_anndata.py::clean_obs_names`.

* Refactor `clean_obs_names` (#532)

* Rename input arguments from `data` to `adata`, `copy` to `inplace`,
`ID_length` to `id_length`, `base` to `alphabet`.

* Rename variables to something more meaningful and use snake as well as
lower case, consistently.

* Make use of Pandas functionality.

* Use regex expression.

* Move unit tests to `tests/` (#535)

* Move `scvelo/core/tests` to `tests/core`

Moves unit tests `scvelo/core/tests` to `tests/core`. This will, for
example, prevent installation files becoming large when including data
or ground truth figures.

* Add `tests/__init__.py`

Makes `tests/` a package. This is needed to e.g. import from `tests/core`
later on.

* Update pytest.ini

Remove `scvelo` from testpaths.

* Fix and refactor `filter_genes` (#537)

* Add `multiply`

Adds function to calculate the element-wise product of two arrays or an
array and a sparse matrix.

* Fix and refactor `filter_genes`

The original implementation fails when `adata.layers['unspliced']` is
sparse but `adata.layers['spliced']` dense. The element-wise
multiplication is now performend using `multiply`.

* Add column generation for adata.obs/.var (#544)

* Fix and update docstrings

Update docstrings to follow codebase style.

* Add option to add columns to adata.obs

* Adds `obs_col_names`, `min_obs_cols`, `max_obs_cols` to composite
strategy `get_adata`. Using `obs_col_names`, the column names can be set
manually, the other arguments allow setting the minimum and maximum
number of columns generated.

* Updates unit tests to encounter for and test changes.

* Add option to add columns to adata.var

* Adds `var_col_names`, `min_var_cols`, `max_var_cols` to composite
strategy `get_adata`. Using `var_col_names`, the column names can be set
manually, the other arguments allow setting the minimum and maximum
number of columns generated.

* Updates unit tests to encounter for and test changes.

* Add unit tests for `cleanup` (#548)

* Add method `_subset_columns` to `TestBase`

Adds method to sample from column names in `adata.obs` and `adata.var`.

* Add `TestCleanup`

Adds test class to unit test `scvelo/core/_anndata.py::cleanup`.

* Fix TestCleanup::test_cleanup_some (#550)

* Refactor `cleanup` (#552)

* Rename argument `data` to `adata`

* Rename argument `copy` to `inplace`

* Update type hint in `cleanup`

* Rename variables

Rename variables to use more informative names.

* Add `TestGetInitialSize` (#554)

* Add `TestGetSize` (#556)

* Refactor module import (#560)

* Delete `pl.py`, `pp.py` and `tl.py`.
* Update `__init__.py` to no longer rely on `pl.py`, `pp.py` and
`tl.py`.

* Update `get_modality` (#567)

* Update `get_modality`

Support passing `None` for argument `modality`. In this case, `adata.X`
is returned.

* Add `TestGetModality::test_modality_equals_none`

Add unit test to check that correct modality is extracted if `None` is
passed for `modality` in `get_modality`.

* Refactor and generalize `get_size` (#569)

* Rename `layer` to `modality`

Rename argument `layer` to `modality` in `get_size`. This unifies naming
convention for the argument across the code base and prepares
generalizing `get_size` to arbitrary modalities.

* Generalize `get_size` to arbitrary modalities

This allows calculating the size per observation for any modality, from
`adata.X`, `adata.layers` or `adata.obsm`.

* Update docstrings

* Add TestObsDf (#579)

Unit tests `scvelo.core._anndata.py::obs_df`.

* Add TestVarDf (#583)

Unit tests `scvelo.core._anndata.py::var_df`.

* Update TestObsDf (#585)

The addition assert statement checks that the index of the returned data
frame is correct.

* Fix typo in default layer names (#587)

* Add `TestShowProportions` (#589)

Unit tests `scvelo.core._anndata.py`::show_proportions`.

* Add `TestSetInitialSize` (#591)

* Reduce maximum number of obs/vars (#593)

Reduce maximum size of generated AnnData objects in some tests.

* Update ci.yml (#546)

* Run tests on ubuntu-latest using both Python 3.7 and 3.8.

* Increase verbosity of pytest.

* Add timeout to tests.

* Update `.gitignore` [ci skip] (#595)

Add files and directories created by `pytest-cov`.

* Update `_anndata.py` (#596)

Change order of default layers to match temporal ordering in biological
process.

* Fix TestShowProportions (#598)

In TestShowProportions::test_layers_not_specified, layers should not be
specified but `layers=None` passed instead.

* Update `TestCleanObsNames` (#600)

Check that `inplace` argument is working correctly.

* Test modality passed as string (#602)

Add unit tests to `TestMakeDense` and
`TestMakeSparse` when `modality` is passed as a string.

* Fix `test_not_existing_modality` (#605)

Generate layer names with at least two characters to exclude the case
`layer='X'`.

* Refactor unit test for `l2_norm` (#607)

Converts unit test to a test class. 2D arrays and sparse matrices are
now generated as well to increase coverage to 100%.

* Add `varm` to AnnData strategy (#609)

* Add `varm` to AnnData strategy

Strategy can now also add entries to `adata.varm`. This is tested by
extending the existing unit tests.

* Set `max_obs` and `max_vars` to `5`

This is an attempt to make the unit tests not in the CI on GitHub due to
a time out error by Hypothesis.

* Add `TestMerge` (#611)

Add test class to unit test `scvelo/core/_anndata.py::merge`.

* Update `TestVarDf` (#615)

Reduce maximum size of generated AnnData.

* Catch error in steady state calculation (#614)

* Fix steady state calculation

Raise ValueError when `beta` and `gamma` are not positive.

* Update `TestSplicingDynamics`

Add unit test to verify ValueError is raised when calculating steady
states with inadmissible parameter values.

* Fix AnnData strategy (#616)

Reset `min_varm` and `max_varm` if `varm_keys` is specified.

* Update `TestSplicingDynamics` (#618)

Add unit tests to
* test 2d time points,
* verify correct initial states are set/returned,
* verify correct steady states are returned.

* Fix `TestCleanup` (#620)

* Update `DynamicsBase` (#622)

Remove redundant return statements to increase test coverage. The
abstract methods cannot be tested.

* Add `TestGetDf` (#624)

Unit tests for `scvelo/core/_anndata.py::get_df`.

* Add module `datasets` (#636)

* Add module `datasets`

The file `datasets.py` is moved to the module and renamed to
`_datasets.py`.

* Deprecate `pancreatic_endocrinogenesis`

* Add `datasets/_simulate.py`

Adds file `datasets/_simulate.py` and moves `simulation`, `unspliced`,
`spliced` and `vectorize` from `datasets/_datasets.py` to the new file.

* Cleanup `datasets/_datasets.py` (#638)

* Sort functions alphabetically

* Add TODO

* Fix `DeprecationWarning` [ci skip] (#640)

* Add argument `file_path` (#642)

Allow saving/reading datasets to/from custom paths.

* Fix gillespie simulation (#644)

* Add unit tests for `scvelo.datasets` (#646)

* Add `test_datasets.py`

Add unit tests for datasets accessible through scvelo.

* Add `test_simulate.py`

Add unit tests for `scvelo.datasets.simulation`.

* Add new datasets to `datasets/__init__.py` (#677)

* Fix `csr_vcorrcoef` (#679)

* Fix `csr_vcorrcoef`

Fixes calculation of Pearson's correlation in `csr_vcorrcoef`.

* Add `tests/preprocessing`

* Add `TestCsrVcorrcoef`

Test class for unit testing `csr_vcorrcoef`.

* Update Python versions in CI (#680)

* Run linting check in Python 3.8

* Run unit tests in Python 3.9

* Fix and unit test `get_mean_var` (#698)

* Fix passing `perc` not affecting result

Up to now, passing `perc` does not affect the output as only `data` but
not `X` is manipulated.

* Fix different size parameters

Mean and variance calculation use different size parameters instead of
one and the same.

* Fix sparse input with `ignore_zeros` or nan values

Mean and variance cannot be calculated due to a shape mismatch.

* Add `TestGetMeanVar`

Unit test `test_get_mean_var`.

* Add unit tests for `preprocessing/utils.py` (#700)

* Add `TestCheckIfValidDtype`

Unit tests `check_if_valid_dtype`.

* Add `TestFilter`

Unit tests `_filter`.

* Add `TestLog1p`

Unit tests `log1p`.

* Add `TestMaterializeAsNdarray`

Unit tests `materialize_as_ndarray`.

* Add `TestNotYetNormalized`

Unit tests `not_yet_normalized`.

* Add `TestFilterGenes`

Unit tests `filter_genes`.

* Add `TestCountsPerCellQuantile`

* Add `TestNormalizePerCell`

* Add `tests/_data/`

Add subsetted datasets to use in unit tests.

* Add `confest.py`

Add file to declare fixture for entire testing directory.

* Add `TestFilterGenesDispersion`

Unit test `filter_genes_dispersion`.

* Add `TestFilterAndNormalize`

Unit test `filter_and_normalize`.

* Add `TestRecipeVelocity`

Unit test `recipe_velocity`.

* Update AnnData generation for testing (#785)

* Update `test_base.py::get_adata`

Exclude `"X"` as key of `.layers`, `.obsm` and `.varm`.

* Update `test_base.py::TestAdataGeneration`

Check that `"X"` is not a key in `.layers`, `.obsm`, `.varm`.

* Update `test_anndata.py`

Remove redundant statements in `TestCleanup::test_cleanup_some` and
`TestSetInitialSize::test_added_columns` according to changes in AnnData
generation for tests.

* Add `pull_request_template.md` [ci skip] (#787)

Add template for pull requests.

* Speed up CI (#789)

* Update `ci.yml`

Remove testing of dataset download from job `test`. Instead, a new job
`test-dataset-downloads` is added.

* Update `ci.yml`

Print execution time of 25 slowest tests.

* Update `test_datasets.py`

Skip `test_datasets.py::TestDataSets` if Python version is not 3.8 and
OS is not Linux.

* Refactor `neighbors` (#795)

* Split body of `neighbors` over several functions

Split body of `neighbors` over several function for easier unit testing.

* Add type hints to arguments of `neighbors`

* Fix typo in docstrings

* Fix `_get_rep` (#797)

The variable `rep` is referenced before assignment if the if-else case
is not entered. This is fixed by adding a final `else` case. In the
following, only the variable `rep` is used.

* Refactor testing in CI (#801)

* Update `requirements-dev.txt`

Add `pytest-cov` to the installed libraries.

* Update `ci.yml`

Update how dependencies are installed in the `test` job.

* Increase Hypothesis deadline in CI (#804)

To prevent test failure due to exceeding deadlines, the default deadline
of Hypothesis is increased to 500 milliseconds when running the tests
in the CI.

* Unit test `neighbors.py` (#799)

* Add `test_neighbors.py`

Add file to host unit tests for `preprocessing/neighbors.py`.

* Add `TestGetNeighs`

* Add `TestGetNNeighs`

* Add `TestGetDuplicateCells`

* Add `TestRemoveDuplicateCells`

* Add preprocessed adata for testing

Add preprocessed versions of `dentategyrus_50obs.h5ad`,
`dentategyurs_100obs.h5ad`, `pancreas_50obs.h5ad`, and
`pancreas_100obs.h5ad`.

* Add fixtures for preprocessed datasets

Add fixtures to use preprocessed datasets in unit tests.

* Add fixture `adata`

The fixture `adata` is used to easily load raw or preprocessed datasets
in unit tests. This allows running one and the same unit test on all
available datasets.

* Add `TestSelectConnectivities`

Add unit tests for `select_connectivities`.

* Add `TestSelectDistances`

Add unit tests for `select_distances`.

* Add `TestSetDiagonal`

Add unit tests for `set_diagonal`.

* Add `TestNeighborsToBeRecomputed`

Add unit tests for `neighbors_to_be_recomputed`.

* Add `TestVerifyNeighbors`

Add unit tests for `verify_neighbors`.

* Add `TestGetConnectivities` and accompanying files

Add unit tests for `get_connectivities` and saved CSR matrices to verify
results.

* Add `TestGetCsrFromIndices`

Add unit tests for `get_csr_from_indices`.

* Add `TestComputeConnectivitiesUmap`

Add unit tests for `compute_connectivities_umap`

* Add `TestGetRep`

Add unit tests for `_get_rep`.

* Add `TestSetPCA`

Add unit tests for `_set_pca`.

* Add `TestGetHnswNeighbors`

Add unit tests for `_get_hnsw_neighbors` and corresponding CSR matrices
saved using `.npz` format.

* Add `TestGetScanpyNeighbors`

Add unit tests for `_get_scanpy_neighbors` and corresponding CSR
matrices saved using `.npz` format.

* Add `TestGetSklearnNeighbors`

Add unit tests for `_get_sklearn_neighbors` and corresponding CSR
matrices saved using `.npz` format.

* Add `TestNeighbors`

Adds unit tests for the function `neighbors`.

* Unit test `moments.py` (#806)

* Add `test_moments.py`

Add file to host unit tests of functions in `moments.py`.

* Add `TestGetMoments`

Add unit tests for `get_moments` and corresponding ground truth moments
saved using `.npy` format.

* Add `TestSecondOrderMomentsU`

Add unit tests for `second_order_moments_u`.

* Add `TestSecondOrderMoments`

Add unit tests for `second_order_moments` and corresponding moments
saved using `.npy` format.

* Add `TestMagicImpute`

Add unit tests for `magic_imput` and corresponding imputed data saved
using `.npy` format.

* Add `TestMoments`

Add unit tests for `moments` and corresponding first order moments saved
using `.npy` format.

* Update `requirements-dev.txt`

Add `magic-impute` to run unit tests on CI.

* Update `docs/` [ci skip] (#810)

Recommend `kb count` instead of `loompy fromfq`.

* Update `requirements.txt` (#838)

Excludes `pandas==1.4.0` to prevent failure as reported in #811.

* Fix `optimization.py::get_weight` (#839)

Fix `scvelo.tools.optimization.py::get_weight` to work correctly when
`perc` is numeric.

* Fix inference with `fit_scaling=False` (#848)

* Update `DynamicsRecovery`
Fix parameter inference to not fit scaling when `fit_scaling=False`.

* Update `pre-commit` setup (#855)

* Update `requirements-dev.txt`

Update versions of `black` and `isort`.

* Update `.pre-commit-config.yaml`

Update repo paths and versions.

* Run `black`

Run code formatting with latest version of `black`.

* Add argument `file_path` (#853)

Adds argument `file_path` to datasets added in `scvelo=0.2.4.`.

* Update `CONTRIBUTING.rst` [ci skip] (#911)

Details workaround to issue where `pip install -e '.[dev]'` leads to
errors on Windows.

* Fix saving stream embedding figure (#900)

* Fix missing write_key for embedding stream plot.

* Set save instead of wire_key when saving embedding stream plot.

* Fix `clean_obs_names` (#921)

* Fix bug with clean_obs_names

Switched implementation to use the previously ignored id_length
parameter. New approach finds a substring of length id_length
where each of the letters are in the alphabet

* Extend tests to cover more cases for clean_obs_names

* Fix Pandas display precision (#907)

* Update `core/_anndata.py`

Update how Pandas displayed precision is set.

* Update `core/_anndata.py`

Add TODO comment to add a unit test to test the `precision` argument.

* Fix documentation issues [ci skip] (#929)

* Update `CONTRIBUTING.rst` [ci skip]

Update branch name convention.

* Update `docs/requirements.txt` [ci skip]

Pin `Jinja` version.

* Update `docs/source/conf.py` [ci skip]

Update `add_stylesheet` with `add_css_file`. The former is deprecated.

* Fix typo in `index.rst` [ci skip]

* Fix link to bone marrow dataset [ci skip]

* Fix `velocity_embedding` docs [ci skip]

* Add key contributors section [ci skip] (#930)

* Add `_key_contributors.rst` [ci skip]

Add file with key contributors and their roles.

* Show key contributors on index page [ci skip]

* Fix deprecation of keyword argument `copy` (#932)

* Add `core/_utils.py`

* Add `core/_utils.py::deprecated_arg_names`

Modify wrapper from Scanpy to replace old with new keyword argument.
The wrapper is modified s.t. `copy=True` corresponds to `inplace=False`,
and vice versa.

* Make `deprecated_arg_names` importable from `core`

* Update import of `deprecated_arg_names`

Import local version instead of the Scanpy version s.t. the keyword
argument `copy` is handled correctly.

* Update `CONTRIBUTING.rst` [ci skip] (#938)

Remove reference to `develop` branch as it will be removed in the next
release.

* Fix linear regression unit tests (#940)

* Fix `TestLinearRegression::test_perfect_fit`

Replace `array` strategy to generate `x` with `sampled_from`.

* Fix `TestLinearRegression::test_perfect_fit_2d`

Replace `array` strategy to generate `x` with `sampled_from`.

* Update `test_neighbors.py` (#941)

Remove failing and non-essential unit tests.
See #922.

* Update release notes [ci skip] (#945)

* Remove trailing white spaces

* Add notes for `0.2.5` release

Co-authored-by: Isaac Virshup <ivirshup@gmail.com>
Co-authored-by: Oisin-M <60450429+Oisin-M@users.noreply.github.com>
Co-authored-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 14, 2022
1 parent 1805ab4 commit ce52f58
Show file tree
Hide file tree
Showing 347 changed files with 8,620 additions and 1,003 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 88

[*.py]
indent_size = 4
indent_style = space
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Changes
<!-- Please remove section if this PR does change an existing feature -->

* ...

## Bug fixes
<!-- Please give section if this PR does not fix any bugs -->

* ...

## New
<!-- Please give section if this PR does not implement a new feature -->

* ...

## Related issues
<!-- Please list related issues. If none exist, open one and reference it here. -->

Closes #
30 changes: 24 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.7
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -42,19 +42,37 @@ jobs:
# Run unit tests
test:
needs: linting
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.7]
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e '.[dev]'
- name: Unit tests
timeout-minutes: 60
run: python -m pytest --durations=25 --ignore=tests/datasets/test_datasets.py --hypothesis-profile=ci --cov=scvelo -vv

test-dataset-downloads:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -e .
pip install hypothesis pytest pytest-cov
- name: Unit tests
run: python -m pytest --cov=scvelo
- name: Test dataset downloads
timeout-minutes: 60
run: python -m pytest tests/datasets/test_datasets.py -vv
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ docs/source/scvelo*

# Files generated by unit tests
.hypothesis/
.coverage*
htmlcov/
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.7.0
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
Expand Down
28 changes: 23 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ You can now clone your fork of scVelo and install the development mode
git clone https://github.com/YOUR-USER-NAME/scvelo.git
cd scvelo
git checkout --track origin/develop
Unix Systems
^^^^^^^^^^^^

The installation can be completed with

.. code:: bash
pip install -e '.[dev]'
The last line can, alternatively, be replaced by
Expand All @@ -31,16 +39,26 @@ The last line can, alternatively, be replaced by
pip install -r requirements-dev.txt
Finally, to make sure your code follows our code style guideline, install pre-commit:
Windows
^^^^^^^

If running Windows, `hsnwlib` needs to be installed via `conda` and the installation with pip slightly adjusted:

.. code:: bash
pre-commit install
conda install -c conda-forge hnswlib
pip install -e .[dev]
Coding style
^^^^^^^^^^^^

Finally, to make sure your code follows our code style guideline, install pre-commit:

.. code:: bash
pre-commit install
Our code follows `black` and `flake8` coding style. Code formatting (`black`, `isort`) is automated through pre-commit hooks. In addition, we require that

- functions are fully type-annotated.
Expand Down Expand Up @@ -69,9 +87,9 @@ The docstrings of scVelo largely follow the `numpy`-style. New docstrings should
Submitting pull requests
^^^^^^^^^^^^^^^^^^^^^^^^

New features and bug fixes are added to the code base through a pull request (PR). To implement a feature or bug fix, create a branch from `develop`. For hotfixes use `master` as base. The existence of bugs suggests insufficient test coverage. As such, bug fixes should, ideally, include a unit test or extend an existing one. Please ensure that
New features and bug fixes are added to the code base through a pull request (PR). To implement a feature or bug fix, create a branch from `master`. The existence of bugs suggests insufficient test coverage. As such, bug fixes should, ideally, include a unit test or extend an existing one. Please ensure that

- branch names have the prefix `feat/`, `bug/` or `hotfix/`.
- branch names have the prefix `feat/` or `fix/`.
- your code follows the project conventions.
- newly added functions are unit tested.
- all tests pass locally.
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ typing_extensions
importlib_metadata
sphinx_rtd_theme>=0.3
sphinx_autodoc_typehints<=1.6
Jinja2<3.1

# converting notebooks to html
ipykernel
sphinx>=1.7,<4.0
nbsphinx>=0.7,<0.8.7
nbsphinx>=0.7,<0.8.7
7 changes: 7 additions & 0 deletions docs/source/_key_contributors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. sidebar:: Key Contributors

* `Philipp Weiler`_: lead developer since 2021, maintainer
* `Volker Bergen`_: lead developer 2018-2021, initial conception

.. _Philipp Weiler: https://twitter.com/PhilippWeiler7
.. _Volker Bergen: https://twitter.com/volkerbergen
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@


def setup(app):
app.add_stylesheet("custom.css")
app.add_css_file("custom.css")


# -- Options for other output ------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Once you are set, the following tutorials go straight into analysis of RNA veloc
latent time, driver identification and many more.

First of all, the input data for scVelo are two count matrices of pre-mature (unspliced) and mature (spliced) abundances,
which can be obtained from standard sequencing protocols, using the `velocyto`_ or `loompy/kallisto`_
which can be obtained from standard sequencing protocols, using the `velocyto`_ or `kallisto`_
counting pipeline.

scVelo workflow at a glance
Expand Down Expand Up @@ -89,4 +89,4 @@ For every tool module there is a plotting counterpart, which allows you to exami


.. _`velocyto`: http://velocyto.org/velocyto.py/tutorial/cli.html
.. _`loompy/kallisto`: https://linnarssonlab.org/loompy/kallisto/index.html
.. _`kallisto`: https://www.kallistobus.tools/tutorials/kb_velocity/python/kb_velocity/#generate-rna-velocity-count-matrices
8 changes: 5 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ scVelo - RNA velocity generalized through dynamical modeling
:width: 300px
:align: left

.. include:: _key_contributors.rst

**scVelo** is a scalable toolkit for RNA velocity analysis in single cells, based on
`Bergen et al. (Nature Biotech, 2020) <https://doi.org/10.1038/s41587-020-0591-3>`_.

Expand All @@ -16,7 +18,7 @@ scVelo generalizes the concept of RNA velocity
by relaxing previously made assumptions with a stochastic and a dynamical model that solves the full
transcriptional dynamics. It thereby adapts RNA velocity to widely varying specifications such as non-stationary populations.

scVelo is compatible with scanpy_ and hosts efficient implementations of all RNA velocity models.
scVelo is compatible with Scanpy_ and hosts efficient implementations of all RNA velocity models.

scVelo's key applications
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -104,7 +106,7 @@ For further information visit `scvelo.org <https://scvelo.org>`_.
.. |travis| image:: https://travis-ci.org/theislab/scvelo.svg?branch=master
:target: https://travis-ci.org/theislab/scvelo

.. _scanpy: https://scanpy.readthedocs.io
.. _Scanpy: https://scanpy.readthedocs.io

.. _calendly: https://calendly.com/scvelo

Expand All @@ -123,4 +125,4 @@ For further information visit `scvelo.org <https://scvelo.org>`_.
.. |dim| raw:: html

<span class="__dimensions_badge_embed__" data-id="pub.1129830274" data-style="small_rectangle"></span>
<script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>
<script async src="https://badge.dimensions.ai/badge.js" charset="utf-8"></script>
26 changes: 23 additions & 3 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,33 @@
Release Notes
=============

Version 0.2.5 :small:`Oct 14, 2022`
-----------------------------------

Changes:

- Catch non-positive parameter values and raise a `ValueError` if necessary (`PR 614 <https://github.com/theislab/scvelo/pull/614>`_).
- `get_mean_var` uses the same size parameter for mean and variance (`PR 698 <https://github.com/theislab/scvelo/pull/698>`_).

Bugfixes:

- `filter_genes` now works with `adata.layers['unspliced']` being sparse and `adata.layers['spliced']` dense (`PR 537 <https://github.com/theislab/scvelo/pull/537>`_).
- `show_proportions` actually considers the layer `"ambiguous"` if present (`PR 587 <https://github.com/theislab/scvelo/pull/587>`_).
- Fix calculation of Pearson's correlation in `csr_vcorrcoef` (`PR 679 <https://github.com/theislab/scvelo/pull/679>`_).
- Fix `get_mean_var` to work with sparse input and `ignore_zeros=True` (`PR 698 <https://github.com/theislab/scvelo/pull/698>`_).
- Fix bug in neighbor calculation (`PR 797 <https://github.com/theislab/scvelo/pull/797>`_).
- Fix `optimization.py::get_weight` to work with numeric, non-integer values (`PR 839 <https://github.com/theislab/scvelo/pull/839>`_).
- Fix inference with `fit_scaling=False` (`PR 848 <https://github.com/theislab/scvelo/pull/848>`_).
- Fix saving of velocity embedding stream (`PR 900 <https://github.com/theislab/scvelo/pull/900>`_).
- Fix Pandas' display precison when passed to `get_df` (`PR 907 <https://github.com/theislab/scvelo/pull/907>`_).

Version 0.2.4 :small:`Aug 26, 2021`
-----------------------------------

Perspectives:

- Landing page and two notebooks accompanying the perspectives manuscript at MSB.
- New datasets: Gastrulation, bone marrow, and PBMCs.
- Landing page and two notebooks accompanying the perspectives manuscript at MSB.
- New datasets: Gastrulation, bone marrow, and PBMCs.

New capabilities:

Expand All @@ -25,7 +45,7 @@ New capabilities:
Bugfixes:

- Pinned `sphinx<4.0` and `nbsphinx<0.8.7`.
- Fix IPython import at CLI.
- Fix IPython import at CLI.


Version 0.2.3 :small:`Feb 13, 2021`
Expand Down
4 changes: 1 addition & 3 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[pytest]
python_files = test_*.py
testpaths =
tests
scvelo
testpaths = tests/
xfail_strict = true
6 changes: 4 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

-e .

black==20.8b1
black==22.3.0
hnswlib
hypothesis
flake8==3.8.4
isort==5.7.0
isort==5.10.1
louvain
magic-impute
pre-commit>=2.9.0
pybind11
pytest>=6.2.2
pytest-cov
python-igraph
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ umap-learn>=0.3.10 # removed numba warnings (v0.3.10)
numba>=0.41.0
numpy>=1.17 # extension/speedup in .nan_to_num, .exp (v1.17)
scipy>=1.4.1 # introduced PCA sparsity support (v1.4)
pandas>=0.23 # merging/sorting extensions (v0.23)
pandas>=0.23, !=1.4.0 # merging/sorting extensions (v0.23)
scikit-learn>=0.21.2 # bugfix in .utils.sparsefuncs (v0.21.2)
matplotlib>=3.3.0 # normalize in pie (v3.3.0)
matplotlib>=3.3.0 # normalize in pie (v3.3.0)
11 changes: 10 additions & 1 deletion scvelo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
from anndata import AnnData
from scanpy import read, read_loom

from scvelo import datasets, logging, pl, pp, settings, tl, utils
from scvelo import datasets, logging
from scvelo import plotting as pl
from scvelo import preprocessing as pp
from scvelo import settings
from scvelo import tools as tl
from scvelo import utils
from scvelo.core import get_df
from scvelo.plotting.gridspec import GridSpec
from scvelo.preprocessing.neighbors import Neighbors
Expand All @@ -13,6 +18,10 @@
from scvelo.tools.velocity import Velocity
from scvelo.tools.velocity_graph import VelocityGraph

import sys # isort:skip

sys.modules.update({f"{__name__}.{m}": globals()[m] for m in ["tl", "pp", "pl"]})

try:
from setuptools_scm import get_version

Expand Down
5 changes: 4 additions & 1 deletion scvelo/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
set_modality,
show_proportions,
)
from ._arithmetic import clipped_log, invert, prod_sum, sum
from ._arithmetic import clipped_log, invert, multiply, prod_sum, sum
from ._linear_models import LinearRegression
from ._metrics import l2_norm
from ._models import SplicingDynamics
from ._parallelize import get_n_jobs, parallelize
from ._utils import deprecated_arg_names

__all__ = [
"clean_obs_names",
"cleanup",
"clipped_log",
"deprecated_arg_names",
"get_df",
"get_initial_size",
"get_modality",
Expand All @@ -33,6 +35,7 @@
"make_dense",
"make_sparse",
"merge",
"multiply",
"parallelize",
"prod_sum",
"set_initial_size",
Expand Down
Loading

0 comments on commit ce52f58

Please sign in to comment.