Skip to main content

K-Sites: AI-Powered CRISPR Guide RNA Design Platform with Multi-Database Integration (GO.org, UniProt, KEGG), Exponential Decay Pleiotropy Scoring, Evidence-Based Filtering (IDA/IMP/IGI vs IEA), and RAG-Based Phenotype Prediction

Project description

K-Sites v1.2.0: Advanced CRISPR Guide RNA Design Platform

PyPI version Python 3.8+ License: MIT

K-Sites is a comprehensive CRISPR guide RNA design platform that integrates GO term analysis with KEGG pathway graph analytics to identify non-pleiotropic gene targets and design optimal gRNAs with pathway-aware off-target filtering.


๐ŸŒŸ Key Features

1. Multi-Database Integration

Queries GO.org, UniProt, and KEGG simultaneously using parallel processing for comprehensive gene data retrieval:

  • GO.org (QuickGO): Gene Ontology annotations with evidence codes
  • UniProt: Protein knowledgebase (function, domains, pathways)
  • KEGG: Pathway annotations and pathway counts
# Use all databases (default)
k-sites --go-term GO:0006281 --organism 9606 --output report.html

# Select specific databases
k-sites --go-term GO:0006281 --organism 9606 --output report.html --databases quickgo uniprot kegg

2. Pleiotropy Scoring Algorithm

Exponential decay scoring based on number of associated Biological Process GO terms:

Score = 10 ร— (1 - exp(-ฮป ร— (n-1)))

Where:

  • n = number of OTHER BP terms (excluding target GO term)
  • ฮป = 0.3 (decay rate)
  • Score range: 0-10 (0 = highly specific, 10 = highly pleiotropic)

Specificity Score: Inverse on 0-1 scale (1 = most specific)

Specificity = 1.0 - (Pleiotropy / 10.0)
k-sites --go-term GO:0006281 --organism 9606 --output report.html --max-pleiotropy 3

3. Evidence-Based Filtering

Distinguishes experimental evidence from computational predictions:

Evidence Type Codes Weight
Experimental IDA, IMP, IGI, IPI, IEP, HTP, HDA, HMP, HGI, HEP 1.0
Computational ISS, ISO, ISA, ISM, IGC, IBA, IBD, IKR, IRD, RCA 0.6
Prediction (IEA) IEA 0.3
# Experimental only (default)
k-sites --go-term GO:0006281 --organism 9606 --output report.html --evidence-filter experimental

# Computational only
k-sites --go-term GO:0006281 --organism 9606 --output report.html --evidence-filter computational

# All evidence types
k-sites --go-term GO:0006281 --organism 9606 --output report.html --evidence-filter all

4. RAG-Based Phenotype Prediction

Literature mining with semantic analysis:

  • PubMed integration: Real-time NCBI Entrez API queries
  • Semantic embeddings: SentenceTransformer (all-MiniLM-L6-v2)
  • Vector search: FAISS L2 distance indexing
  • Severity classification: LETHAL, SEVERE, MODERATE, MILD, UNKNOWN
  • Risk assessment: CRITICAL, HIGH, MEDIUM, LOW, UNKNOWN
k-sites --go-term GO:0006281 --organism 9606 --output report.html --predict-phenotypes --rag-report

5. CRISPR gRNA Design

  • Multi-Cas support: SpCas9, SaCas9, Cas12a, Cas9-NG, xCas9
  • Doench 2016: On-target efficiency scoring (20 position-dependent weights)
  • CFD Algorithm: Off-target prediction with position-weighted mismatches
  • Pathway-aware filtering: Prevents disruption of critical pathways

6. Cross-Species Validation

Validates gene specificity across model organisms:

  • 9606 - Homo sapiens (Human)
  • 10090 - Mus musculus (Mouse)
  • 7227 - Drosophila melanogaster (Fly)
  • 6239 - Caenorhabditis elegans (Worm)
k-sites --go-term GO:0006281 --organism 9606 --output report.html \
        --species-validation 9606 10090 7227

๐Ÿ› ๏ธ Installation

Prerequisites

  • Python 3.8+
  • Git

Install from PyPI

# Basic installation
pip install k-sites

# With RAG phenotype prediction support
pip install 'k-sites[rag]'

# With web application support
pip install 'k-sites[webapp]'

# With all features
pip install 'k-sites[all]'

Install from Source

git clone https://github.com/kkokay07/K-Sites.git
cd K-Sites
pip install -e .

Environment Variables

export NCBI_EMAIL="your.email@example.com"  # Required for NCBI API calls
export NCBI_API_KEY="your_ncbi_api_key"     # Optional for higher rate limits

๐Ÿš€ Usage

Command Line Interface

Basic Usage

k-sites --go-term GO:0006281 --organism "Homo sapiens" --output report.html

Advanced Usage with All Features

k-sites --go-term GO:0006281 --organism 9606 --output results/report.html \
        --use-graph \
        --max-pleiotropy 5 \
        --evidence-filter experimental \
        --species-validation 9606 10090 10116 \
        --predict-phenotypes \
        --rag-report \
        --databases all

Search GO Terms

k-sites --go-term-search "DNA repair" --organism "Homo sapiens" --output report.html

Programmatic API

from k_sites.workflow.pipeline import run_k_sites_pipeline

results = run_k_sites_pipeline(
    go_term="GO:0006281",  # DNA repair
    organism="9606",       # Human
    max_pleiotropy=3,
    use_graph=True,
    evidence_filter="experimental",
    species_validation=["9606", "10090"],
    predict_phenotypes=True,
    databases=["quickgo", "uniprot", "kegg"]
)

# Generate report
from k_sites.reporting.report_generator import generate_html_report
generate_html_report(results, "output_report.html")

๐Ÿ“Š Output Files

File Description
report.html Interactive HTML report with visualizations
report_comprehensive.csv Full results with all metrics
report_gene_summary.csv Gene-level summary statistics
report_grna_sequences.fasta gRNA sequences in FASTA format
report_sequences.gb GenBank format sequences
rag_reports/*.html Per-gene RAG literature analysis (with --rag-report)

โš™๏ธ CLI Options

Option Description Default
--go-term GO term to analyze (e.g., GO:0006281) Required
--organism Organism as TaxID or scientific name Required
--output Output HTML report path Required
--use-graph Enable Neo4j pathway analysis True
--no-graph Disable Neo4j, use GO-only mode -
--max-pleiotropy Max allowed pleiotropy (0-10) 10
--evidence-filter Evidence type: experimental/computational/all experimental
--species-validation Species for cross-validation 9606 10090 7227 6239
--predict-phenotypes Enable RAG phenotype prediction False
--rag-report Generate detailed RAG reports False
--databases Select databases: quickgo/uniprot/ncbi/pubmed/kegg/all all
--go-term-search Search GO terms by keyword -

๐Ÿ—๏ธ Architecture

k_sites/
โ”œโ”€โ”€ data_retrieval/       # Multi-database integration (GO, UniProt, KEGG)
โ”‚   โ”œโ”€โ”€ multi_database_client.py
โ”‚   โ”œโ”€โ”€ go_gene_mapper.py
โ”‚   โ””โ”€โ”€ organism_resolver.py
โ”œโ”€โ”€ gene_analysis/        # Pleiotropy scoring algorithms
โ”‚   โ””โ”€โ”€ pleiotropy_scorer.py
โ”œโ”€โ”€ crispr_design/        # gRNA design and scoring
โ”‚   โ””โ”€โ”€ guide_designer.py
โ”œโ”€โ”€ neo4j/               # Graph database integration
โ”‚   โ”œโ”€โ”€ graph_client.py
โ”‚   โ””โ”€โ”€ ingest_kegg.py
โ”œโ”€โ”€ rag_system/          # Literature-based phenotype prediction
โ”‚   โ””โ”€โ”€ literature_context.py
โ”œโ”€โ”€ reporting/           # Report generation
โ”‚   โ”œโ”€โ”€ report_generator.py
โ”‚   โ”œโ”€โ”€ csv_export.py
โ”‚   โ””โ”€โ”€ rag_report_generator.py
โ””โ”€โ”€ workflow/            # Pipeline orchestration
    โ””โ”€โ”€ pipeline.py

๐Ÿงช Testing

# Run all tests
python -m pytest tests/

# Run specific test modules
python -m pytest tests/test_non_pleiotropic_features.py
python -m pytest tests/test_crispr_design.py
python -m pytest tests/test_rag_phenotype.py

๐Ÿ“š Documentation


๐Ÿ‘ฅ Developers

  • Kanaka KK - Lead Architect
  • Sandip Garai - Neo4j Graph Integration Specialist
  • Jeevan C - CRISPR Algorithm Developer
  • Tanzil Fatima - Bioinformatics Analyst

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Thanks to the GO Consortium for gene ontology resources
  • Thanks to UniProt for protein knowledgebase
  • Thanks to KEGG for pathway data
  • Thanks to NCBI for biological databases (PubMed, Entrez)
  • Thanks to the Neo4j community for graph database technology

๐Ÿ“ˆ Version History

Version Date Key Features
1.0.0 2026-02-05 Initial release with core functionality
1.1.0 2026-02-13 Web application, RAG system, enhanced reporting
1.2.0 2026-02-13 Multi-database selection, RAG reports, improved CLI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

k_sites-1.2.1.tar.gz (109.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k_sites-1.2.1-py3-none-any.whl (105.5 kB view details)

Uploaded Python 3

File details

Details for the file k_sites-1.2.1.tar.gz.

File metadata

  • Download URL: k_sites-1.2.1.tar.gz
  • Upload date:
  • Size: 109.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for k_sites-1.2.1.tar.gz
Algorithm Hash digest
SHA256 1a54ea86fb39b8b389940bb43e59af67aff6fdff07315301e4569c444084235c
MD5 47c6be81b87c8e2034f2def91b06dfa5
BLAKE2b-256 9c119c696c3828c1823a04b31f01ad9d3df90606df47ebd2d724d13b141ebec2

See more details on using hashes here.

File details

Details for the file k_sites-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: k_sites-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 105.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for k_sites-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bb4dc5113bef3a99a4e87683aaaecaa2f1bf9dc9ac634f21cc2dfb36f050206
MD5 3a6c32b91c49401fc1875718bf0318b3
BLAKE2b-256 143ec05c0e2f46d5555e413e84f125cac3a251f8da9f66b1085ce3a5abe77e4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page