Skip to main content

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
example/output-table.png
  • 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)
example/mutation-rate.png

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

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

library_simulator-0.1.tar.gz (104.8 kB view hashes)

Uploaded Source

Built Distributions

library_simulator-0.1-py3.6.egg (18.9 kB view hashes)

Uploaded Source

library_simulator-0.1-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

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