Skip to main content

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

Metadata

Release files for library-simulator 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for library-simulator 0.1
File Size Uploaded
library_simulator-0.1.tar.gz 104.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for library-simulator 0.1
File Interpreter ABI Platform
library_simulator-0.1-py3.6.egg Legacy Egg format - - Details
library_simulator-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 134.8 kB

Release files / library_simulator-0.1.tar.gz

Download URL library_simulator-0.1.tar.gz
Size 104.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6127e5d24c052780642f16ed709eaf3679478744e1beac0979070c39f5ae18
BLAKE2b-256 checksum
How to use checksums
cda7c158ac59badf554910f52d9136901af2092ecd8baea402df90db9f739cfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6

Release files / library_simulator-0.1-py3.6.egg

Download URL library_simulator-0.1-py3.6.egg
Size 18.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
f9b93d07375325e1eddda84f6746bd002747f588eb9f0af8acdd681391bc2398
BLAKE2b-256 checksum
How to use checksums
6175ad8239fcf3634c31cba87417a74e91f8cd60b124acef6dbca5f0fdca8da9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6

Release files / library_simulator-0.1-py3-none-any.whl

Download URL library_simulator-0.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0636c77f8469179e4817e8a2a71e68f27dc76245f5acc3ab1d72a0e5c22c3136
BLAKE2b-256 checksum
How to use checksums
5565f235b61bac5fb08fa48c913efaf3a2afef20ae13195ee821872ea52f20cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.6

Release history Release notifications | RSS feed

This release

0.1 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page