This repository provides Python scripts for designing PCR and qPCR primers for gene knockout and RT-qPCR experiments. The scripts leverage primer3 and Biopython libraries to automate primer design for multiple genes based on GFF and FASTA input files.
-
Primer Design for Gene Knockout (KO):
- Automates the design of fusion PCR primers for creating gene knockouts.
- Generates primers optimized for
pyrGandptrAselection markers. - Ensures proper primer placement based on gene coordinates and strand orientation.
-
RT-qPCR Primer Design:
- Designs primers for RT-qPCR experiments.
- Includes functionality to create primers overlapping exon-exon junctions for genes with multiple exons.
- Provides detailed primer quality checks, including specificity and placement.
-
Error Handling:
- Scripts handle errors gracefully, logging problematic gene entries for review.
- Outputs diagnostic information to help refine input data or parameters.
-
Output Formats:
- Primer designs are saved in multiple formats:
- CSV files for easy review and downstream processing.
- GFF files for visualizing primer locations in genome browsers.
- Primer designs are saved in multiple formats:
-
Python 3.x
Ensure you have Python 3.x installed. -
Required Python Libraries
Install the required libraries usingpip:pip install primer3-py biopython
-
Files Required for Input:
- GFF file: Gene annotation file containing coordinates and feature information.
- FASTA file: Genome sequence file corresponding to the GFF file.
This script generates primers for fusion PCR to knock out all genes in a genome.
python cds_KO_primers.py <gff_file> <fasta_file><gff_file>: GFF file containing gene annotations.<fasta_file>: FASTA file containing the genome sequence.
*_KO_primers_pyrG_selection.csv: Primer designs forpyrGselection.*_KO_primers_ptrA_selection.csv: Primer designs forptrAselection.genes_with_errors: List of genes where primer design failed.primers.gff: GFF file showing primer locations.
This script generates primers for RT-qPCR, including primers overlapping exon-exon junctions for genes with multiple exons.
python qpcr_primers_overlapping_exons.py <gff_file> <fasta_file><gff_file>: GFF file containing gene annotations.<fasta_file>: FASTA file containing the genome sequence.
*_qPCR_primers.csv: Primer designs with details on product size, penalties, and specificity.genes_with_errors: List of genes where primer design failed.primers.gff: GFF file showing primer locations.
-
CSV Files:
- Contain primer sequences, penalties, product sizes, and additional metadata for each primer.
- Example columns:
primer name: Name of the primer.primer sequence: Primer sequence.penalty: Primer3 penalty score indicating primer quality.product size: Expected PCR product size.
-
GFF Files:
- Annotates primer locations in the genome for visualization in genome browsers.
- Example fields:
Name: Primer identifier (e.g.,gene-5F).strand: Indicates forward (+) or reverse (-) strand.
-
Error Logs:
genes_with_errors: Text file listing genes where primer design encountered issues.