Changeset 6269 for branches/clusters/SL/FAST_ALIGNER/ClustalV.cxx
- Timestamp:
- 23/11/09 08:54:41 (3 years ago)
- Files:
-
- 1 modified
-
branches/clusters/SL/FAST_ALIGNER/ClustalV.cxx (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/clusters/SL/FAST_ALIGNER/ClustalV.cxx
r5904 r6269 384 384 385 385 #if (defined(DISPLAY_DIFF) || defined(MATRIX_DUMP)) 386 static GB_ERRORp_decode(const unsigned char *naseq, unsigned char *seq, int l) {386 static void p_decode(const unsigned char *naseq, unsigned char *seq, int l) { 387 387 int len = strlen(amino_acid_order); 388 388 … … 392 392 seq[i] = amino_acid_order[naseq[i]]; 393 393 } 394 395 return 0; 396 } 397 398 static GB_ERROR n_decode(const unsigned char *naseq, unsigned char *seq, int l) { 394 } 395 396 static void n_decode(const unsigned char *naseq, unsigned char *seq, int l) { 399 397 int len = strlen(nucleic_acid_order); 400 398 … … 404 402 seq[i] = nucleic_acid_order[naseq[i]]; 405 403 } 406 407 return 0;408 404 } 409 405 #endif … … 1106 1102 } 1107 1103 1108 static GB_ERRORp_encode(const unsigned char *seq, unsigned char *naseq, int l) /* code seq as ints .. use -2 for gap */ {1104 static void p_encode(const unsigned char *seq, unsigned char *naseq, int l) /* code seq as ints .. use -2 for gap */ { 1109 1105 bool warned = false; 1110 1106 … … 1130 1126 naseq[i] = c; 1131 1127 } 1132 1133 return 0; 1134 } 1135 1136 static GB_ERROR n_encode(const unsigned char *seq,unsigned char *naseq,int l) 1128 } 1129 1130 static void n_encode(const unsigned char *seq,unsigned char *naseq,int l) 1137 1131 { /* code seq as ints .. use -2 for gap */ 1138 1132 int i; … … 1156 1150 naseq[i] = c; 1157 1151 } 1158 1159 return 0;1160 1152 } 1161 1153 … … 1212 1204 1213 1205 { 1214 GB_ERROR (*encode)(const unsigned char*,unsigned char*,int) = dnaflag ? n_encode : p_encode; 1215 1216 error = encode((const unsigned char*)(seq1-1), seq_array[1], length1); 1217 if (!error) { 1218 seqlen_array[1] = length1; 1219 error = encode((const unsigned char*)(seq2-1), seq_array[2], length2); 1220 if (!error) { 1221 seqlen_array[2] = length2; 1222 1223 do_align(/* gap_open,*/ score, max(length1,length2)); 1224 int alignedLength = add_ggaps(max_seq_length); 1225 1226 *resultPtr1 = result[1]+1; 1227 *resultPtr2 = result[2]+1; 1228 *resLengthPtr = alignedLength; 1229 } 1230 } 1206 void (*encode)(const unsigned char*,unsigned char*,int) = dnaflag ? n_encode : p_encode; 1207 1208 encode((const unsigned char*)(seq1-1), seq_array[1], length1); 1209 seqlen_array[1] = length1; 1210 encode((const unsigned char*)(seq2-1), seq_array[2], length2); 1211 seqlen_array[2] = length2; 1212 1213 do_align(/* gap_open,*/ score, max(length1,length2)); 1214 int alignedLength = add_ggaps(max_seq_length); 1215 1216 *resultPtr1 = result[1]+1; 1217 *resultPtr2 = result[2]+1; 1218 *resLengthPtr = alignedLength; 1231 1219 } 1232 1220 }
