Metadata-Version: 2.4
Name: primer-designer-byao
Version: 0.1.0
Summary: An automated primer design pipeline for conserved regions with specificity validation
Author-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/whiteasyao/primer_designer
Project-URL: Repository, https://github.com/whiteasyao/primer_designer
Keywords: bioinformatics,primer-design,PCR,BLAST,MAFFT,Primer3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: biopython>=1.79
Requires-Dist: primer3-py
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: requests>=2.25.0
Requires-Dist: loguru
Requires-Dist: PyQt6
Requires-Dist: tenacity
Requires-Dist: diskcache
Requires-Dist: snakemake>=7.0
Requires-Dist: click
Requires-Dist: pyyaml
Requires-Dist: tqdm
Requires-Dist: openpyxl
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# Primer Designer

An automated bioinformatics pipeline for designing PCR primers targeting conserved genomic regions with built-in specificity validation.

## Features

- **Automated Workflow**: Integrates BLAST, MAFFT, and Primer3 into a seamless pipeline
- **Conservation Analysis**: Identifies conserved regions across homologous sequences
- **Specificity Validation**: Verifies primer specificity against NCBI databases
- **Graphical Interface**: User-friendly PyQt6 GUI for easy operation
- **Command-Line Tools**: Flexible CLI for batch processing and automation
- **Configurable Parameters**: Extensive customization via YAML configuration

## Quick Start

### Installation

```bash
# Step 1: Install Python package
pip install -e .

# Step 2: Set up bioinformatics tools (optional - automatic via Snakemake)
python setup_envs.py
```

**Important**: MAFFT and Primer3 are **automatically installed** when using Snakemake or the GUI. Manual setup is only needed if you want to use CLI tools directly. See [INSTALL.md](INSTALL.md) for details.

### Launch GUI (Recommended for Beginners)

```bash
primer-designer
```

The GUI handles all dependencies automatically through Snakemake.

### Run Pipeline via Snakemake

```bash
# First run: automatically creates Conda environments (may take 5-10 min)
snakemake --use-conda --conda-prefix ./envs -j 8

# Subsequent runs: fast execution using cached environments
snakemake --use-conda --conda-prefix ./envs -j 8 all
```

## Workflow Overview

1. **Remote BLAST**: Query NCBI to find homologous sequences
2. **MAFFT Alignment**: Align sequences and identify conserved regions
3. **Primer3 Design**: Design primers targeting conserved areas
4. **Specificity Check**: Validate primers against off-target binding

## Command-Line Tools

After installation, the following commands are available:

- `primer-designer` or `primer-designer-gui` - Launch graphical interface
- `primer-blast` - Run remote BLAST search
- `primer-mafft` - Perform MAFFT alignment and conservation analysis
- `primer-design` - Design primers using Primer3
- `primer-specificity` - Check primer specificity

## Configuration

Edit `config.yaml` to customize:

- NCBI email and API key
- BLAST parameters (database, e-value, hit list size)
- Conservation detection thresholds
- Primer design constraints (Tm, GC%, size)
- Specificity checking parameters

## Input Files

Place your FASTA files in `backend/tasks/fastas/` or configure paths in `config.yaml`.

## Output Files

- `blast/*.xml` - BLAST results in XML format
- `mafft/*.bed` - Conserved regions in BED format
- `mafft/*.fasta` - Multiple sequence alignments
- `primer/*.tsv` - Designed primer pairs
- `primer/*_specificity.tsv` - Specificity validation results

## Requirements

- Python 3.8+
- Conda (for bioinformatics tools)
- 4 GB RAM minimum (8 GB recommended)

## Documentation

- [Installation Guide](INSTALL.md) - Detailed setup instructions
- [Configuration](config.yaml) - Parameter reference

## License

MIT License - see [LICENSE](LICENSE) file for details.

## Citation

If you use this software in your research, please cite:

```
[Add citation information here]
```
