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.
Metadata
Release files for ispcr 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ispcr-0.9.1.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ispcr-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / ispcr-0.9.1.tar.gz
| Download URL | ispcr-0.9.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5315fd89af62811b2b60f1150f6a60c8289db4c6519621842a983be0475f69c6
|
|
BLAKE2b-256 checksum How to use checksums |
108461b5d80b886ec6e3cc98e060a35465b9d2b6cc6f0f2daafef3301e41ff99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.9 Linux/5.15.0-1024-azure
|
Release files / ispcr-0.9.1-py3-none-any.whl
| Download URL | ispcr-0.9.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db78eb0d7dc7e8fd9ac79adc734a72735d3a5b6edc42a617ad30df78f821d529
|
|
BLAKE2b-256 checksum How to use checksums |
def509b366d60afb3a413b7927a57aaca939adacaf8a7c344f5e8de8fd319698
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.10.9 Linux/5.15.0-1024-azure
|