Metadata-Version: 2.1
Name: cell2cell
Version: 0.7.1
Summary: TBD
Home-page: UNKNOWN
Author: cell2cell development team
Author-email: earmingo@ucsd.edu
Maintainer: cell2cell development team
Maintainer-email: earmingol@eng.ucsd.edu
License: BSD-3-Clause
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS :: MacOS X
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy (>=1.16)
Requires-Dist: pandas (>=1.0.0)
Requires-Dist: xlrd (>=1.1)
Requires-Dist: openpyxl (>=2.6.2)
Requires-Dist: networkx (>=2.3)
Requires-Dist: matplotlib (>=3.2.0)
Requires-Dist: seaborn (>=0.11.0)
Requires-Dist: scikit-learn
Requires-Dist: umap-learn
Requires-Dist: tqdm
Requires-Dist: statsmodels
Requires-Dist: statannotations
Requires-Dist: tensorly (==0.8.1)
Requires-Dist: kneed
Requires-Dist: scanpy
Requires-Dist: gseapy (==1.0.3)

# Inferring cell-cell interactions from transcriptomes with *cell2cell*
[![PyPI Version][pb]][pypi]
[![Downloads](https://pepy.tech/badge/cell2cell/month)](https://pepy.tech/project/cell2cell)

[pb]: https://badge.fury.io/py/cell2cell.svg
[pypi]: https://pypi.org/project/cell2cell/

## Getting started
Please refer to the [cell2cell website](https://cell2cell.readthedocs.org/), 
which includes tutorials and documentation



## Installation
**First, [install Anaconda following this tutorial](https://docs.anaconda.com/anaconda/install/)**

Once installed, create a new conda environment:
```
conda create -n cell2cell -y python=3.7 jupyter
```

Activate that environment:

```
conda activate cell2cell
```

Then, install cell2cell:
```
pip install cell2cell
```
## Examples

---
![plot](https://github.com/earmingol/cell2cell/blob/master/Logo.png?raw=true)

- A toy example using the **under-the-hood methods of cell2cell** is
  [available here](https://github.com/earmingol/cell2cell/blob/master/examples/cell2cell/Toy-Example.ipynb).
  This case allows personalizing the analyses in a higher level, but it may result **harder to use**.
- A toy example using an Interaction Pipeline for **bulk data** is 
  [available here](https://github.com/earmingol/cell2cell/blob/master/examples/cell2cell/Toy-Example-BulkPipeline.ipynb).
  An Interaction Pipeline makes cell2cell **easier to use**.
- A toy example using an Interaction Pipeline for **single-cell data** is 
  [available here](https://github.com/earmingol/cell2cell/blob/master/examples/cell2cell/Toy-Example-SingleCellPipeline.ipynb).
  An Interaction Pipeline makes cell2cell **easier to use**.  
- An example of using *cell2cell* to infer cell-cell interactions across the **whole
body of *C. elegans*** is [available here](https://github.com/LewisLabUCSD/Celegans-cell2cell)
  
---

![plot](https://github.com/earmingol/cell2cell/blob/master/LogoTensor.png?raw=true)

- Jupyter notebooks for reproducing the results in the manuscript of Tensor-cell2cell
  [are available and can be run online in codeocean.com](https://doi.org/10.24433/CO.0051950.v2).
  It specifically contains analyses on datasets of **COVID-19, Autism Spectrum Disorders (ASD) and the embryonic development
  of *C. elegans***. These analyses evaluate changes in
  cell-cell communication dependent on: 
    - [Different severities of COVID-19](https://files.codeocean.com/files/verified/bffc457e-caa6-4c39-b869-f52330804db0_v2.0/results.5afea95c-aec4-455d-b06e-b0c12ef10df1/06-BALF-Tensor-Factorization.html)
    - [ASD condition of patients](https://files.codeocean.com/files/verified/bffc457e-caa6-4c39-b869-f52330804db0_v2.0/results.5afea95c-aec4-455d-b06e-b0c12ef10df1/11-Brain-ASD-Tensor-Factorization.html)
    - [Multiple time points of the *C. elegans* development](https://files.codeocean.com/files/verified/bffc457e-caa6-4c39-b869-f52330804db0_v2.0/results.5afea95c-aec4-455d-b06e-b0c12ef10df1/08-Celegans-Tensor-Factorization.html)
- **Detailed tutorials for running Tensor-cell2cell and downstream analyses:**
    - [Obtaining patterns of cell-cell communication with Tensor-cell2cell](https://earmingol.github.io/cell2cell/tutorials/ASD/01-Tensor-Factorization-ASD/)
    - [Downstream analysis 1: Factor-specific analyses](https://earmingol.github.io/cell2cell/tutorials/ASD/02-Factor-Specific-ASD/)
    - [Downstream analysis 2: Gene Set Enrichment Analysis](https://earmingol.github.io/cell2cell/tutorials/ASD/03-GSEA-ASD/)
- **Do you have precomputed communication scores?** Re-use them as a prebuilt tensor as [exemplified here](https://github.com/earmingol/cell2cell/blob/master/examples/tensor_cell2cell/Loading-PreBuiltTensor.ipynb).
  This allows reusing previous tensors you built or even plugging in communication scores from other tools.
- **Run Tensor-cell2cell MUCH FASTER and ON THE CLOUD!** An example to perform the analysis on
 **Google Colab while using a NVIDIA GPU** is [available here](https://colab.research.google.com/drive/1xE6Pm1u-XoSWV8a3oYpixUFj64FIDtl0?usp=sharing)


---
## LIANA & Tensor-cell2cell

Quickstart and extended tutorials are available for [using Tensor-cell2cell in combination with LIANA](https://ccc-protocols.readthedocs.io/).

These tutorials include the use of multiple LR-based tools running on LIANA, different databases of ligand-receptor interactions,
downstream analyses, and the use of spatial transcriptomics.

---
## Common issues
- When running Tensor-cell2cell (```InteractionTensor.compute_tensor_factorization()``` or ```InteractionTensor.elbow_rank_selection()```), a common error is
associated with Memory. This may happen when the tensor is big enough to make the computer run out of memory when the input of the functions in the parentheses is
  ```init='svd'```. To avoid this issue, just replace it by ```init='random'```.
  
## Ligand-Receptor pairs
- A repository with previously published lists of ligand-receptor pairs [is available here](https://github.com/LewisLabUCSD/Ligand-Receptor-Pairs).
  You can use any of these lists as an input of cell2cell.

## Citation

- **cell2cell** should be cited using this research article:
    - Armingol E., Ghaddar A., Joshi C.J., Baghdassarian H., Shamie I., Chan J.,
      Her H.L., Berhanu S., Dar A., Rodriguez-Armstrong F., Yang O., O’Rourke E.J., Lewis N.E. 
      [Inferring a spatial code of cell-cell interactions across a whole animal body](https://doi.org/10.1371/journal.pcbi.1010715).
       *PLOS Computational Biology **18(11)**: e1010715*, (2022). **DOI: 10.1371/journal.pcbi.1010715**

- **Tensor-cell2cell** should be cited using this research article:
    - Armingol E., Baghdassarian H., Martino C., Perez-Lopez A., Aamodt C., Knight R., Lewis N.E.
     [Context-aware deconvolution of cell-cell communication with Tensor-cell2cell](https://doi.org/10.1038/s41467-022-31369-2)
     *Nat. Commun.* **13**, 3665 (2022). **DOI: 10.1038/s41467-022-31369-2**

- **LIANA & Tensor-cell2cell tutorials** should be cited unsing this pre-print article:
    - Baghdassarian H., Dimitrov D., Armingol E., Saez-Rodriguez J., Lewis N.E.
      [Combining LIANA and Tensor-cell2cell to decipher cell-cell communication across multiple samples](https://doi.org/10.1101/2023.04.28.538731)
      *bioRxiv* (2023) **DOI: 10.1101/2023.04.28.538731**


