A Python project to combine tabular outputs from GNPS, Sirius and ISDB
Project description
met-annot-unifier
A Python project to combine tabular outputs from GNPS, Sirius and ISDB
- Github repository: https://github.com/mapp-metabolomics-unit/met-annot-unifier/
- Documentation https://mapp-metabolomics-unit.github.io/met-annot-unifier/
Quickstart
Installation
met-annot-unifier is available on PyPi and can be installed with pip:
pip install met-annot-unifier
Usage
For now the package is only available as a command line tool. You can run it with the following command:
met-annot-unifier-cli
Get help on the available modes with:
met-annot-unifier-cli --help
Align tables
You can align the annotations tables from GNPS, Sirius and ISDB using two modes:
align-horizontally
: This will return a long table with a single row for each unique compound (according to their planar structures or IK2D). This mode can be useful to output a table to be viewed in Datawarrior or similar tools for chemical structures exploration.
met-annot-unifier-cli align-horizontally --gnps-file <path-to-gnps-table> --sirius-file <path-to-sirius-table> --isdb-file <path-to-isdb-table> --output <output-path>
align-vertically
: This will return a wide table with a single row per feature (m/z and retention time) and columns for each of the three sources. This mode can be useful to output a table to be added to a molecular network to be visualized in Cytoscape or similar tools for network visualization.
met-annot-unifier-cli align-vertically --gnps-file <path-to-gnps-table> --sirius-file <path-to-sirius-table> --isdb-file <path-to-isdb-table> --output <output-path>
Pruning tables
You can prune the aligned tables to remove rows with missing values in the columns of interest. This can be useful to remove rows with missing values in the columns used to merge the tables.
met-annot-unifier-cli prune-table --input <path-to-aligned-table> --list-columns <key-in-config-file> --output <output-path>
The --list-columns
argument should be a key in the column_config.yaml
file that contains a list of columns to be used to prune the table. You can edit this file here.
Example
You can align the GNPS, ISDB and Sirius tables found in the examples/data/in
folder of this repository and prune them to have a Cytoscape compatible table with the following commands:
met-annot-unifier-cli align-horizontally --gnps-file examples/data/in/gnps_output_example.tsv --sirius-file examples/data/in/sirius_output_example.tsv --isdb-file examples/data/in/isdb_output_example.tsv --output examples/data/out/aligned_table_horizontally.tsv
met-annot-unifier-cli prune-table --input-file examples/data/out/aligned_table_horizontally.tsv --list-columns "minimal_cytoscape" -o examples/data/out/aligned_table_horizontally_pruned_cytoscape.tsv
Since the input file arguments are optional, you can also choose to treat only ISDB and Sirius tables for example.
met-annot-unifier-cli align-horizontally --sirius-file examples/data/in/sirius_output_example.tsv --isdb-file examples/data/in/isdb_output_example.tsv --output examples/data/out/aligned_table_horizontally_isdb_sirius.tsv
met-annot-unifier-cli prune-table --input-file examples/data/out/aligned_table_horizontally_isdb_sirius.tsv --list-columns "minimal_cytoscape_no_gnps" -o examples/data/out/aligned_table_horizontally_pruned_isdb_sirius_cytoscape.tsv
```
---
Repository initiated with [fpgmaas/cookiecutter-poetry](https://github.com/fpgmaas/cookiecutter-poetry).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file met_annot_unifier-0.0.7.tar.gz
.
File metadata
- Download URL: met_annot_unifier-0.0.7.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 189c2f23e6e35c2783cf352548f29fede5ab79a1cb3c30b36c296eb10c1ff636 |
|
MD5 | 9596791817e3e19b0c7ad283f5b1b7e9 |
|
BLAKE2b-256 | 1ad850eb0d78a48b43c1c44323d4b46a73a6fea8b3357e427ad03cc39834070c |
File details
Details for the file met_annot_unifier-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: met_annot_unifier-0.0.7-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295e43f69e8d0579c114ff899ac479c801ce219cad39117dc38d5382aebf9312 |
|
MD5 | 3a8631e3ac4e76d77a7b8bea561a41d2 |
|
BLAKE2b-256 | 4dffb9c8fed0702fc4b9d1d176e321195f138d9e8e84a289b6cb5e4e6f680a27 |