Skip to main content

Transmorph logo

PyPI version GitHub license Documentation Status Downloads Downloads DOI

transmorph is a python framework dedicated to data integration, with a focus on single-cell applications. Dataset integration describes the problem of embedding two or more datasets together, across different batches or feature spaces, so that similar samples end up close from one another. In transmorph we aim to provide a comprehensive framework to design, apply, report and benchmark data integration models using a system of interactive building blocks supported by statistical and plotting tools. We included pre-built models as well as benchmarking databanks in order to easily set up integration tasks. This package can be used in compatibility with scanpy and anndata packages, and works in jupyter notebooks.

Transmorph workflow

Transmorph is also computationally efficient, and can scale to large datasets with competitive integration quality.

Documentation

https://transmorph.readthedocs.io/en/latest/

Installation

transmorph can be installed either from source of from the python repository PyPi. PyPi version is commonly more stable, but may not contain latest features, while you can find the development version on GitHub. Using a python environment is highly recommended (for instance pipenv) in order to easily handle dependencies and versions. transmorph has only be tested for python >=3.9, on Linux and Windows systems.

See the instructions: https://transmorph.readthedocs.io/en/latest/sections/installation.html

Quick starting with a pre-built model

All transmorph models take a list or a dictionary containing AnnData objects as input for data integration. Let us start by loading some benchmarking data, gathered from [Chen 2020] (3.4GB size).

from transmorph.datasets import load_chen_10x
chen_10x = load_chen_10x()

One can then either create a custom integration model, or load a pre-built transmorph model. We will choose the EmbedMNN model with default parameters for this example, which embeds all datasets into a common abstract 2D space.

from transmorph.models import EmbedMNN
model = EmbedMNN()
model.transform(chen_10x)

Integration embedding coordinates can be gathered in each AnnData object, in AnnData.obsm['X_transmorph'].

chen_10x['P01'].obsm['X_transmorph']

One can for instance use a plotting function from transmorph to display integration results.

from transmorph.utils.plotting import scatter_plot

scatter_plot(chen_10x, use_rep="X_transmorph")
scatter_plot(chen_10x, use_rep="X_transmorph", color_by="class")

Citing transmorph

If you find transmorph useful for your research, please consider citing our pre-print which can be found on bioRxiv.

@article{fouche2022transmorph,
  title={transmorph: a unifying computational framework for single-cell data integration},
  author={Fouch{\'e}, Aziz, Chadoutaud, Lo{\¨i}c, Delattre, Olivier and Zinovyev, Andrei},
  journal={bioRxiv},
  year={2022}
}

References

[Chen 2020] Chen, Y. P., Yin, J. H., Li, W. F., Li, H. J., Chen, D. P., Zhang, C. J., ... & Ma, J. (2020). Single-cell transcriptomics reveals regulators underlying immune cell diversity and immune subtypes associated with prognosis in nasopharyngeal carcinoma. Cell research, 30(11), 1024-1042.

Metadata

Release files for transmorph 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transmorph 0.2.8
File Size Uploaded
transmorph-0.2.8.tar.gz 138.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transmorph 0.2.8
File Interpreter ABI Platform
transmorph-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 317.1 kB

Release files / transmorph-0.2.8.tar.gz

Download URL transmorph-0.2.8.tar.gz
Size 138.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a46b6ee135bcf7a4ffa060b21b56f507f9dde3fb8dc7f6e8f0cca5dc6652912
BLAKE2b-256 checksum
How to use checksums
b53978c6f73988bfc7779ee2270af8ed6df0610c923cb06c3c2c77417de08938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / transmorph-0.2.8-py3-none-any.whl

Download URL transmorph-0.2.8-py3-none-any.whl
Size 178.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54d84f45991813380099ed2fce5fdc1587f03bd65665f727ce850fb267642403
BLAKE2b-256 checksum
How to use checksums
57020bb65d34d8b1ed447bd98d3b077ad624976789f01f15a6395443944ed485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page