Changeset 8351 for trunk

Show
Ignore:
Timestamp:
02/02/12 01:57:23 (4 months ago)
Author:
epruesse
Message:

keep a bit more data when cleaning an ARB DB for PT-server use
* the SAIs HELIX and HELIX_NR in addition to ECOLI
* all of presets/

We need the latter to keep the ARB file sufficiently complete to be opened
by arb_ntree. Previously, GBT_get_alignment_width would fail. NT_repair_DB
would cause a segmentation fault. Keeping all presets costs a bit of
memory/space, but the ability to open a database from lib/pts for
inspection seems more important than saving a few bytes (and fixing
NT_repair_DB much more difficult).

For the same reason, I think HELIX and HELIX_NR should be kept, as they
are expected by BI_helix. Since the cost is negligible, I'd argue for
keeping them just in case.

(Alternative solution, not pursued: always keep a cleaned and a full copy

of the ARB database in lib/pts, possibly changing the suffix on the
cleaned databases to express that they are no longer compatible)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SL/PTCLEAN/ptclean.cxx

    r8103 r8351  
    4646                if (strcmp(keyname, "species_data")  == 0) return SOME_OF_SPECIES_DATA; 
    4747                if (strcmp(keyname, "extended_data") == 0) return SOME_OF_EXTENDED_DATA; 
    48                 if (strcmp(keyname, "presets")       == 0) return SOME_OF_PRESETS; 
     48                if (strcmp(keyname, "presets")       == 0) return ALL; 
    4949                break; 
    5050 
     
    5656                if (strcmp(keyname, "extended") == 0) { 
    5757                    const char *sainame = GBT_read_name(gbd); 
    58                     if (strcmp(sainame, "ECOLI") == 0) return SOME_OF_EXTENDED; // only "need" ECOLI  
     58                    if (strcmp(sainame, "ECOLI") == 0) return SOME_OF_EXTENDED;  
     59                    if (strcmp(sainame, "HELIX") == 0) return SOME_OF_EXTENDED; 
     60                    if (strcmp(sainame, "HELIX_NR") == 0) return SOME_OF_EXTENDED; 
    5961                } 
    6062                break; 
     
    6971                if (strcmp(keyname, "full_name") == 0) return ALL; 
    7072                if (strcmp(keyname, ali_name)    == 0) return SOME_OF_ALI_CONTAINER; 
    71                 break; 
    72  
    73             case SOME_OF_PRESETS: 
    74                 if (strcmp(keyname, "use") == 0) return ALL; 
    7573                break; 
    7674