SeqDesign is a generative, unsupervised model for biological sequences. It is capable of learning functional constraints from unaligned sequences in order to predict the effects of mutations and generate novel sequences, including insertions and deletions. For more information, check out the biorxiv preprint.
This version of the codebase is compatible with Python 3 and PyTorch.
It also implements Fast Wavenet generation.
A TensorFlow version is available here
See INSTALL.md.
See the examples directory for examples of training, mutation effect prediction, and generation.
Run each script with the -h
argument to see additional arguments:
Given a fasta file of training sequences, run:
run_autoregressive_fr --dataset <your_dataset>.fa
Sequences are uniformly weighted by default. To set sequence
weights, append :
and a weight to each fasta header, e.g. :1.0
.
Deterministic:
calc_logprobs_seqs_fr --sess <your_sess> --dropout-p 1.0 --num-samples 1 --input <input>.fa --output <output>.csv
Average of 500 samples:
calc_logprobs_seqs_fr --sess <your_sess> --dropout-p 0.5 --num-samples 500 --input <input>.fa --output <output>.csv
generate_sample_seqs_fr --sess <your_sess>
Use the --fast-generation
argument for Fast Wavenet.
See the examples directory to download training sequences, mutation effect predictions, and generated sequences.