Motifs
5 problems from Rosalind — Bioinformatics Textbook Track. Press Run on any block to execute it in your browser.
BA2C — Find a Profile-most Probable k-mer
solved Problem statement
The product down the profile's columns. Every entry here is non-zero so no window is ruled out, which is the situation pseudocounts exist to fix in the problems that follow.
BA2D — Implement GreedyMotifSearch
solved Problem statement
Greedy in the strict sense: each string picks what the current profile likes best and nothing is reconsidered. Fast, and wrong often enough that BA2E exists.
BA2E — Implement GreedyMotifSearch with Pseudocounts
solved Problem statement
One number different from BA2D. Without a pseudocount a base absent from a column makes every k-mer containing it impossible rather than unlikely. On this five-string sample the two versions actually tie at a score of 2 — the assertion says so rather than claiming an improvement the data does not show.
BA2F — Implement RandomizedMotifSearch
solved Problem statement
Seeded so the example is reproducible. Graded on the score reached rather than on one particular set, because several distinct sets tie at the optimum of 9 — asserting on the published one would be asserting on the seed.
BA2G — Implement GibbsSampler
solved Problem statement
Replaces one motif at a time rather than all of them, and draws in proportion to probability instead of taking the best — which is what lets it leave a local optimum. Rosalind's suggested 20 starts settles at 10 here; 200 reaches the optimal 9.