Skip to main content

This is a multithreaded version of various BioServices functions

Project description

Multi Bioservices

PyPI - Version GitHub Workflow Status (with event) PyPI - Python Version Coveralls branch

Description

multi_bioservices is a utility package for COMO. Its purpose is to provie better multithreaded access to the Bioservices package. This is done by using ThreadPoolExecutors on the synchronous functions. Currently, the only function this package provides is a wrapper around the db2db function in Bioservices.

Installation

To install multi_bioservices, you can use pip:

pip install multi_bioservices

Usage

To use multi_bioservices, simply import the db2db function and call it with the relevant parameters

from multi_bioservices import db2db, InputDatabase, OutputDatabase, TaxonID

db2db(
    input_values=["1", "2", "3"],
    input_db=InputDatabase.GENE_ID,
    output_db=OutputDatabase.GENE_SYMBOL,
    taxon_id=TaxonID.HOMO_SAPIENS
)

Parameters

Parameter Type Required? Default Value Description
input_values list[str] Yes N/A The input values to convert
input_db InputDatabase Yes N/A The input type
output_db OutputDatabase or list[OutputDatabase] No tuple(OutputDatabase.GENE_SYMBOL.value,OutputDatabase.GENE_ID.value, OutputDatabase.CHROMOSOMAL_LOCATION.value The type to return
taxon_id TaxonID or int No TaxonID.HOMO_SAPIENS (9606) The taxonomy of the input type
quiet bool No False Should all output be suppressed?
remove_duplicates bool No False Should duplicates be removed from the returned dataframe?
cache bool No True Should cache be used?
delay int No 5 How long of a delay should be enforced if the API is accessed to quickly?
concurrency int No 8 (max 20) How many concurrent requests can be made at once?
batch_length int No 300 (max 500 if taxon_id is TaxonID.HOMO_SAPIENS) How many items should be converted at once?

Returns

multi_bioservices returns a dataframe with the input and output databases as column names. The index of the dataframe has been reset, starting at 0

An example dataframe is seen below

Index Gene ID Gene Symbol
0 0 -
1 1 A1BG
2 2 A2M
3 3 A2MP1
4 4 -

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

multi_bioservices-3.0.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

multi_bioservices-3.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file multi_bioservices-3.0.0.tar.gz.

File metadata

  • Download URL: multi_bioservices-3.0.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.11 Linux/6.2.0-1018-azure

File hashes

Hashes for multi_bioservices-3.0.0.tar.gz
Algorithm Hash digest
SHA256 30ac499c3c58ea82dfede9dd1dd53ea64c8ebd815dc8494a423ee8a75cbcb2aa
MD5 2750b10b2e2d9e160a05a0b2041bc9fa
BLAKE2b-256 4fbd30af7ded388d0c809a268a0f2217608557b45a7e76851220ff721cf91f96

See more details on using hashes here.

File details

Details for the file multi_bioservices-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: multi_bioservices-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.11 Linux/6.2.0-1018-azure

File hashes

Hashes for multi_bioservices-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9d0f0d42bc813b134c7a6b42c0d2907d4125e5646dfe80cbf3bf0d7ef9e1001
MD5 6acfb6d64ff1443f715ba5b7077bebb6
BLAKE2b-256 8b9eb175a541b0e3eac1c39758ab6d3be30c2935964976f90d3611030bd5b931

See more details on using hashes here.

Supported by

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