Developer Preview: Recipes

Started by Seth Cooper

Seth Cooper Staff Lv 1

A new developer preview is available for you to check out our upcoming features. The main new feature to test out is "recipes", which will allow you to automate the things you do.

You can find out how to try it out by reading the FAQ.  A change-log is available (in the resources directory).  Keep in mind that there may be unresolved bugs and crashes in the developer preview! Use it at your own risk.  Please report problems in the feedback tracker under developer preview.

steveB Lv 1

Hello,

1) Are there any instructions available for the recipe system ?

2) Without "restore to best" as a programmable option in the recipes, the automation is pretty much useless - a programmed action which drops your score cannot be undone in any way.

infjamc Lv 1

While the recipe system looks nice, one problem I see with it is that there is no easy way to repeat a set of instructions over and over if the task to be done is meant to be applied to an entire range of amino acids.

For example, I don't see an easy way to implement something like this:


Name: Apply 2-residue local wiggle to entire protein

Intended task: As the name suggests, it does local wiggles to the entire protein, 2 residues at a time; when the local wiggle is being conducted, the rest of the protein would be locked.


Pseudocode:
Lock all residues
Unlock residues 1 and 2
For i from 1 to (num_amino_acids_in_protein - 1)
{
    Local wiggle until the score stops increasing
    Restore best
    If (i + 2) <= (num_amino_acids_in_protein):
        Lock residue i, then unlock residue (i+2)
        // This shifts forward the frame of local wiggle
        // by one residue, e.g. from 1-2 to 2-3.
}
Unlock all residues [optional]


==> With the system as it stands, the closest I could do is to expand the "for" loop by repeating what's inside the loop 100 times (which is hardly practical) and replacing the "local wiggle until score stops increasing" step to "do 25 iterations" (which is a compromise that I could accept since my original algorithm would require the program to constantly compare the two latest scores). Then again, am I asking for too much because that would basically require the implementation of a programming language?

zoran Lv 1

we can easily add restore best to the set of instructions, but it's not clear how you can use it effectively in a recipe.  can you provide an example?

zoran Lv 1

one of the options when you select a set of residues to act on is something that resembles a loop structure (indicates the beginning and the stride of the selection).  could you let us know if you could use it to achieve 2-residue local wiggle?

infjamc Lv 1

This is what I ended up with:

Pseudocode:

Lock all residues
Unlock residues by stride, start 1 step 3
Unlock residues by stride, start 2 step 3
//These steps would unfreeze residues 1-2, 4-5, 7-8, etc.

Local wiggle residues by stride, start 1 step 3, for 1 iteration
Shake
Lock residues by stride, start 1 step 3
Unlock residues by stride, start 3 step 3
//Now the unlocked residues are 2-3, 5-6, 8-9, etc.

Local wiggle residues by stride, start 2 step 3, for 1 iteration
Shake
Lock residues by stride, start 2 step 3
Unlock residues by stride, start 4 step 3
//Now the unlocked residues are 3-4, 6-7, 9-10, etc.

Local wiggle residues by stride, start 3 step 3, for 1 iteration
Shake
Unlock all residues


==> This works, but the problem is that local wiggle sometimes loses points. So, the ability to restore best after wiggling each segment, not just after the end of the entire iteration, is needed.

Migi Lv 1

If I try the code that infjamc supplied above, but it doesn't work for me: the local wiggle never stops, even though I tell it to go for only one iteration (I double-checked and it definitely says "1" and not "infinity"). Maybe it's best if an iteration has a maximum duration? What is an "iteration" actually?