Skip to main content

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 exosomians

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


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.1.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

exosomians-0.1.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file exosomians-0.1.1.tar.gz.

File metadata

  • Download URL: exosomians-0.1.1.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

Hashes for exosomians-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4704da2407b589817081964864033a4d1fbacfc736c81689d2f513f5b6ef0b58
MD5 da054e6952e336a2ffa200c6a6cb332f
BLAKE2b-256 f3e6782459d73ad4f4eb4bdfe82e9943c7fed633b5f10196b9c72a98e1bf6d69

See more details on using hashes here.

File details

Details for the file exosomians-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: exosomians-0.1.1-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

Hashes for exosomians-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 877f44c73d82ddcc9c3ee6c146cd7502e404823442f6f92f441b51419f316d29
MD5 8139ff08ac5d580988b3c390e902b79f
BLAKE2b-256 660971dab6960fe4bea394fed73526598b9a69c02702f066fbab9bf8a5945e4e

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