Skip to content

Build dynamical deep models for transcriptional biophysics

License

Notifications You must be signed in to change notification settings

GreshamLab/supirfactor-dynamical

Repository files navigation

supirfactor-dynamical

PyPI version CI codecov

This is a PyTorch model package for creating dynamical, biophysical models of transcriptional output and regulation.

Installation

Install this package using the standard python package manager python -m pip install supirfactor_dynamical. It depends on PyTorch and the standard python scientific computing packages (e.g. scipy, numpy, pandas).

Usage

from supirfactor_dynamical import (
    SupirFactorBiophysical
)

# Construct model object
model = SupirFactorBiophysical(
    prior_network,                  # Prior knowledge connectivity network [Genes x TFs]
    output_activation='softplus'    # Use softplus activation for transcriptional model output
)

# Set prediction parameter
model.set_time_parameters(
    n_additional_predictions=10     # Make forward predictions in time during training
)

# Train model
model.train_model(
    training_dataloader,            # Training data in a torch DataLoader
    500                             # Epochs
)

# Save model
model.save("supirfactor_dynamical.h5")

Examples containing data loading, hyperparameter searching, and result testing are located in ./scripts/

About

Build dynamical deep models for transcriptional biophysics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages