Python software package for simulating random mutagenesis experiments
Project description
Library simulator is a python package for generating random mutagenesis libraries given a nucleotide sequence and error-prone polymerase.
Examples
Create a library
from library_simulator import LibrarySimulator
lib = LibrarySimulator("example.fasta",mutation_spectrum="published")
lib.simulate(num_samples=10,mutation_rate=2)
lib.clones
aa: amino acid changes (
*
: new stop codon)base: base changes (
-
and+
are insertions and deletions)num: total number of amino acid changes (could be a huge number if there is an early stop or indel)
indel: whether or not there is an indel
stop: whether or not there is new stop codon
start: whether or not the real start codon was messed up
Find the frequencies of classes of mutants versus mutation rate
from library_simulator import LibrarySimulator, util
lib = LibrarySimulator("example.fasta",mutation_spectrum="published")
f_v_r = util.freq_vs_mutation_rate(lib,num_samples=10000)
util.plot_freq_vs_mutation_rate(f_v_r)
See example/examples.ipynb
for more functionality.
Installation
pip install library_simulator
Assumptions
The number of mutations per clone is determined by a Poisson process.
The sites mutated are independent within a clone and between clones
The probability of each possible mutation (A->T, G->C, etc.) is determined by the enzyme, not the sequence. The profiles for different enzymes are found in:
library_simulator/mutation_spectra
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 Distributions
Hashes for library_simulator-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0636c77f8469179e4817e8a2a71e68f27dc76245f5acc3ab1d72a0e5c22c3136 |
|
MD5 | 27f7d7125f6b249e60ace9426f80b8ca |
|
BLAKE2b-256 | 5565f235b61bac5fb08fa48c913efaf3a2afef20ae13195ee821872ea52f20cc |