We define an evolutionary trajectory from shape A to shape B as the following path in the space of shapes:
1) Determine the shape (of the sequence) which first gave rise to the target B. Output that shape and call it X.
2) Determine the shape (of the sequence) which first gave rise to that presence interval of X during which (a sequence folding into) X gave rise to B. Output that shape. If that shape is the initial shape A, then stop, otherwise call that shape B and continue with 2).
An important point to realize is that this definition of an evolutionary path is not identical to the shape series defined through the genealogy of sequences which led to B. However, our path captures the essence of the history of shape changes associated with an actual sequence genealogy.
Consider, for example, a path of shapes A-B-C (as defined above) with the following presence intervals:
------------- time ----------> 3 (a) A .... ---+--+--| |-------| | + 1 | + (b) B |----| |--+-------------+---------| |-------| |----| 2 | | C |--------- .....A sequence 1 folding into B first gave rise to a sequence folding into C at event (b). We next look up which sequence first gave rise to that particular presence interval of B, and find that this happened at event (a) through a sequence 3 with shape A mutating into a sequence 2 folding into the first B at that time.
The point to be aware of is that the actual sequence genealogy of 1 (the parent-offspring chain in sequence space leading up to 1) may not have passed through 2, but through some other sequences connecting shapes A and B (such as in the transition marked +++). Moreover, the parent-offspring chain from that transition up to sequence 1 may not have consisted only of sequences folding into B. The actual shape series based on the sequence genealogy could have been something like A-B-[some other shapes]-B-C. However, the series "[some other shapes]" repeatedly contains shape B and shapes derived from it; it stays close to the shape path reconstructed by our procedure. Most importantly, our shape path reconstruction contains all discontinuous transitions in a particular history towards a target. The reason is that these discontinuous transitions happened to be milestones (in retrospect, of course, and quite independently of whether they were fitness improving or fitness neutral) for reaching the target. The actual sequence genealogy must, therefore, have passed through sequences with these shapes. Our shape space path reconstruction is accurate in the discontinuous transitions, and it also tracks the relevant continuous transitions. When the latter are fitness neutral, the reconstruction often contains cycles in shape space. See for example, the shapes alpha, beta, gamma and delta which are repeatedly (re)discovered and lost in the fitness neutral phase between steps 19 and 27.