The Richard Gilder Graduate School embraces graduate training, post- doctoral fellowships, and undergraduate training programs at the Museum, through both independent activities and partnerships with universities.

Executing scripts

POY optimizes the execution of a script to reduce memory consumption. To illustrate this, let's look at the following very simple search:

read ("course.fasta")

build (3)

swap ()

select ()

If we run it interactively, line by line, then POY would:

build 3 trees using a random addition sequence.

swap those three trees using TBR.

select the best, unique trees from those stored in memory at the end of the swap.

At the peak of memory consumption, the program should have 3 trees in memory. Imagine that the script now looks as follows:

read ("course.fasta")

build (500)

swap ()

select ()

Then we would need to have enough memory capacity to hold 500 trees! This might not be possible.

However, this script can be executed differently:

500 times:

build 1 tree

swap it

compare with previous trees and select the best unique trees.

This would require, with high probability, only two trees in memory at the peak. This is exactly how POY will execute it. To test it, run the first script of item 1 in a single line. See how the program behaves slightly differently.

Notice that POY reports pipelines instead of simple builds, swaps, and search statements, and the estimated time does not correspond to each of these steps, but complete pipelines. A pipeline here includes both the
build and
swap steps.

Now test the following two scripts and see what effect they have:

wipe ()

read ("course.fasta")

build (3)

swap ()

report (treestats)

select ()

wipe ()

read ("course.fasta")

build (3)

swap (constraint)

select ()

wipe ()

read ("course.fasta")

build (3)

swap ()

perturb (transform (static_approx))

select ()

wipe ()

read ("course.fasta")

build (3)

swap ()

transform (static_approx)

perturb ()

select ()

In order to execute a script in the interactive console, write the commands in a file using notepad (or text edit), save it as a plain text file, and then use the command:

run ("script.txt")

You can include the run command in other scripts to call, for example, routines for searches or for support value calculations. Write a simple script and try to execute it in this way.