Ticket #782: dump.patch
File dump.patch, 2.2 KB (added by westram, 6 years ago) |
---|
-
SL/PVP/AP_pos_var.cxx
151 151 if (base & (AP_A | AP_G)) char_2_transversion[i] = 1; 152 152 if (base & (AP_C | AP_T)) char_2_transversion[i] |= 2; 153 153 } 154 155 #if defined(DEBUG) 156 fprintf(stderr, " index char_2_bitstring char_2_freq\n"); 157 for (int i=0; i<256; i++) { 158 fprintf(stderr, " %3i: %3i %3i\n", i, int(char_2_bitstring[i]), int(char_2_freq[i])); 159 } 160 #endif 154 161 delete [] char_2_bitstring; 155 162 } 156 163 else { … … 158 165 const long *char_2_bitstring = translator->Pro2Bitset(); 159 166 160 167 for (int i=0; i<256; i++) { 161 char_2_transversion[i] = 0;162 long base = char_2_transition[i] = char_2_bitstring[i];168 char_2_transversion[i] = 0; 169 long base = char_2_transition[i] = char_2_bitstring[i]; 163 170 if (base) char_2_freq[i] = toupper(i); 164 171 } 172 173 #if defined(DEBUG) 174 fprintf(stderr, " index char_2_bitstring char_2_freq\n"); 175 for (int i=0; i<256; i++) { 176 fprintf(stderr, " %3i: %9li %3i\n", i, char_2_bitstring[i], int(char_2_freq[i])); 177 } 178 #endif 165 179 } 166 180 treesize = getsize(tree); 167 181 progress = new arb_progress(treesize); … … 224 238 } 225 239 } 226 240 241 242 #if defined(DEBUG) && 0 243 // dump non-zero sum[] and frequencies[] for all ali-positions 244 for (int i=0; i<ali_len; i++) { 245 if (sum[i]>0) { 246 fprintf(stderr, "sum[i=%i]=%i", i, sum[i]); 247 for (int j=0; j<256 && !error; j++) { 248 if (frequencies[j]) { 249 fprintf(stderr, " [j=%i]=%u", j, frequencies[j][i]); 250 } 251 } 252 fputc('\n', stderr); 253 } 254 } 255 fprintf(stderr, "treesize=%li\n", treesize); 256 #endif 257 227 258 if (!error) { 228 259 GBDATA *gb_transi = GB_search(gb_ali, "FREQUENCIES/TRANSITIONS", GB_INTS); 229 260 if (!gb_transi) error = GB_await_error();