A pg_bio Case Study How a massive overnight batch script analyzing thousands of CRISPR variants found a mathematically perfect
0.0000structure clone of the Cas1 endonuclease.
Meet Methanosarcina mazei. This resilient archaeon makes its home in some of the most diverse and unglamorous environments on Earth—from deep-sea hydrothermal vents to sewage digesters and animal stomachs. Living in these extreme, highly competitive ecological niches, M. mazei is constantly bombarded by viral invaders (bacteriophages).
To survive this relentless onslaught, the organism needs an impeccable immune response.
The Problem: How Does Bacteria “Remember”?
The CRISPR immune system is famous for Cas9—the biological “scissors” that cut DNA. But cutting is only half the battle. How does the bacteria know what to cut? It needs a way to store memories of past infections.
Enter Cas1. Cas1 is the “memory engine” of the CRISPR system. It captures pieces of invading viral DNA and physically integrates them into the bacteria’s own genome. Think of it like a biological hard drive, creating a permanent, heritable memory of the infection. Without Cas1, the entire CRISPR system would have amnesia, rendering it useless against recurring viral threats.
Finding novel Cas1 engines in uncharted organisms is a holy grail for genome editing technologies, but these proteins can be heavily mutated over billions of years of evolution, making them hard to spot.
The Interactive Anchor: See the Clone
While processing our massive overnight discovery batch in the Dark Proteome—the vast reservoir of uncharacterized proteins—our pg_bio engine hit a flawless mathematical clone of Cas1.
Don’t just trust the math—trust your eyes. Double-click the 3D widget below to watch and interact with the physical structure. You can rotate and zoom to explore the beautiful butterfly-like architecture. The central cleft between the two lobes is where the viral DNA is physically captured and processed!
Known Bait (Cas1)
Our Discovery (Distance: 0.0000)
(The physical similarities are undeniable. A distance of 0.0000 represents a near-perfect structural clone!)
The Science: Syntax of the Dark Proteome
Our known target (the bait) was CRISPR-associated endonuclease Cas1 (Q8PSF4). Our search identified an orphan protein named A0A0F8G763 in M. mazei. An orphan protein is a protein that has no known function or recognizable domains in standard databases. It’s biological dark matter.
How can we be sure it’s Cas1? In biology, structure dictates function. When two proteins share a highly similar 3D shape, they are likely homologs—proteins that share a common evolutionary ancestor and perform similar roles. By looking beyond simple text sequences and comparing 3D shapes, we discovered that A0A0F8G763 is a structural homolog to our bait.
Often, researchers also look at synteny—the preservation of the order of genes on a chromosome—to confirm function. If an orphan protein is found right next to a Cas2 or Cas9 gene, it’s a strong contextual clue!
Did You Know? Methanosarcina mazei is one of the few organisms known to undergo horizontal gene transfer on a massive scale, essentially “stealing” useful genes from bacteria to adapt to diverse environments!
The Tech: Cosine Distance & SQL Vector Search
What used to take years of meticulous crystallization and gene-knockout studies was solved by a single SQL query running quietly overnight. By representing complex 3D protein structures as mathematical vector embeddings, we can calculate the cosine distance between them. A cosine distance of 0.0 means the vectors point in the exact same direction—they are structurally identical.
Here is the exact pg_bio query that uncovered this perfect clone:
WITH closest_structures AS (
-- STEP 1: AI Structural Search (pgvector)
SELECT uniprot_id, name, sequence, embedding,
(embedding <=> v_cas1_bait) as dist
FROM proteins
ORDER BY embedding <=> v_cas1_bait ASC
LIMIT 100
)
-- STEP 2: Relational Filtering & Classical Re-Ranking
SELECT c.uniprot_id, c.name, c.dist,
-- STEP 3: The Hybrid Operator (<~>)
-- Verifying the exact amino acid sequence alignment
(ROW(c.embedding, c.sequence)::bio_feature <~> ROW(v_bait, v_seq)::bio_feature) as hybrid_score
FROM closest_structures c
WHERE c.name ILIKE '%uncharacterized%' -- Filter for the Dark Proteome
AND c.dist <= 0.35 -- Structural confidence threshold
ORDER BY hybrid_score ASC
LIMIT 1;
A distance of 0.0000 combined with a mathematically rigorous Hybrid Score of 0.0436 confirms we just assigned a highly complex immune function to a previously mysterious string of DNA.
Related Discoveries
If you enjoyed reading about the CRISPR memory engine, check out our related post on Mining Cas9 in the Dark Proteome!
This automated discovery was generated by the pg_bio continuous discovery script.
Check out more of our pipeline’s findings in the Bioinformatics discoveries section!