Skip to main content

Python package for calculating TME scores

Project description

TMEImmune

TMEImmune is a Python package that implements the ESTIMATE algorithm, ISTMEscore method, NetBio method, and SIA method. The ESTIMATE and ISTMEscore methods were originally available only in R, and we've ported them to Python for broader accessibility. Additionally, the NetBio and SIA methods, which did not have existing packages, has been manually implemented in Python following the original publications and codes.

Features

  • Implementation of the ESTIMATE algorithm for estimating stromal, immune and estimate scores in tumor samples. Estimate tumor purity for Affymetrix platform data.
  • Implementation of the ISTMEscore method for improved tumor microenvironment (TME) immune and stromal scoring. The ISTME TME subtypes are also provided.
  • Novel implementation of the NetBio and SIA method for comprehensive TME analysis.
  • Data pre-processing including normalization and batch correction for both unnormalized read counts and normalized data.
  • Performance evaluation for immune checkpoint inhibitor response prediction and survival prognosis.

Installation

You can install the package via the following two commands:

pip install TMEImmune
pip install git+https://github.com/qiluzhou/TMEImmune.git

Usage

Here are some basic usage examples:

# Example 1: Data Normalization
from TMEImmune import data_processing
import pandas as pd
clin = pd.read_csv("data/example_clin.csv", index = 0)
df = data_processing.normalization(path = "data/example_gene.csv", method = 'CPM', batch = clin, batch_col = "CANCER")

# Example 2: Compute TME score
from TMEImmune import TME_score
scores = TME_score.get_score(df, method = ['ESTIMATE', 'ISTME', 'NetBio', 'SIA'])

# Example 3: Performance comparison
from TMEImmune import optimal
outcome = optimal.get_performance(scores, metric = ['ICI', 'survival'], score_name = ['EST_stromal', 'EST_immune',
    'IS_immune', 'IS_stromal', 'NetBio', 'SIA'], ICI_col = 'response', surv_col = ['time', 'delta'], df_clin = clin, surv_p = [0.33, 0.66])

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

If you have any questions or feedback, feel free to open an issue on GitHub Issues. We also welcome contributions for integrating new TME scores into our package. If you'd like to propose a method, please attach a link to its introduction in the Github issue, and we will evaluate it accordingly.

Acknowledgements

The ESTIMATE algorithm from Yoshihara et al. The ISTMEscore method from Zeng et al. The NetBio method from Kong et al. The SIA method from Mezheyeuski et al.

Citations

If you use TMEscore in your research, please cite the following papers:

Yoshihara, K., Shahmoradgoli, M., Martínez, E. et al. Inferring tumour purity and stromal and immune cell admixture from expression data. Nat Commun 4, 2612 (2013). https://doi.org/10.1038/ncomms3612

Zeng, Z., Li, J., Zhang, J. et al. Immune and stromal scoring system associated with tumor microenvironment and prognosis: a gene-based multi-cancer analysis. J Transl Med 19, 330 (2021). https://doi.org/10.1186/s12967-021-03002-1

Kong, J., Ha, D., Lee, J., Kim, I., Park, M., Im, S. H., ... & Kim, S. (2022). Network-based machine learning approach to predict immunotherapy response in cancer patients. Nature communications, 13(1), 3703. https://doi.org/10.1038/s41467-022-31535-6

Mezheyeuski, A., Backman, M., Mattsson, J., Martín-Bernabé, A., Larsson, C., Hrynchyk, I., Hammarström, K., Ström, S., Ekström, J., Mauchanski, S., Khelashvili, S., Lindberg, A., Agnarsdóttir, M., Edqvist, P. H., Huvila, J., Segersten, U., Malmström, P. U., Botling, J., Nodin, B., Hedner, C., … Sjöblom, T. (2023). An immune score reflecting pro- and anti-tumoural balance of tumour microenvironment has major prognostic impact and predicts immunotherapy response in solid cancers. EBioMedicine, 88, 104452. https://doi.org/10.1016/j.ebiom.2023.104452

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

tmeimmune-1.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TMEImmune-1.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file tmeimmune-1.1.0.tar.gz.

File metadata

  • Download URL: tmeimmune-1.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.12

File hashes

Hashes for tmeimmune-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d769202a3ab2a65fb4112b88e16e8d37675cf45c9608a6d448177213ae7cb127
MD5 bce054086c4ef9cf8e432b686a8f0d30
BLAKE2b-256 39de9f25c7218d73a1524d35f6a972bbe4b2f683dd9309fe6b4252d3438b2f47

See more details on using hashes here.

File details

Details for the file TMEImmune-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: TMEImmune-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.12

File hashes

Hashes for TMEImmune-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d5af0a8ecc2158beedc3801b215cc9d414293ea8de7ac785cc4fc1628ffd28b
MD5 0749ff369ae8f3c4dc6cf2f793df4e92
BLAKE2b-256 4aed7363a3f45886cfb4df3fe00c1686a830db0d89a7a73a221af40f3be17e0c

See more details on using hashes here.

Supported by

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