Git Product home page Git Product logo

multi_bioservices's Introduction

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.biodbnet 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 -

multi_bioservices's People

Watchers

Josh Loecker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.