Finishing up of Optimal Nucleotide Sequence Alignment simulation

Gregory Taylor (rgtaylor@interactive.net)
Thu, 03 Jun 1999 14:15:13 -0400


Hi Jon,

I am scheduled to speak briefly on Friday, July 9 at DIMACS Reconnect 99
on
the writing of a module. I would prefer to focus on the writing of my
LINK
simulation, which is almost finished. I need to finish it right away.
Conse-
quently, I have a couple of questions, answers to which might speed
things up
for me considerably. I have all the LINK documentation. You may also
refer to graph-menu.stklos
of course.

Question #1. First, there is a problem with the proliferation of graph
views. I would like
to do the following. A graph view would be generated. A message window

would appear telling the user to strike any key to continue. After
observing
the graph view for a time, the user would strike a key, causing both the
graph
view and the message window to disappear. I know how to produce both
the graph
view and the message window. It is getting them to disappear on key, so
to
speak, that has eluded me. As for the graph view itself, I will want to
be
able update it subsequently. So it is not a matter of destroying it as
an
object. My problem is only that I currently am looking at all of the
updates,
whereas I want only the most recent one.

Question #2. I am not getting color but, rather, just gray-scaling. Is
there
something I need to do first to initialize coloring?

Question #3. At a given point in the simulation,
I have three red edges within a grid. A message appears on the screen
inviting
the user to click on one of the three edges (see prompt below). I would
like
to assign the selected edge to a variable selected-edge and then recolor
things.
I have attempted the assignment with

let* (
(selected-edge (select-edges gv))
...
)

But I doubt that I have the semantics of select-edges right. Most
likely, it
is returning a list of all edges rather than a single selected edge. Is
there some
way to do what I am trying to do? If not, I can use radio buttons to
make the
assignment, I suppose.

; This function extends the optimal alignment path by one edge. Since
the
; path is being reconstructed from bottom right to upper left, this
means
; that a single edge (horizontal, diagonal, or vertical) will be added
at
; the front of the path.
(define (extend-path-by-one-edge vi gv num-rows num-cols)
(let* (
(e1 (edge-from-left vi (edges gv) gv))
(e2 (edge-from-above-left vi (edges gv) gv num-cols))
(e3 (edge-from-above vi (edges gv) gv num-cols))
(prompt "Click on a red edge so as to extend the path from lower
right to upper left.\n The selected edge should be such that
source-value + edge-weight = target-value")
)
(set! (color e1) "red")
(set! (color e2) "red")
(set! (color e3) "red")
(update-labels-and-generate-message-window prompt gv)
(let* (
***** (selected-edge (select-edges gv))
(verts-of-e (vertices (edge selected-edge)))
(source (ref verts-of-e 0))
)
(set! (color e1) *link:default-edge-color*)
(set! (color e2) *link:default-edge-color*)
(set! (color e3) *link:default-edge-color*)
(set! (color selected-edge) "cyan")
(set! vi source)
)
)
)

I think that the simulation will be pretty good once it is all
finished. Although he has been a fair amount of work, certain things
turned out to be very easy--in particular, data entry boxes. Thank you
for making that so easy. Will you be at Rutgers this summer?

My best,

Greg Taylor