tspex: a tissue-specificity calculator for gene expression data

Antônio Pedro Camargo, Adrielle A. Vasconcelos, Mateus Bernabe Fiamenghi, Gonçalo Amarante Guimarães Pereira, Marcelo Falsarella CarazzolleResearch Square 2020 · DOI

Abstract

When comparing gene expression data of different tissues it is often interesting to identify tissue-specific genes or transcripts. Even though there are several metrics to measure tissue-specificity, a user-friendly tool that facilitates this analysis is not available yet. We present tspex, a software that allows easy computation of a comprehensive set of different tissue-specificity metrics from gene expression data. tspex can be used through a web interface, command-line or the Python API. Its package version also provides visualization functions that facilitate inspection of results. The documentation and the source code of tspex are available at https://apcamargo.github.io/tspex/ and the web application can be accessed at https://tspex.lge.ibi.unicamp.br/

Introduction

In genomics, understanding the spatial activity of a gene is as critical as determining its function. Genes exhibit a spectrum of expression patterns, ranging from "housekeeping" genes—ubiquitously active to maintain basic cellular functions—to "tissue-specific" genes, which are active only in specific biological contexts like the liver or brain. Identifying these specific genes is essential for drug discovery, disease modeling (particularly in oncology), and evolutionary studies.

While various mathematical metrics have been developed to quantify tissue specificity, the field has lacked a unified, accessible software tool. Previously, researchers often had to implement these metrics via custom, one-off scripts, leading to a lack of standardization and redundant effort across bioinformatics projects.

Methods and Implementation

The authors developed tspex as a comprehensive "calculator" for tissue specificity. Implemented in Python, the tool is designed for accessibility across different technical skill levels, offering three primary interfaces: a web application for quick uploads, a command-line tool for automated pipelines, and a Python API for integration with data science libraries such as NumPy and Pandas.

The tspex web interface allows users to upload expression matrices and select from various specificity metrics.

Metric Categorization

The tool provides 12 distinct metrics, categorized into two functional groups:

  1. General Scoring Metrics: These provide a single value representing a gene's overall specificity across all sampled tissues (e.g., Tau, Gini coefficient, Shannon entropy).
  2. Individualized Scoring Metrics: These quantify how specific a gene's expression is to one particular tissue (e.g., Z-score, Tissue-specificity index).

Key Features

  • Normalization: To account for different scales across metrics, tspex can normalize results to a 0–1 scale, where 0 represents ubiquitous expression and 1 represents perfect tissue specificity.
  • Data Preprocessing: The tool supports log-transformation of input data to mitigate the impact of high-variance expression levels.
  • Visualization: The Python package includes built-in functions to generate publication-quality histograms (to visualize specificity distributions) and heatmaps (to display the expression profiles of the most specific genes).

Case Study: GTEx Dataset

To demonstrate the utility of tspex, the authors analyzed real-world data from the Genotype-Tissue Expression (GTEx) project. They utilized a subset of expression data (Transcripts Per Million, TPM) for 31,872 genes across five human tissues: Bladder, Liver, Lung, Pancreas, and Stomach.

Using the "Tau" metric—highlighted as a particularly robust general metric—the analysis revealed that the Lung possessed the highest number of tissue-specific genes among the sampled tissues. The tool successfully processed the large dataset and generated visualizations with minimal code, demonstrating its efficiency and ease of use.

Discussion and Future Directions

A key insight from this work is that tissue specificity is a contextual property rather than an absolute one; a gene's score depends entirely on the tissues included in the analysis. tspex facilitates iterative research by allowing users to easily re-run analyses as new data becomes available. Furthermore, while named for "tissue" specificity, the tool is equally applicable to measuring specificity across developmental stages, experimental time points, or different genetic varieties.

Currently, the web-based version limits visualization to datasets with up to 5,000 genes to maintain performance, though the CLI and API versions have no such restrictions. While the tool provides a wide array of metrics, researchers must still select the metric most appropriate for their biological question, aided by the benchmarking guides provided in the documentation. Future iterations may see tspex integrated directly into single-cell RNA-seq analysis pipelines.

Summary updated

Abstract

<title>Abstract</title> When comparing gene expression data of different tissues it is often interesting to identify tissue-specific genes or transcripts. Even though there are several metrics to measure tissue-specificity, a user-friendly tool that facilitates this analysis is not available yet. We present tspex, a software that allows easy computation of a comprehensive set of different tissue-specificity metrics from gene expression data. tspex can be used through a web interface, command-line or the Python API. Its package version also provides visualization functions that facilitate inspection of results. The documentation and the source code of tspex are available at https://apcamargo.github.io/tspex/ and the web application can be accessed at https://tspex.lge.ibi.unicamp.br/
BibTeX
@inproceedings{camargo2020tspex,
  author = {Antônio Pedro Camargo and Adrielle A. Vasconcelos and Mateus Bernabe Fiamenghi and Gonçalo Amarante Guimarães Pereira and Marcelo Falsarella Carazzolle},
  title = {{tspex: a tissue-specificity calculator for gene expression data}},
  booktitle = {Research Square},
  year = {2020},
  doi = {10.21203/rs.3.rs-51998/v1},
}
Figure