Skip to content

Commit

Permalink
Merge pull request #39 from saezlab/dev
Browse files Browse the repository at this point in the history
LIANA+ merge
  • Loading branch information
dbdimitrov committed Jul 27, 2023
2 parents 674bfb1 + f61717c commit 57236f7
Show file tree
Hide file tree
Showing 97 changed files with 16,131 additions and 1,127 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/main.yml
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
Expand All @@ -15,28 +12,29 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.9"]
python-version: ["3.8", "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov git+https://github.com/saezlab/omnipath adjustText numpydoc setuptools
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
poetry install --extras "full"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test and add coverage
run: |
pytest --cov --disable-warnings liana
poetry run pytest --cov --disable-warnings liana
- name: Upload coverage reports to Codecov
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
Expand All @@ -53,18 +51,19 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov git+https://github.com/saezlab/omnipath adjustText IPython
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install poetry
- name: Install dependencies
run: |
poetry install --extras "full"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
run: |
pytest --disable-warnings .
poetry run pytest --disable-warnings .
89 changes: 30 additions & 59 deletions README.md
@@ -1,4 +1,4 @@
# LIANA: a LIgand-receptor ANalysis frAmework <img src="https://github.com/saezlab/liana-py/blob/main/docs/source/logo.png?raw=true" align="right" height="125">
# LIANA+: a one-stop-shop framework for cell-cell communication <img src="https://raw.githubusercontent.com/saezlab/liana-py/dev/docs/source/_static/logo.png?raw=true" align="right" height="125">

<!-- badges: start -->
[![main](https://github.com/saezlab/liana-py/actions/workflows/main.yml/badge.svg)](https://github.com/saezlab/liana-py/actions)
Expand All @@ -8,87 +8,58 @@
[![Downloads](https://pepy.tech/badge/liana)](https://pepy.tech/project/liana)
<!-- badges: end -->

LIANA is a Ligand-Receptor inference framework that enables the use of any LR method with any resource.
This is its faster and memory efficient Python implementation, an R version is also available [here](https://github.com/saezlab/liana).
LIANA+ is an efficient framework that integrates and extends existing methods and knowledge to study cell-cell communication in single-cell, spatially-resolved, and multi-modal omics data.

<img src="https://raw.githubusercontent.com/saezlab/liana-py/dev/docs/source/_static/abstract.png?raw=true" width="700" align="center">

## Tutorials & Documentation

- [LIANA's basic tutorial](https://liana-py.readthedocs.io/en/latest/notebooks/basic_usage.html) in dissociated single-cell data
## Contributions & Development

- [LIANA with MOFA](https://liana-py.readthedocs.io/en/latest/notebooks/mofatalk.html). Using MOFA to infer intercellular communication programmes across samples and conditions, as initially proposed by cell2cell-Tensor
LIANA+ is currently at it's alpha stage - i.e. we are actively working on improving it.

- [Multicellular programmes with MOFA](https://liana-py.readthedocs.io/en/latest/notebooks/mofacellular.html). Using MOFA to obtain coordinates
gene expression programmes across samples and conditions, as done in [Ramirez et al., 2023](https://europepmc.org/article/ppr/ppr620471)
The API visible to the user should be stable, specifically `liana.method.sc`, but some differences in terms of secondary parameters, or default settings are possible.

- [LIANA with cell2cell-Tensor](https://liana-py.readthedocs.io/en/latest/notebooks/liana_c2c.html) to extract intercellular communication programmes across samples and conditions. Extensive tutorials combining LIANA & [cell2cell-Tensor](https://www.nature.com/articles/s41467-022-31369-2) are available [here](https://ccc-protocols.readthedocs.io/en/latest/index.html).
More importantly, we welcome suggestions, ideas, and contributions! Please use do not hesitate to contact us, or use the issues or the [LIANA+ Development project](https://github.com/orgs/saezlab/projects/16) to make suggestions.

- We also refer users to the [Cell-cell communication chapter](https://www.sc-best-practices.org/mechanisms/cell_cell_communication.html) in the [best-practices guide from Theis lab](https://www.nature.com/articles/s41576-023-00586-w). There we provide an overview of the common limitations and assumptions in CCC inference from (dissociated single-cell) transcriptomics data.

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

### Single-cell/Dissociated Data

- [LIANA's basic tutorial](https://liana-py.readthedocs.io/en/latest/notebooks/basic_usage.html) in dissociated single-cell data

## Install LIANA
### Spatial Data

Install liana's stable version:
```
pip install liana
```
- [Learn spatially-informed relationships with MISTy](https://liana-py.readthedocs.io/en/latest/notebooks/misty.html) across (multi-)views

Install liana's most up-to-date version:
```
pip install git+https://github.com/saezlab/liana-py
```
- Estimate local spatially-informed bivariate metrics with [LIANA's bivariate scores](https://liana-py.readthedocs.io/en/latest/notebooks/bivariate.html)

## Methods
### Multi-condition

The methods implemented in this repository are:
- [Hypothesis-testing for CCC with PyDeSeq2](https://liana-py.readthedocs.io/en/latest/notebooks/targeted.html) that also shows the inference of causal **intracellular** signalling networks

- [CellPhoneDBv2](https://github.com/Teichlab/cellphonedb)
- [NATMI](https://github.com/forrest-lab/NATMI)
- [Connectome](https://github.com/msraredon/Connectome)
- [SingleCellSignalR](https://github.com/SCA-IRCM/SingleCellSignalR)
- [CellChat](https://github.com/sqjin/CellChat) (+)
- *1-vs-rest* expression `LogFC` score
- `Geometric Mean` - ligand-receptor geometric mean with pvalues obtained
via the permutation approach implemented by CellPhoneDBv2
- `rank_aggregate` of the predictions calculated with the
[RobustRankAggregate](https://academic.oup.com/bioinformatics/article/28/4/573/213339) method
- [Multicellular programmes with MOFA](https://liana-py.readthedocs.io/en/latest/notebooks/mofacellular.html). Using MOFA to obtain coordinates
gene expression programmes across samples and conditions, as done in [Ramirez et al., 2023](https://europepmc.org/article/ppr/ppr620471)

- [LIANA with MOFA](https://liana-py.readthedocs.io/en/latest/notebooks/mofatalk.html). Using MOFA to infer intercellular communication programmes across samples and conditions, as initially proposed by cell2cell-Tensor

- [LIANA with cell2cell-Tensor](https://liana-py.readthedocs.io/en/latest/notebooks/liana_c2c.html) to extract intercellular communication programmes across samples and conditions. Extensive tutorials combining LIANA & [cell2cell-Tensor](https://www.nature.com/articles/s41467-022-31369-2) are available [here](https://ccc-protocols.readthedocs.io/en/latest/index.html).

(+) A resource-independent adaptation of the CellChat LR inference functions.

## Ligand-Receptor Resources
### Others

The following CCC resources are accessible via this pipeline:
- We also refer users to the [Cell-cell communication chapter](https://www.sc-best-practices.org/mechanisms/cell_cell_communication.html) in the [best-practices guide from Theis lab](https://www.nature.com/articles/s41576-023-00586-w). There we provide an overview of the common limitations and assumptions in CCC inference from (dissociated single-cell) transcriptomics data.

- Consensus ($)
- CellCall
- CellChatDB
- CellPhoneDB
- Ramilowski2015
- Baccin2019
- LRdb
- Kiroauc2010
- ICELLNET
- iTALK
- EMBRACE
- HPMR
- Guide2Pharma
- ConnectomeDB2020
- CellTalkDB
- MouseConsensus (#)

($) LIANA's default `Consensus` resource was generated from several expert-curated resources,
filtered to additional quality control steps including literature support, complex re-union/consensus,
and localisation.
## API
For further information please check LIANA's [API documentation](https://liana-py.readthedocs.io/en/latest/api.html).

(#) Consensus Resource converted to murine homologs.


## Cite LIANA:
## Cite LIANA+:

Dimitrov, D., Türei, D., Garrido-Rodriguez M., Burmedi P.L., Nagai, J.S., Boys, C., Flores, R.O.R., Kim, H., Szalai, B., Costa, I.G., Valdeolivas, A., Dugourd, A. and Saez-Rodriguez, J. Comparison of methods and resources for cell-cell communication inference from single-cell RNA-Seq data. Nat Commun 13, 3224 (2022). https://doi.org/10.1038/s41467-022-30755-0
Also, if you use the OmniPath CCC Resource for your analysis, please cite:
Dimitrov, D. ... Saez-Rodriguez, J.

Türei, D., Valdeolivas, A., Gul, L., Palacio‐Escat, N., Klein, M., Ivanova, O., Ölbei, M., Gábor, A., Theis, F., Módos, D. and Korcsmáros, T., 2021. Integrated intra‐and intercellular signaling knowledge for multicellular omics analysis. Molecular systems biology, 17(3), p.e9923. https://doi.org/10.15252/msb.20209923
Dimitrov, D., Türei, D., Garrido-Rodriguez M., Burmedi P.L., Nagai, J.S., Boys, C., Flores, R.O.R., Kim, H., Szalai, B., Costa, I.G., Valdeolivas, A., Dugourd, A. and Saez-Rodriguez, J. Comparison of methods and resources for cell-cell communication inference from single-cell RNA-Seq data. Nat Commun 13, 3224 (2022). https://doi.org/10.1038/s41467-022-30755-0

Similarly, please consider citing any of the methods and/or resources implemented in liana, that were particularly relevant for your research!
Binary file added docs/source/_static/abstract.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57236f7

Please sign in to comment.