Async Bioservices
Description
async_bioservices is a utility package for COMO. Its purpose is to provie true
asynchronous access to the Bioservices package. This is done by
wrapping the synchronous functions in asyncio tasks. Currently, the only function this package provides is a wrapper
around the db2db function in Bioservices.
Installation
To install async_bioservices, you can use pip:
pip install async_bioservices
Usage
To use async_bioservices, simply import the fetch_gene_info function and call it with the relevant parameters
from async_bioservices.fetch import fetch_gene_info
from async_bioservices.input_database import InputDatabase
from async_bioservices.output_database import OutputDatabase
from async_bioservices.taxon_id import TaxonID
fetch_gene_info(
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
async_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 | - |
Metadata
Release files for async-bioservices 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| async_bioservices-2.1.0.tar.gz | 10.3 kB | Without provenance | Details for async_bioservices-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| async_bioservices-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for async_bioservices-2.1.0-py3-none-any.whl |
Total release size: 21.3 kB
Release files / async_bioservices-2.1.0.tar.gz
| Download URL | async_bioservices-2.1.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72c696e64e2986843d63c0aab114e3a26dd5c3608ca963bc90e633c01aa7ed10
|
|
BLAKE2b-256 checksum How to use checksums |
c738f8ea8e8fb30c47701caf0029d95248c79b70b8722ca01fbc0565d31c78bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.11 Linux/6.2.0-1015-azure
|
Release files / async_bioservices-2.1.0-py3-none-any.whl
| Download URL | async_bioservices-2.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84f834f0bc212aeb84e51019d7fe575d0a4b5bf47a0061ce8f8ddcfa9b9757d6
|
|
BLAKE2b-256 checksum How to use checksums |
e06461cfbdedb1231c6df1a32ccca0b63958ecebebd6e3ee1e4dd9fec5db6f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.11 Linux/6.2.0-1015-azure
|
Security for async-bioservices 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.