A command-line tool for designing CRISPR sgRNAs targeting Drosophila melanogaster genes using the SpCas9/NGG system.
Fetches gene sequences directly from the Ensembl REST API, scans both strands for NGG PAM sites, scores each candidate guide, and outputs a ranked list.
- Resolves gene symbols to Ensembl IDs automatically
- Fetches sequence with 200 bp flanking regions (for promoter-targeting guides)
- Scans both strands for NGG PAM sites
- Scores guides based on GC content, homopolymer runs, poly-T stretches, and 5' G preference
- Outputs ranked results to terminal and optionally to CSV
- Python 3.10+
requests
Install dependencies:
pip install requestspython sgrna_designer.py <gene_symbol> [--top N] [--output results.csv]# Design top 20 guides for the white gene
python sgrna_designer.py white
# Get top 10 guides and save to CSV
python sgrna_designer.py rosy --top 10 --output rosy_guides.csv| Argument | Description | Default |
|---|---|---|
gene |
Gene symbol (e.g. white, rosy, nos) |
required |
--top |
Number of top guides to report | 20 |
--output, -o |
Output CSV filename | none |
Guides start at a score of 100 and are penalised for:
- GC% outside 40–70% (-20)
- Homopolymer runs ≥ 4 nt (-15)
- Poly-T stretch
TTTT(-25, terminates U6 transcription) - No 5' G (-5, U6 promoter preference)
Results are printed to the terminal and optionally saved as a CSV with columns: guide_sequence, pam, strand, position_in_fetch, gc_percent, score, warnings.
- Designed for Drosophila melanogaster (dm6) and SpCas9 (NGG PAM)
- Requires internet access to query the Ensembl REST API
- Off-target analysis is not included — use tools like CRISPOR or Cas-OFFinder for that