ExoPy python package
Project description
Exosomians
Getting Started
Installation
Installation with pip
To install the latest version from PyPI, simply use the following bash script:
pip install exopy
or you can clone this repository and install via setup.py file:
git clone https://github.com/Exosomians/exosomians
cd exosomians
python setup.py -q
Examples
Inference
You can use pre-trained models to make predictions on your own datasets
import exopy as exo
# Load the pre-trained model
model = exo.ml.ExoGRU.load('./saved_models/ExoGRU/exogru_best-v2.ckpt')
# Prepare dataset
data = model.prepare_data('/path/to/fasta/data.fasta', seq_key='seq')
# Get the predictions
df_results = model.predict(data, batch_size=128) # Results will be stored in a pandas dataframe
Train from scratch
import exopy as exo
exo.ml.ExoGRU.setup_dataset(path='/path/to/dataset/design.mat.csv',
seq_key='seq',
target_key='label',
fraction=1.0)
config = {
'activation_fn': 'relu',
'batch_size': 32,
'bidirectional': False,
'dropout_rate': 0.1,
'lr': 0.00011342016019358544,
'n_head_hidden': 512, 'n_head_layers': 2,
'n_hidden': 1024,
'n_layers': 1,
'network': 'exogru',
'use_batch_norm': True,
'use_layer_norm': False
}
model = exo.ml.ExoGRU(**config)
model.fit(max_epochs=2000,
train_size=0.8,
batch_size=128,
early_stopping_patience=5,
check_val_every_n_epoch=3,
save_path='./saved_models/ExoGRU/',
)
Sample Notebooks
Model | Path |
---|---|
ExoGRU | notebooks/training_demos/ExoGRU.ipynb |
ExoCNN | notebooks/training_demos/ExoCNN.ipynb |
ExoLSTM | notebooks/training_demos/ExoLSTM.ipynb |
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
exosomians-0.1.0.tar.gz
(30.0 kB
view details)
Built Distribution
File details
Details for the file exosomians-0.1.0.tar.gz
.
File metadata
- Download URL: exosomians-0.1.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.9.13 Linux/5.4.0-132-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36c2e6106424407d889e038fcd6028967f1ede9e6ae8e4f71ad5a8408c20027 |
|
MD5 | f37eabf639b80e561b97059b95a98cf2 |
|
BLAKE2b-256 | 50cc205e5a4c4f86988c9166653b64b0bd0a237982cdfd722dd0e3045d824106 |
File details
Details for the file exosomians-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: exosomians-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.9.13 Linux/5.4.0-132-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 529878f02b250c3d45f837653449820bf67a00811cdb9bd55e355cb16055150c |
|
MD5 | 8ee5ad0110558661fc0885f8794d3e4b |
|
BLAKE2b-256 | 0c2512cd23108af8615cbd79281f56ee88a10de22995a2ffad4f04dce0c486a4 |