Skip to main content

Simple in silico PCR

Project description

ispcr

PyPI PyPI - Python Version PyPI - License Coookiecutter - Wolt


Documentation: https://pommevilla.github.io/ispcr

Source Code: https://github.com/pommevilla/ispcr

PyPI: https://pypi.org/project/ispcr/


A simple, light-weight package written in base Python to perform in silico PCR to determine primer performance.

Currently in development

Installation

pip install ispcr

Demonstration

File-based in silico PCR

The main function to use in this package is get_pcr_products, which performs in silico PCR using two files:

  • primer_file - the path to fasta file containing your primers
    • This is currently limited to a fasta file containing two sequences, with the forward primer coming first and the reverse primer coming second
  • sequence_file the path to the fasta file containing the sequences to test your primers against

get_pcr_products will then iterate through the sequences in sequence_file and find all products amplified by the forward and reverse primer.

Refining results

You can also refine your results by using the min_product_length and max_product_length arguments, and only print out the columns you are interested in by using the cols argument. For example, if we're only interested in products between 100 and 250 bp and we only want the name of the sequence the product was amplified from, the length of the product, and the start and end position of the product in the sequence:

Writing out isPCR results to a file

get_pcr_products also takes an output_file argument. If provided, the results of the in silico PCR (including any product length restrictions or column selections) to that file. This will overwrite the file.

Sequence-based in silico PCR

The get_pcr_products function is a wrapper around calculate_pcr_product. The following arguments are required to run calculate_pcr_product:

  • sequence: the target sequence to test the primers against
  • forward_primer: the forward primer used to amplify the sequence
  • reverse_primer: the reverse primer (5'-3') used to amplify the sequence

sequence, forward_primer, and reverse_primer should be entered as FastaSequence objects. A FastaSequence is just a small convenience class to package a sequence with its header. An example run of calculate_pcr_products might look like:

calculate_pcr_product uses all of the same arguments as get_pcr_products, so you can filter results and select columns just as before:

This will also work with the output_file argument.

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

ispcr-0.9.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

ispcr-0.9.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ispcr-0.9.1.tar.gz.

File metadata

  • Download URL: ispcr-0.9.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.15.0-1024-azure

File hashes

Hashes for ispcr-0.9.1.tar.gz
Algorithm Hash digest
SHA256 5315fd89af62811b2b60f1150f6a60c8289db4c6519621842a983be0475f69c6
MD5 83bc3c0e2805cbe27933ef3f7ac515dd
BLAKE2b-256 108461b5d80b886ec6e3cc98e060a35465b9d2b6cc6f0f2daafef3301e41ff99

See more details on using hashes here.

File details

Details for the file ispcr-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: ispcr-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.9 Linux/5.15.0-1024-azure

File hashes

Hashes for ispcr-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db78eb0d7dc7e8fd9ac79adc734a72735d3a5b6edc42a617ad30df78f821d529
MD5 476d8a2f37733f0259f4495dd1001958
BLAKE2b-256 def509b366d60afb3a413b7927a57aaca939adacaf8a7c344f5e8de8fd319698

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page