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

v1.3.0 #125

Merged
merged 10 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.1
current_version = 1.3.0
commit = True
tag = True
files = pyproject.toml liana/__init__.py
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,32 @@ We welcome suggestions, ideas, and contributions! Please use do not hesitate to
## Vignettes
A set of extensive vignettes can be found in the [LIANA+ documentation](https://liana-py.readthedocs.io/en/latest/).

## Decision Tree

C1: Does the data contain spatial coordinates?
├── Yes
│ ├── Q: Bivariate or unsupervised, multi-variate, and multi-view analysis?
│ ├── Bivariate:
│ │ ├── Q: Are you interested in identifying the subregions of interactions (i.e., local interactions)?
│ │ ├── Yes -> Check the [**Local** Bivariate Metrics](https://liana-py.readthedocs.io/en/latest/notebooks/bivariate.html#Bivariate-Ligand-Receptor-Relationships)
│ │ ├── No -> Check the [**Global** Bivariate Metrics](https://liana-py.readthedocs.io/en/latest/notebooks/bivariate.html#Bivariate-Ligand-Receptor-Relationships)
│ └── Unsupervised: [Multi-view learning](https://liana-py.readthedocs.io/en/latest/notebooks/misty.html)
└── No
├── Q: Are you interested in Comparing CCC across Samples?
├── Yes
│ ├── Q: Are you interested in a specific contrast?
│ │ ├── Yes -> [Differential Contrasts and Downstream Signalling](https://liana-py.readthedocs.io/en/latest/notebooks/targeted.html)
│ │ └── No -> Unsupervised Cross-conditional LR inference with [MOFA+](https://liana-py.readthedocs.io/en/latest/notebooks/mofatalk.html) or [Tensor-cell2cell](https://liana-py.readthedocs.io/en/latest/notebooks/liana_c2c.html)
└── No -> [Steady-state Ligand-Receptor inference](https://liana-py.readthedocs.io/en/latest/notebooks/basic_usage.html)

Is your data Multi-modal?
├── Spatial: [Integrating Multi-Modal Spatially-Resolved Technologies](https://liana-py.readthedocs.io/en/latest/notebooks/sma.html)
└── Non-Spatial: [Integrating Multi-Modal Single-Cell Technologies](https://liana-py.readthedocs.io/en/latest/notebooks/sc_multi.html)


## API
For further information please check LIANA's [API documentation](https://liana-py.readthedocs.io/en/latest/api.html).


## Cite LIANA+:

Dimitrov D., Schäfer P.S.L, Farr E., Rodriguez Mier P., Lobentanzer S., Dugourd A., Tanevski J., Ramirez Flores R.O. and Saez-Rodriguez J. 2023 LIANA+: an all-in-one cell-cell communication framework. BioRxiv. https://www.biorxiv.org/content/10.1101/2023.08.19.553863v1
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.wy-side-nav-search a img.logo {
height: 200px;
height: 150px;
}

.wy-side-nav-search {
Expand Down
Binary file added docs/source/_static/metalinks_score.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ Intracellular

liana.method.find_causalnet
liana.method.build_prior_network
liana.method.estimate_metalinks
16 changes: 11 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@
# -- Options for HTML output
master_doc = 'index'

html_theme = 'sphinx_rtd_theme'
html_theme = 'furo'
html_static_path = ["_static"]
html_theme_options = dict(
logo_only=True,
display_version=True,
)
html_theme_options = {
"light_css_variables": {
"color-brand-primary": "#2980B9",
"color-brand-content": "#2980B9",
},
"dark_css_variables": {
"color-brand-primary": "#2980B9",
"color-brand-content": "#2980B9",
},
}
html_context = dict(
display_github=True,
github_user='saezlab',
Expand Down
136 changes: 136 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
Contributing Guide
==================

Scanpy provides extensive developer documentation <https://scanpy.readthedocs.io/en/stable/dev/index.html>_, most of which applies to this repo, too. This document will not reproduce the entire content from there. Instead, it aims at summarizing the most important information to get you started on contributing.

We assume that you are already familiar with git and with making pull requests on GitHub. If not, please refer to the developer documentation <https://scanpy.readthedocs.io/en/stable/dev/index.html>_.

Installing Dev Dependencies
----------------------------

In addition to the packages needed to *use* this package, you need additional Python packages to *run tests* and *build the documentation*. It's easy to install them using pip:

.. code-block:: bash

git clone https://github.com/saezlab/liana-py
cd liana
pip install -e ".[full]"

Code-style
----------

This package uses pre-commit <https://pre-commit.com/>_ to enforce consistent code-styles. On every commit, pre-commit checks will either automatically fix issues with the code or raise an error message.

To enable pre-commit locally, simply run

.. code-block:: bash

pre-commit install

Most editors also offer an *autoformat on save* feature. Consider enabling this option for black <https://black.readthedocs.io/en/stable/integrations/editors.html>_ and prettier <https://prettier.io/docs/en/editors.html>_.

Writing Tests
-------------

This package uses pytest <https://docs.pytest.org/en/8.2.x/>_ for automated testing. Please write tests <https://scanpy.readthedocs.io/en/latest/dev/testing.html#writing-tests>_ for every function added to the package.

Most IDEs integrate with pytest and provide a GUI to run tests. Alternatively, you can run all tests from the command line by executing

.. code-block:: bash

pytest

in the root of the repository. Continuous integration will automatically run the tests on all pull requests and upon merge into the main branch.

Publishing a Release
--------------------

Updating the Version Number
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Before making a release, you need to update the version number. Please adhere to Semantic Versioning <https://semver.org/>_, in brief

Given a version number MAJOR.MINOR.PATCH, increment the:

1. MAJOR version when you make incompatible API changes,
2. MINOR version when you add functionality in a backwards compatible manner, and
3. PATCH version when you make backwards compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

We use bump2version <https://pypi.org/project/bump2version/>_ to automatically update the version number in all places and automatically create a git tag. Run one of the following commands in the root of the repository

.. code-block:: bash

bump2version patch
bump2version minor
bump2version major

Once you are done, run

.. code-block:: bash

git push --tags

to publish the created tag on GitHub.

Building and Publishing the Package on PyPI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Python packages are not distributed as source code, but as *distributions*. The most common distribution format is the so-called *wheel*. To build a *wheel*, run

.. code-block:: bash

python -m build

This command creates a *source archive* and a *wheel*, which are required for publishing your package to PyPI <https://pypi.org/project/liana/>_. These files are created directly in the root of the repository.

Before uploading them to PyPI <https://pypi.org/project/liana/>_, you can check that your *distribution* is valid by running:

.. code-block:: bash

twine check dist/*

and finally publishing it with:

.. code-block:: bash

twine upload dist/*

Provide your username and password when requested and then go check out your package on PyPI <https://pypi.org/project/liana/>_!

For more information, refer to the python packaging tutorial <https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives>_ and pypi-feature-request <https://github.com/scverse/cookiecutter-scverse/issues/88>_.

Writing Documentation
----------------------

Please write documentation for new or changed features and use-cases. This project uses sphinx <https://www.sphinx-doc.org/en/master/>_ with the following features:
- Numpy-style docstrings <https://numpydoc.readthedocs.io/en/latest/>_
- Sphinx autodoc typehints <https://github.com/agronholm/sphinx-autodoc-typehints>_, to automatically reference annotated input and output types
- Docs use the furo <https://pradyunsg.me/furo/quickstart/>_ theme.

See the scanpy developer docs <https://scanpy.readthedocs.io/en/latest/dev/documentation.html>_ for more information on how to write documentation.

Upon every commit to the main branch, the documentation will be automatically built and published to readthedocs <https://liana-py.readthedocs.io/en/latest/>_.

Tutorials with myst-nb and Jupyter Notebooks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The documentation is set-up to render jupyter notebooks stored in the docs/notebooks.
Currently, only notebooks in .ipynb format are supported that will be included with both their input and output cells.
It is your responsibility to update and re-run the notebook whenever necessary.

Building the Docs Locally
~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

cd docs
make clean
make html
open _build/html/index.html

Contributing to the Codebase
----------------------------

We welcome contributions to both the documentation and the codebase. If you have any questions, please don't hesitate to open an issue or reach out to us.
3 changes: 3 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spatially-resolved, and multi-modal omics data.
installation
api
release_notes
contributing
reference
notebooks/prior_knowledge

Expand All @@ -51,6 +52,8 @@ spatially-resolved, and multi-modal omics data.

notebooks/targeted

notebooks/sc_multi


.. toctree::
:maxdepth: 1
Expand Down
273 changes: 123 additions & 150 deletions docs/source/notebooks/bivariate.ipynb

Large diffs are not rendered by default.

Loading
Loading