Skip to main content

A python package for working with string-db.org aliases (gene and protein ID mapping).

Project description

A python package for working with string-db.org aliases (gene and protein ID mapping).

This package is specifically for working offline using downloaded files. For accessing the STRINGdb API instead, see for example the stringdb package.

Usage

Mapping HGNC symbols

First, download the aliases and info files from string-db.org:

$ wget https://stringdb-static.org/download/protein.info.v11.5/9606.protein.info.v11.5.txt.gz
$ wget https://stringdb-static.org/download/protein.aliases.v11.5/9606.protein.aliases.v11.5.txt.gz

Then, initialize our mapper object with the downloaded files, and map lists of IDs

from stringdb_alias import HGNCMapper

mapper = HGNCMapper('9606.protein.info.v11.5.txt.gz', '9606.protein.aliases.v11.5.txt.gz')

print(mapper.get_string_ids(['ADCK2', 'TOMM7', 'PRODH']))

The mapper always returns a pandas Series. This is convenient for directly mapping a column in a DataFrame. Moreover, if the input list is a pandas Series, the index is preserved in the output.

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

stringdb_alias-1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

stringdb_alias-1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file stringdb_alias-1.0.tar.gz.

File metadata

  • Download URL: stringdb_alias-1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

File hashes

Hashes for stringdb_alias-1.0.tar.gz
Algorithm Hash digest
SHA256 da517960b272a743334638de879ac83b5a94e2ed485d23d416dd429054d7559a
MD5 3eeab5b438b052bc23cd425dc88e9dd8
BLAKE2b-256 d5303b0767543f29d2e6db4950e4e1157ff758063751ddbb07dec8b463008536

See more details on using hashes here.

File details

Details for the file stringdb_alias-1.0-py3-none-any.whl.

File metadata

  • Download URL: stringdb_alias-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

File hashes

Hashes for stringdb_alias-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de1a65451e8150c510e8cfb27c4e8808711d0755b46a4420625bd9f3ea09dc44
MD5 f9eb00f0475ee744f6e78e55523c5e5f
BLAKE2b-256 5b8c6759fedda0edaa6a3cabdc16bec09617a44818541f5ca5a4d813aee5a345

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