Biobricks automates bioinformatics data.
Project description
BioBricks
Biobricks automates bioinformatics data.
Installation
$ pip install biobricks
Usage
BioBricks is a tool to load data from biological datasets in an easy and automated way.
To import BioBricks package use:
import biobricks as bb
The first time you use BioBricks package, an initialization is required with the following process.
- Set an environment variable
BBLIB
in your shell with the desired location path of BioBricks library. Be sure you have enough available space to save locally your bricks.
export BBLIB=/opt/biobricks
echo $BBLIB
- Obtain a BioBricks account from the following link: https://members.biobricks.ai/register. Go to your email an validate your account. Once you succefully login to BioBricks website go to the link https://members.biobricks.ai/token to obtain a token. Copy your token and use it in the following statement:
bb.initialize(<YOUR TOKEN>)
To download a brick and save it locally in your library use the function bb.pull
. As an example, with the following statement we can download the Tox21 data dataset
bb.pull('tox21')
Once the dataset is stored locally in the BioBricks library, you can load the data with bb.load
function.
tox21 = bb.load('tox21')
This function returns a SimpleNamespace
object with all the tables available in the dataset. The tables are store in pyarrow.Table
type. To list the available table the in the SimpleNamespace
object use:
tablenames = sorted(list(vars(tox21).keys()))
for tablename in tablenames:
print(tablename)
You can also check the avaible table with the autocomplete functionality in your python editor.
To convert a pyarrow table to a pandas data frame use the following statement:
ache_p4 = tox21.tox21_ache_p4.to_pandas()
To list the bricks currently available in the BioBricks GitHub repository you can visit:
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
Hashes for biobricks-0.0.31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94ab06241f31a8c64d0878b0a71f4037aeee3a877a5d831a4fbb3b40b90955f4 |
|
MD5 | 3b5afcdcb14f93663063c3a4bff51fc2 |
|
BLAKE2b-256 | 8750e7a40c56df86bc68648239f88d03dc8bcb95c35348d0e8afd91e273ae646 |