With the help of the commands explained below, a sequence may be modified in many ways: the starting point can be moved to another place; the order of elements can be inverted; elements can be inserted one by one, or as a whole group with one single command; single elements, or classes thereof can be removed; elements can be replaced by others; finally, the sequence can be "flattened", i.e. all inserted sequences are replaced by their actual elements, such that a flattened sequence contains only elements. It is good practice to add a flatten; statement at the end of a seqedit operation to ensure a fully operational sequence. And this is particularly useful for the save command to properly save shared sequences and to write out in MAD-8 format.
seqedit, sequence=s_name;selects the sequence named for editing. The editing is performed on the non-expanded sequence; after having finished the editing, one has to re-expand the sequence if necessary.
extract,sequence=s_name,from=MARKER_1,to=MARKER_2,newname=p;From the sequence named "s_name" is extracted a new sequence with name "p" starting from MARKER_1 and ending at MARKER_2. The new sequence "p" can be USEd as any other sequence. It is declared as "shared" and can therefore be combined E.G. into the cycled original sequence.
flatten;This command includes all sequences in the sequence being edited, if any. The resulting sequence contains only elements.
install, element=name,class=class_name,at=real,from=place|selected;where the parameters have the following meaning:
select,flag=seqedit,class=.., pattern=.., range=..;
move, element=name|selected,by=real,to=real,from=place;
remove, element=name|selected;
cycle,start=place;This makes the sequence start at the place given, which must be a marker.
In the case there is a shared sequence in the used sequence, the command FLATTEN has to be used before the command CYCLE. Example:
flatten ; cycle,start=place;
reflect;This inverts the order of element in the sequence, starting from the last element.
If there are shared sequences inside the USEd sequence, the command FLATTEN must be used before the command REFLECT. Alternatively each shared sequence must first be reflected. Example:
flatten ; reflect;
replace,element=name1|selected,by=name2;Element with name1 is replaced by element with name2. If name1 is "selected", then all elements selected by SELECT commands will be replaced by the element name2.
endedit;terminates the sequence editing process. The nodes in the sequence are renumbered according to their occurrence which might have changed during editing.
hansg, June 17, 2002