56
56
/** Edit script: linked list of correspondencies between two sequences */
57
57
typedef struct GapEditScript {
58
EGapAlignOpType op_type; /**< Type of operation */
59
Int4 num; /**< Number of operations */
60
struct GapEditScript* next; /**< Pointer to next link */
58
EGapAlignOpType* op_type; /**< Array of type of operation */
59
Int4* num; /**< Array of number of operations */
60
Int4 size; /**< Size of above arrays. */
63
63
/** A version of GapEditScript used to store initial results
86
86
} GapStateArrayStruct;
88
88
/** Initialize the edit script structure.
89
* @param old Pointer to existing edit script to which
90
* the new script will be appended
89
* @param size number of elements to allocate.
91
90
* @return Pointer to the new edit script
94
GapEditScriptNew (GapEditScript* old);
93
GapEditScriptNew (Int4 size);
96
/** Free all links of an edit script structure.
97
* @param esp Pointer to first link in the edit script [in]
95
/** Free edit script structure.
96
* @param esp Pointer to the edit script [in]
101
100
GapEditScriptDelete (GapEditScript* esp);
102
/** Duplicates the edit script structure.
103
* @param old object to be duplicated [in]
104
* @return Pointer to the new edit script
107
GapEditScriptDup (const GapEditScript* old);
109
/** Copies the portion of the GapEditScript specified by start and stop to a new one
110
* the new one should already exist.
111
* @param new_esp edit script to copy to [in|out]
112
* @param offset starting element in new one to copy to [in]
113
* @param old_esp edit script to copy from [in]
114
* @param start first element to copy from (zero-offset) [in]
115
* @param stop last element to copy [in]
116
* @return 0 on success
119
GapEditScriptPartialCopy(GapEditScript* new_esp, int offset, const GapEditScript* old_esp, int start, int stop);
103
121
/** Frees a preliminary edit block structure
104
122
* @param edit_block The edit block to free [in]
105
123
* @return Always NULL