Show
Ignore:
Timestamp:
13/12/11 13:30:13 (6 months ago)
Author:
westram
Message:
  • fixed some realigner bugs
    • when species did not contain transl_table and codon_start, the realigner inserted only codon_start.
      • the next realignment/translation failed since it expected BOTH or NONE of the two fields.
      • now the realigner
        • either writes both fields (if used transl_table is well-defined)
        • deletes both fields
    • when some/all species did not contain data in source and/or destination alignment, the realigner silently skipped them
      • now prints a message about skipped species
    • errors during realignment (e.g. protection errors) were not shown

Note: grml .. similar patch was already in trunk as [6600]

Location:
branches/stable_5.0/AWT
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/stable_5.0/AWT/AWT_translate.cxx

    r7019 r8301  
    2828    GB_ERROR error    = GBT_write_string(gb_species, "transl_table", GBS_global_string("%i", embl_transl_table)); 
    2929    if (!error) error = GBT_write_string(gb_species, "codon_start",  GBS_global_string("%i", codon_start+1)); 
     30 
     31    return error; 
     32} 
     33 
     34GB_ERROR AWT_removeTranslationInfo(GBDATA *gb_species) { 
     35    GB_ERROR error = NULL; 
     36 
     37    GBDATA *gb_transl_table    = GB_entry(gb_species, "transl_table"); 
     38    if (gb_transl_table) error = GB_delete(gb_transl_table); 
     39 
     40    if (!error) { 
     41        GBDATA *gb_codon_start    = GB_entry(gb_species, "codon_start"); 
     42        if (gb_codon_start) error = GB_delete(gb_codon_start); 
     43    } 
    3044 
    3145    return error; 
  • branches/stable_5.0/AWT/awt_codon_table.hxx

    r5968 r8301  
    7171        } 
    7272    } 
     73 
     74    int explicit_table() const { 
     75        // return explicit table number (or -1 if not exactly 1 table is allowed) 
     76        int table = -1; 
     77        for (int i = 0; i<AWT_CODON_TABLES; ++i) { 
     78            if (allowed[i]) { 
     79                if (table != -1) return -1; 
     80                table = i; 
     81            } 
     82        } 
     83        return table; 
     84    } 
    7385}; 
    7486 
  • branches/stable_5.0/AWT/awt_translate.hxx

    r5817 r8301  
    1414GB_ERROR AWT_getTranslationInfo(GBDATA *gb_species, int& arb_transl_table, int &codon_start); 
    1515GB_ERROR AWT_saveTranslationInfo(GBDATA *gb_species, int arb_transl_table, int codon_start); 
     16GB_ERROR AWT_removeTranslationInfo(GBDATA *gb_species); 
    1617 
    1718int AWT_pro_a_nucs_convert(int arb_code_nr, char *data, size_t size, size_t pos, bool translate_all, bool create_start_codon, bool append_stop_codon, int *translatedSize);