# tspex
[![DOI](https://img.shields.io/badge/DOI-10.21203%2Frs.3.rs--51998%2Fv1-red)](https://doi.org/10.21203/rs.3.rs-51998/v1)
[![PyPI](https://img.shields.io/pypi/v/tspex.svg?label=PyPI&color=green)](https://pypi.python.org/pypi/tspex)
[![Conda](https://img.shields.io/conda/vn/bioconda/tspex.svg?label=Conda&color=green)](https://anaconda.org/bioconda/tspex)
[![PyPI downloads](https://img.shields.io/pypi/dm/tspex?label=PyPI%20downloads&color=blue)](https://pypi.python.org/pypi/tspex)
[![Conda downloads](https://img.shields.io/conda/dn/bioconda/tspex.svg?label=Conda%20downloads&color=blue)](https://anaconda.org/bioconda/tspex)
- [Overview](#overview)
- [Citation](#citation)
- [Documentation](#documentation)
- [Installation](#installation)
- [Python API tutorial](#python-api-tutorial)
- [Command-line interface](#command-line-interface)
- [Examples](#examples)
## Overview
tspex is a tissue-specificity calculator tool. It provides both an easy-to-use object-oriented Python API and a command-line interface (CLI) for calculating a variety of tissue-specificity metrics from gene expression data.
tspex features include:
- Twelve different tissue-specificity metrics.
- Integration with popular data analysis libraries, such as NumPy, SciPy, and pandas.
- Visualization functions.
- Support for Jupyter notebooks.
## Citation
If you use tspex in your research, it would be appreciated if you could cite it.
> Camargo, A. P., Vasconcelos, A. A., Fiamenghi, M. B., Pereira, G. A. G. & Carazzolle, M. F.. "[tspex: a tissue-specificity calculator for gene expression data](https://www.researchsquare.com/article/rs-51998/v1)" *Preprint available at Research Square* (2020).
## Web version
tspex can be used through a web interface that is freely available online at [https://tspex.lge.ibi.unicamp.br/](https://tspex.lge.ibi.unicamp.br/). The source code of the web app can be found at [https://github.com/apcamargo/tspex-webapp/](https://github.com/apcamargo/tspex-webapp/).
## Documentation
A complete documentation for tspex can be found at [https://apcamargo.github.io/tspex/](https://apcamargo.github.io/tspex/).
## Installation
There are two ways to install tspex:
- Using pip:
```
pip install tspex
```
- Using conda:
```
conda install -c conda-forge -c bioconda tspex
```
## Python API tutorial
For a detailed guide on how to use the Python API, please check the [Jupyter notebook tutorial](https://github.com/apcamargo/tspex/blob/master/docs/python_api.ipynb).
## Command-line interface
tspex can be executed from the command line using the `tspex` command. It takes an expression matrix file as input and outputs the computed tissue-specificity values.
```
usage: tspex [-h] [-l] [-d] [-t THRESHOLD] input_file output_file method
Compute gene tissue-specificity from an expression matrix and save the output.
positional arguments:
input_file Expression matrix file in the TSV, CSV or Excel
formats.
output_file Output TSV file containing tissue-specificity values.
method Tissue-specificity metric. Allowed values are:
"counts", "tau", "gini", "simpson",
"shannon_specificity", "roku_specificity", "tsi",
"zscore", "spm", "spm_dpm", "js_specificity",
"js_specificity_dpm".
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-l, --log Log-transform expression values. (default: False)
-d, --disable_transformation
By default, tissue-specificity values are transformed
so that they range from 0 (perfectly ubiquitous) to 1
(perfectly tissue-specific). If this parameter is
used, transformation will be disabled and each metric
will have have a diferent range of possible values.
(default: False)
-t THRESHOLD, --threshold THRESHOLD
Threshold to be used with the "counts" metric. If
another method is chosen, this parameter will be
ignored. (default: 0)
```
### Examples
- Using the `spm` metric to compute tissue-specificity values from a log-transformed expression matrix:
```
tspex --log gene_expression.tsv tspex_spm.tsv spm
```
- Using the `counts` method to compute tissue-specificity by counting the number of tissues in which the gene expression is greater than 10:
```
tspex --threshold 10 gene_expression.tsv tspex_counts.tsv counts
```
- Using the `zscore` without transformation to quantify tissue-specificity as the number of standard deviations away from the mean gene expression:
```
tspex --disable_transformation gene_expression.tsv tspex_zscore.tsv zscore
```
Raw data
{
"_id": null,
"home_page": "https://apcamargo.github.io/tspex/",
"name": "tspex",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "bioinformatics,gene expression,tissue-specificity,transcriptomics",
"author": "Antonio Pedro Camargo",
"author_email": "antoniop.camargo@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/55/15/420249f5ce8f62cf882f840a79fedb2e70a57660e14766273ee3a8125744/tspex-0.6.3.tar.gz",
"platform": null,
"description": "# tspex\n\n[![DOI](https://img.shields.io/badge/DOI-10.21203%2Frs.3.rs--51998%2Fv1-red)](https://doi.org/10.21203/rs.3.rs-51998/v1)\n[![PyPI](https://img.shields.io/pypi/v/tspex.svg?label=PyPI&color=green)](https://pypi.python.org/pypi/tspex)\n[![Conda](https://img.shields.io/conda/vn/bioconda/tspex.svg?label=Conda&color=green)](https://anaconda.org/bioconda/tspex)\n[![PyPI downloads](https://img.shields.io/pypi/dm/tspex?label=PyPI%20downloads&color=blue)](https://pypi.python.org/pypi/tspex)\n[![Conda downloads](https://img.shields.io/conda/dn/bioconda/tspex.svg?label=Conda%20downloads&color=blue)](https://anaconda.org/bioconda/tspex)\n\n- [Overview](#overview)\n- [Citation](#citation)\n- [Documentation](#documentation)\n- [Installation](#installation)\n- [Python API tutorial](#python-api-tutorial)\n- [Command-line interface](#command-line-interface)\n- [Examples](#examples)\n\n## Overview\n\ntspex is a tissue-specificity calculator tool. It provides both an easy-to-use object-oriented Python API and a command-line interface (CLI) for calculating a variety of tissue-specificity metrics from gene expression data.\n\ntspex features include:\n - Twelve different tissue-specificity metrics.\n - Integration with popular data analysis libraries, such as NumPy, SciPy, and pandas.\n - Visualization functions.\n - Support for Jupyter notebooks.\n\n\n## Citation\n\nIf you use tspex in your research, it would be appreciated if you could cite it.\n\n> Camargo, A. P., Vasconcelos, A. A., Fiamenghi, M. B., Pereira, G. A. G. & Carazzolle, M. F.. \"[tspex: a tissue-specificity calculator for gene expression data](https://www.researchsquare.com/article/rs-51998/v1)\" *Preprint available at Research Square* (2020).\n\n## Web version\n\ntspex can be used through a web interface that is freely available online at [https://tspex.lge.ibi.unicamp.br/](https://tspex.lge.ibi.unicamp.br/). The source code of the web app can be found at [https://github.com/apcamargo/tspex-webapp/](https://github.com/apcamargo/tspex-webapp/).\n\n## Documentation\n\nA complete documentation for tspex can be found at [https://apcamargo.github.io/tspex/](https://apcamargo.github.io/tspex/).\n\n## Installation\n\nThere are two ways to install tspex:\n\n- Using pip:\n\n```\npip install tspex\n```\n\n- Using conda:\n\n```\nconda install -c conda-forge -c bioconda tspex\n```\n\n\n## Python API tutorial\n\nFor a detailed guide on how to use the Python API, please check the [Jupyter notebook tutorial](https://github.com/apcamargo/tspex/blob/master/docs/python_api.ipynb).\n\n\n## Command-line interface\n\ntspex can be executed from the command line using the `tspex` command. It takes an expression matrix file as input and outputs the computed tissue-specificity values.\n\n\n```\nusage: tspex [-h] [-l] [-d] [-t THRESHOLD] input_file output_file method\n\nCompute gene tissue-specificity from an expression matrix and save the output.\n\npositional arguments:\n input_file Expression matrix file in the TSV, CSV or Excel\n formats.\n output_file Output TSV file containing tissue-specificity values.\n method Tissue-specificity metric. Allowed values are:\n \"counts\", \"tau\", \"gini\", \"simpson\",\n \"shannon_specificity\", \"roku_specificity\", \"tsi\",\n \"zscore\", \"spm\", \"spm_dpm\", \"js_specificity\",\n \"js_specificity_dpm\".\n\noptional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -l, --log Log-transform expression values. (default: False)\n -d, --disable_transformation\n By default, tissue-specificity values are transformed\n so that they range from 0 (perfectly ubiquitous) to 1\n (perfectly tissue-specific). If this parameter is\n used, transformation will be disabled and each metric\n will have have a diferent range of possible values.\n (default: False)\n -t THRESHOLD, --threshold THRESHOLD\n Threshold to be used with the \"counts\" metric. If\n another method is chosen, this parameter will be\n ignored. (default: 0)\n```\n\n### Examples\n\n- Using the `spm` metric to compute tissue-specificity values from a log-transformed expression matrix:\n\n```\ntspex --log gene_expression.tsv tspex_spm.tsv spm\n```\n\n- Using the `counts` method to compute tissue-specificity by counting the number of tissues in which the gene expression is greater than 10:\n\n```\ntspex --threshold 10 gene_expression.tsv tspex_counts.tsv counts\n```\n\n- Using the `zscore` without transformation to quantify tissue-specificity as the number of standard deviations away from the mean gene expression:\n\n```\ntspex --disable_transformation gene_expression.tsv tspex_zscore.tsv zscore\n```",
"bugtrack_url": null,
"license": "GNU General Public License v3.0",
"summary": "A Python package for calculating tissue-specificity metrics for gene expression.",
"version": "0.6.3",
"project_urls": {
"Homepage": "https://apcamargo.github.io/tspex/"
},
"split_keywords": [
"bioinformatics",
"gene expression",
"tissue-specificity",
"transcriptomics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5515420249f5ce8f62cf882f840a79fedb2e70a57660e14766273ee3a8125744",
"md5": "b6c4e12406ea1bf45850803f738c3797",
"sha256": "315bfa1f60ea582777c549313cad9e9da0a4d11c5f69a6fc767bd0823dc46316"
},
"downloads": -1,
"filename": "tspex-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "b6c4e12406ea1bf45850803f738c3797",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 24926,
"upload_time": "2023-07-04T18:02:08",
"upload_time_iso_8601": "2023-07-04T18:02:08.536169Z",
"url": "https://files.pythonhosted.org/packages/55/15/420249f5ce8f62cf882f840a79fedb2e70a57660e14766273ee3a8125744/tspex-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-04 18:02:08",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tspex"
}