Skip to main content

A package to look at inserting DNA sequences into plasmids for cloning or PCR for SWBio DTP Data Science and Machine Learning Module

Project description

PlamidInsertChecker

Code for SWbioDTP Data Science and Machine Learning module

This is an installable python package that can be used to interrogate DNA sequences for restriction enzyme cutting sites. It can produce:
i. a table of cut sites with useful information on the number of cut sites, the cut site locations, the enzyme cut overhang, and the commercial suppliers
ii. a figure showing the cut locations on a plasmid or linear section of DNA

Installation

Create a virtual environment using your favourite tool, clone the repsotiory to obtain the data and install the package using pip

virtualenv env_plasmidin
source env_plasmidin/bin/activate
git clone git@github.com:bmm514/PlamidInsertChecker.git
pip install plasmidin

Basic useage

  1. Import required plasmidin Classes
from plasmidin.plasmidin import RSInserter
from plasmidin.plasmid_diagrams import PlasmidDrawer
  1. Input fasta file or bio python Seq() for plasmid and insert
plasmid_seq = 'path/to/plasmid_fasta.fa'
plasmid_linear = False
insert_seq = 'path/to/insert_fasta.fa'
insert_linear = True
remove_ambiguous_enzymes = True
  1. Run analysis on these to find restriction enzyme cut sites and show the enzymes of interest i.e. single cut enzymes
rsinserter = RSInserter(plasmid_seq, plasmid_linear, insert_seq, insert_linear, remove_ambiguous_enzymes)

rsinserter_XbaI_BamHI.shared_single_enzymes
  1. Select from the list appropriate restriction enzymes to cut
plasmid_cut_enzymes = ('EnzymeA', 'EnzymeB')
insert_cut_enzymes = ('EnzymeA', 'EnzymeB')
  1. Integrate insert sequence into plasmid sequence
rsinserter.integrate_seq(plasmid_cut_enzymes, insert_cut_enzymes)
  1. Analyse the output restriction sites and save a table of the restriction sites present
integrated_table = '/path/to/restriction_enzymes.csv'

rsinserter.integrated_rsfinder.save_enzyme_table(integrated_table, delimiter = ',')
  1. Create plasmid map for the integrated sequence
input_seq = rsinserter.integrated_rsfinder.input_seq
feature_info = rsinserter.integrated_rsfinder.feature_info
integrated_figure = '/path/to/integrated_restriction_map.pdf'

plasmid_drawer = PlasmidDrawer(input_seq, 'IntegratedSeq', feature_info)
plasmid_drawer.draw_gd_diagram(integrated_figure, 'circular', {'pagesize' : 'A4', 'circle_core' : 0.5, 'track_size' : 0.1})

Examples

See plasmidin_example.py for code to run and produce output from PlasmidInsertChecker:

python3 scripts/plasmidin_examples.py

This will use the example fasta files in data/ directory and produce output into plasmidin_output

Project details


Download files

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

Source Distribution

plasmidin-1.0.0.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

plasmidin-1.0.0-py3-none-any.whl (11.7 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