A Python package for designing PCR primers
Project description
primerD
primerD: a Python package for designing and generating primers from DNA sequences. It helps molecular biologists and bioinformatics researchers quickly obtain primer candidates for PCR and gene amplification.
Features
- Generate forward and reverse primers from DNA sequences.
- Evaluate GC content and melting temperature (Tm) for each primer.
- Detect hairpins and homodimer formations.
- Interactive GUI for easy primer design.
- Save primer reports as CSV files and visualize results with plots.
Requirements
- Python >= 3.8
- pandas
- matplotlib
- primer3-py
Installation
pip install primerD .
## Usage:
After installing primerD, you can easily generate primers from a DNA sequence:
from primerD import generate_primers, GC_content, Tm
from Bio import SeqIO
# Option 1: Manual DNA input
sequence = input("Enter DNA sequence: ").upper()
# Option 2: Read from FASTA file (uncomment if needed)
# fasta_file = "example.fasta"
# sequence = ""
# for record in SeqIO.parse(fasta_file, "fasta"):
# sequence += str(record.seq).upper()
# Set primer length
primer_length = 18
# Generate primers
primers = generate_primers(sequence, primer_length=primer_length)
# Display primers with GC% and Tm
print(f"\nGenerated {len(primers)} primers (showing first 5):\n")
for i, p in enumerate(primers[:5], start=1):
gc = GC_content(p)
tm = Tm(p)
print(f"Primer {i}: {p} | GC%: {gc:.2f} | Tm: {tm:.2f}آ°C")
# Parameters
Parameter Type Description
sequence str DNA sequence from which primers will be generated. Must contain only A, T, C, and G.
primer_length int, optional The length of each primer. Default is 20.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
primerd-0.1.1.tar.gz
(4.7 kB
view details)
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 primerd-0.1.1.tar.gz.
File metadata
- Download URL: primerd-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb1226ec0fd8ce5fad0ae93bd27de5bde30d6cf702c41c4dd0b69c337c3dd0b
|
|
| MD5 |
d5aecd9f9d4cb4886686c227907f2613
|
|
| BLAKE2b-256 |
73a61cf84a2f5f8f23e362b24acb5ceb2e9b7d4cd29905f8cce8cfedd039c96c
|
File details
Details for the file primerd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: primerd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59010a712312b51383aba4a77b896251181e3bd83e2fc5e29c4fe2ab77df5ecb
|
|
| MD5 |
ce9c305b4326e01625092cdf91cc3292
|
|
| BLAKE2b-256 |
3aaf2ed30a13a2e201b970c00fabe9e0f38eee7db8ddfc32fba9da589d1a2540
|