Changeset 7198
- Timestamp:
- 24/02/11 21:20:02 (15 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
PROBE/PT_new_design.cxx (modified) (3 diffs)
-
PROBE/probe.h (modified) (2 diffs)
-
TOOLS/arb_probe.cxx (modified) (1 diff)
-
TOOLS/arb_test.cxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PROBE/PT_new_design.cxx
r6813 r7198 192 192 // count all mishits for a probe 193 193 char *probe = psg.probe; 194 if (apos>psg.apos) psg.apos = apos;194 psg.abs_pos.announce(apos); 195 195 if (psg.data[name].is_group) return 0; // don't count group or neverminds 196 196 if (probe) { … … 218 218 name = PT_read_name(psg.ptmain, pt); 219 219 int apos = PT_read_apos(psg.ptmain, pt); 220 if (apos>psg.apos) psg.apos = apos;220 psg.abs_pos.announce(apos); 221 221 if (!psg.data[name].is_group) return 1; 222 222 return 0; … … 405 405 tprobe = tprobe_next) { 406 406 tprobe_next = tprobe->next; 407 psg.a pos = 0;407 psg.abs_pos.clear(); 408 408 tprobe->mishit = ptnd_count_mishits(tprobe->sequence, psg.pt, 0); 409 tprobe->apos = psg.a pos;409 tprobe->apos = psg.abs_pos.get_most_used(); 410 410 if (tprobe->mishit > pdc->mishit) { 411 411 destroy_PT_tprobes(tprobe); 412 412 } 413 413 } 414 psg.abs_pos.clear(); 414 415 } 415 416 -
trunk/PROBE/probe.h
r7190 r7198 161 161 class BI_ecoli_ref; 162 162 163 class MostUsedPos { 164 int pos; 165 int used; 166 167 MostUsedPos *next; 168 169 void swapWith(MostUsedPos *other) { 170 std::swap(pos, other->pos); 171 std::swap(used, other->used); 172 } 173 174 public: 175 MostUsedPos() : pos(0), used(0), next(NULL) { } 176 MostUsedPos(int p) : pos(p), used(1), next(NULL) { } 177 ~MostUsedPos() { delete next; } 178 179 void clear() { 180 pos = 0; 181 used = 0; 182 delete next; 183 next = NULL; 184 } 185 186 void announce(int p) { 187 if (p == pos) used++; 188 else { 189 if (next) next->announce(p); 190 else next = new MostUsedPos(p); 191 if (next->used>used) swapWith(next); 192 } 193 } 194 195 196 int get_most_used() const { return pos; } 197 }; 198 163 199 extern struct probe_struct_global { 164 200 GB_shell *gb_shell; … … 191 227 int height; 192 228 int length; 193 int apos; 229 230 MostUsedPos abs_pos; 194 231 195 232 int sort_by; -
trunk/TOOLS/arb_probe.cxx
r7197 r7198 513 513 "Min Group Hits 100%\n" 514 514 "Target le apos ecol grps G+C 4GC+2AT Probe sequence | Decrease T by n*.3C -> probe matches n non group species\n" 515 "CGAAAGGAAGAUUAAUAC 18 A= 158 1584 33.3 48.0 GUAUUAAUCUUCCUUUCG | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n"516 "GAAAGGAAGAUUAAUACC 18 A+ 1 1594 33.3 48.0 GGUAUUAAUCUUCCUUUC | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n"515 "CGAAAGGAAGAUUAAUAC 18 A= 93 93 4 33.3 48.0 GUAUUAAUCUUCCUUUCG | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 516 "GAAAGGAAGAUUAAUACC 18 A+ 1 94 4 33.3 48.0 GGUAUUAAUCUUCCUUUC | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 517 517 "UCAAGUCGAGCGAUGAAG 18 B= 17 17 4 50.0 54.0 CUUCAUCGCUCGACUUGA | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 518 518 "AUCAAGUCGAGCGAUGAA 18 B- 1 16 4 44.4 52.0 UUCAUCGCUCGACUUGAU | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3,\n"; -
trunk/TOOLS/arb_test.cxx
r7197 r7198 300 300 "Min Group Hits 100%\n" 301 301 "Target le apos ecol grps G+C 4GC+2AT Probe sequence | Decrease T by n*.3C -> probe matches n non group species\n" 302 "CGAAAGGAAGAUUAAUAC 18 A= 158 1584 33.3 48.0 GUAUUAAUCUUCCUUUCG | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n"303 "GAAAGGAAGAUUAAUACC 18 A+ 1 1594 33.3 48.0 GGUAUUAAUCUUCCUUUC | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n"302 "CGAAAGGAAGAUUAAUAC 18 A= 93 93 4 33.3 48.0 GUAUUAAUCUUCCUUUCG | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 303 "GAAAGGAAGAUUAAUACC 18 A+ 1 94 4 33.3 48.0 GGUAUUAAUCUUCCUUUC | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 304 304 "UCAAGUCGAGCGAUGAAG 18 B= 17 17 4 50.0 54.0 CUUCAUCGCUCGACUUGA | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n" 305 305 "AUCAAGUCGAGCGAUGAA 18 B- 1 16 4 44.4 52.0 UUCAUCGCUCGACUUGAU | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3,\n"
