vineetsk1 / Switch-Strategies

Implementations of the strategies for Eternabot switches.
0 stars 2 forks source link

[Strategy Market] [Switch] Elements: Obligatory switching base pairs in MS2/FMN switches #8

Open vineetsk1 opened 9 years ago

vineetsk1 commented 9 years ago

Original Author: Eli Fisker Original Link: https://getsatisfaction.com/eternagame/topics/-strategy-market-switch-obligatory-switching-base-pairs-in-ms2-fmn-switches

Intro

As a rule of thumb the obligate switching base pairs in a MS2/FMN switch are following:

The 3 base pairs after the switching end of the aptamer are mandatory, since they needs to be filled to make a legal solve in the energy model. These 3 bases needs to be forming in the one state, but breaking in the other.

Also the 7 base pairs of the MS2 hairpin are obligatory. The MS2 needs to be breaking in one state and forming in the other.

So that’s 10 base pairs all in all.

By switching base pairs I mean base pairs that are not going to stay the same between the two states. Each state can have a different amount of actual switching base pair. Like state 1 may have 10 base pairs that are involved in the switching, but in state 2 there may actually be 12 base pairs involved in the switching. So by obligate switching base pairs I'm trying to hit down on those that needs to get moving anyway.

Now all the base pairs in the MS2 hairpin don’t always need to be switching - as it is sometimes enough that just a few of them break open - so the actual switching number can be lower. But that's fairly okay.

But generally most of the top scoring switches have their number of actual switching base pairs very close to these 10 base pairs. Not much above or much below. That is if the switch is a partial and not a full moving switch or have a full moving aptamer. So it is possible getting a switch moving with more base pairs, but I still consider it harder to get a well controlled switch with the whole switch moving. So this is the motivation behind the strategy.

Strategy

I wish to give bonus to designs that keeps the amount of switching base pairs at a minimum, and increase penalty for designs that has huge amount of base pairs switching. This goes for both turn on and turnoff labs. Either state included.

I wish to reward all designs that has the obligatory amount of 10 switching bases or less.

Slightly decrease reward for designs that has up to 12 switching base pairs

For designs that has more than 12 switching base pairs, start penalize and increase penalty it as the number goes higher.

MicroRNA’s are excluded since they obviously :) needs a bigger amount of switching base pairs due to need to switch between no microRNA in one state and pairing up with most of a 22 nucleotide long sequence in next.

Perspective

In exclusion labs there tends to be a bit fewer base pairs in the second state than the 1. But instead of accounting for that here, I will write another strategy that should take care about the differences in switching base pairs between the states.

Background articles

Different types of switches

vineetsk1 commented 9 years ago

Implemented with 14 lines of code.

vineetsk1 commented 9 years ago

Updated with different variations and PEP8 format for readability:

Variation A: 22 lines of code.

Variation B (unmodified): 19 lines of code.

Variation C: 21 lines of code.