Do sequences ka ek full optimal alignment (Smith–Waterman algorithm) lengths m aur n ke liye lagbhag O(mn) time leta hai. Apni query ko N letters ke database ke saath compare karne mein O(m⋅N) lagta hai — aur Nbillions mein hone se yeh bahut zyada slow ho jaata hai.
Step 1 — Query ko words (k-mers) mein toddo.
Query ko overlapping words of length ==w== mein kaata jaata hai (default proteins ke liye w=3, DNA ke liye w=11).
Yeh step kyun? Words woh chhote anchors hain jinhe hum ek pre-built index mein instantly lookup kar sakte hain.
Step 2 — Similar words ki ek neighborhood banao.
Har query word ke liye, un saare words ki list banao jo ek substitution matrix (jaise BLOSUM62) use karke uske against score ≥T (threshold) karte hain. Toh word PQG near-neighbours jaise PEG, PKG bhi generate karta hai.
Yeh step kyun? Homologs mein sirf identities nahi, substitutions bhi hoti hain — scored neighbours allow karne se door ke relatives bhi pakad mein aate hain.
Step 3 — Database ko kisi bhi neighbourhood word (seeds) ke exact hits ke liye scan karo.Yeh step kyun? Database ki koi bhi position jo ek neighbourhood word se match karti hai, woh start karne ke liye ek promising jagah hai.
Step 4 — Har seed ko dono directions mein extend karo (ungapped, phir gapped).
Tab tak extend karte raho jab tak running score badhta rahe; ek set amount (X-drop) se zyada girane par ruk jaao aur wapas trim karo. Isse ek High-scoring Segment Pair (HSP) milta hai.
Yeh step kyun? Hum effort sirf real matches ke paas karte hain, random regions par nahi.
Step 5 — Alignment ko score karo.S=∑aligned pairss(ai,bi)−(gap penalties)
jahan s(a,b) substitution matrix se aata hai (likely substitutions ke liye positive, unlikely ke liye negative).
Step 6 — Statistical significance assess karo (E-value).
Neeche dekho — yeh woh part hai jo students sabse zyada galat samajhte hain.
Jitna bada search space m×n, utna zyada chance kisi random high score ke liye → E∝mn. (Bada haystack search karo, zyada lucky matches expect karo.)
Zyada score S chance se reach karna exponentially mushkil hai → e−λS factor. Random alignment scores ek extreme-value (Gumbel) distribution follow karte hain, jiska tail e−λS ki tarah decay karta hai.
Bada search space ek given score tak random alignment ke liye zyada opportunities deta hai
Substitution-matrix score s(a,b) kya represent karta hai?
Ek log-odds ratio: homologs mein observed pair frequency ka chance se expected frequency se log
Scoring mein logarithms kyun use karte hain?
Taaki per-position scores alignment ke saath add ho sakein (log probabilities ke product ko sum mein badal deta hai)
Kaun sa BLAST program: unknown DNA vs protein database?
blastx (DNA ko 6 frames mein translate karta hai, proteins search karta hai)
PSI-BLAST distant homologs kaise detect karta hai?
Yeh initial hits se ek position-specific scoring matrix (PSSM) banata hai aur iteratively re-search karta hai
Low-complexity masking kya prevent karta hai?
Repetitive/simple regions jaise poly-A ya poly-Q se false high-scoring hits
Chhote E ke liye E aur p-value ka approximate relation?
p ≈ 1 − e^(−E) ≈ E
Recall Feynman: 12-saal ke bachche ko explain karo
Tumhare paas ek ajeeb sa word hai aur tum jaanna chahte ho iska matlab, lekin koi definition nahi hai — sirf ek badi library of known words hai. Har kitaab padhne ki jagah, tum apne word ke chhote chunks dhundho jo library ke chunks se match karte hain ("seed" clues). Jab chunk milta hai, tum ussse bahar ki taraf padhte ho dekho ki poora word kitna match karta hai. Agar koi library word almost perfectly match karta hai, toh tumhara ajeeb word probably wahi matlab rakhta hai (woh "cousins" hain). BLAST yeh bhi batata hai: "Kya yeh match sirf luck ho sakta hai?" — agar yeh kehta hai "tum yeh basically kabhi luck se nahi paate" (ek super-tiny E-value), toh tum trust kar sakte ho.