Simple in silico PCR
Project description
ispcr
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_filethe 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 againstforward_primer: the forward primer used to amplify the sequencereverse_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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5315fd89af62811b2b60f1150f6a60c8289db4c6519621842a983be0475f69c6
|
|
| MD5 |
83bc3c0e2805cbe27933ef3f7ac515dd
|
|
| BLAKE2b-256 |
108461b5d80b886ec6e3cc98e060a35465b9d2b6cc6f0f2daafef3301e41ff99
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db78eb0d7dc7e8fd9ac79adc734a72735d3a5b6edc42a617ad30df78f821d529
|
|
| MD5 |
476d8a2f37733f0259f4495dd1001958
|
|
| BLAKE2b-256 |
def509b366d60afb3a413b7927a57aaca939adacaf8a7c344f5e8de8fd319698
|