Skip to main content

A unifying data integration framework.

Project description

Transmorph

PyPI version GitHub license Documentation Status Downloads Downloads

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 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 of 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.fit(chen_10x)

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

chen_10x['P01'].obsm['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="transmorph")
scatter_plot(chen_10x, use_rep="transmorph", color_by="class")

[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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transmorph-0.2.4.tar.gz (133.4 kB view details)

Uploaded Source

Built Distribution

transmorph-0.2.4-py3-none-any.whl (170.8 kB view details)

Uploaded Python 3

File details

Details for the file transmorph-0.2.4.tar.gz.

File metadata

  • Download URL: transmorph-0.2.4.tar.gz
  • Upload date:
  • Size: 133.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for transmorph-0.2.4.tar.gz
Algorithm Hash digest
SHA256 7fc37ac3ffc3b9fdb5eda6ab01947e25ad122d6e9df8e5f63b1020c259152905
MD5 704d3eb6b574bb622a48cd8cdc4e1b1e
BLAKE2b-256 a6eff17b0e2c3f6b609b57bf712426eff514f7905332cedb221cb7f3adba174d

See more details on using hashes here.

File details

Details for the file transmorph-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: transmorph-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 170.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for transmorph-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf9301f352f2736d4c0b6352c5e729beda0a10fb27e798abb77b5fd121255fc
MD5 d40e83cffff221035e4871faaf9b6c2e
BLAKE2b-256 c646ab2b871b9e8a7af1507c08e7236000995ec2442b639609624cf265a12363

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page