Changeset 6280

Show
Ignore:
Timestamp:
25/11/09 16:02:42 (2 years ago)
Author:
westram
Message:
Location:
trunk
Files:
34 removed
127 modified
26 copied

Legend:

Unmodified
Added
Removed
  • trunk/ARBDB/ad_prot.h

    r6270 r6280  
    239239long GB_read_usr_private P_((GBDATA *gbd)); 
    240240GB_ERROR GB_write_usr_private P_((GBDATA *gbd, long ref)); 
    241 GB_ERROR GB_write_flag P_((GBDATA *gbd, long flag)); 
     241void GB_write_flag P_((GBDATA *gbd, long flag)); 
    242242int GB_read_flag P_((GBDATA *gbd)); 
    243243void GB_touch P_((GBDATA *gbd)); 
  • trunk/ARBDB/aditem.c

    r6100 r6280  
    3838                else { 
    3939                    error = GBT_write_string(gb_item, id_field, id); // write item identifier 
    40                     if (!error && markCreated) error = GB_write_flag(gb_item, 1); // mark generated item 
     40                    if (!error && markCreated) GB_write_flag(gb_item, 1); // mark generated item 
    4141                } 
    4242            } 
     
    294294                    mark and unmark species 
    295295********************************************************************************************/ 
    296 void GBT_mark_all(GBDATA *gb_main, int flag) 
    297 { 
     296void GBT_mark_all(GBDATA *gb_main, int flag) { 
     297    // flag == 0 -> unmark 
     298    // flag == 1 -> mark 
     299    // flag == 2 -> invert 
     300 
    298301    GBDATA *gb_species; 
    299302    GB_push_transaction(gb_main); 
  • trunk/ARBDB/adseqcompr.c

    r6197 r6280  
    1818 
    1919typedef struct gb_seq_compr_tree { 
    20 #ifdef FAKE_VTAB_PTR 
    21     virtualTable *dummy_virtual; /* simulate pointer to virtual-table used in AP_tree */ 
    22 #endif 
    23     GBT_TREE_ELEMENTS(struct gb_seq_compr_tree); 
     20    GBT_VTAB_AND_TREE_ELEMENTS(struct gb_seq_compr_tree); 
    2421 
    2522    int index;                  /* master(inner nodes) or sequence(leaf nodes) index */ 
  • trunk/ARBDB/arbdb.c

    r6262 r6280  
    24892489********************************************************************************************/ 
    24902490 
    2491 GB_ERROR GB_write_flag(GBDATA *gbd,long flag) 
     2491void GB_write_flag(GBDATA *gbd,long flag) 
    24922492{ 
    24932493    GBCONTAINER *gbc  = (GBCONTAINER *)gbd; 
     
    25102510        GB_DO_CALLBACKS(gbd); 
    25112511    } 
    2512     return 0; 
    25132512} 
    25142513 
  • trunk/ARBDB/arbdbt.h

    r6127 r6280  
    4545#ifdef FAKE_VTAB_PTR 
    4646/* if defined, FAKE_VTAB_PTR contains 'char' */ 
    47 typedef FAKE_VTAB_PTR virtualTable; 
     47typedef FAKE_VTAB_PTR  virtualTable; 
     48#define GBT_VTAB_AND_TREE_ELEMENTS(type)        \ 
     49    virtualTable      *dummy_virtual;           \ 
     50    GBT_TREE_ELEMENTS(type) 
     51#else 
     52#define GBT_VTAB_AND_TREE_ELEMENTS(type) GBT_TREE_ELEMENTS(type) 
    4853#endif 
    4954 
    5055typedef struct gbt_tree_struct { 
    51 #ifdef FAKE_VTAB_PTR 
    52     virtualTable *dummy_virtual; /* simulate pointer to virtual-table used in AP_tree */ 
    53 #endif 
    54     GBT_TREE_ELEMENTS(struct gbt_tree_struct); 
     56    GBT_VTAB_AND_TREE_ELEMENTS(struct gbt_tree_struct); 
    5557} GBT_TREE; 
    5658 
  • trunk/ARB_GDE/GDE.cxx

    r6069 r6280  
    1 #include <cstdio> 
    2 #include <cstdlib> 
    3 #include <cstring> 
    4 #include <cmath> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8 // #include <malloc.h> 
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <awt.hxx> 
    13 #include <awt_sel_boxes.hxx> 
    14  
    15 #include "gde.hxx" 
    16 #include "GDE_menu.h" 
    17 #include "GDE_def.h" 
    181#include "GDE_extglob.h" 
    192#include "GDE_awars.h" 
     3 
     4#include <awt_sel_boxes.hxx> 
     5#include <awt_filter.hxx> 
     6#include <aw_window.hxx> 
     7 
     8/*AISC_MKPT_PROMOTE:#ifndef GDE_MENU_H*/ 
     9/*AISC_MKPT_PROMOTE:#include "GDE_menu.h"*/ 
     10/*AISC_MKPT_PROMOTE:#endif*/ 
    2011 
    2112adfiltercbstruct *agde_filtercd = 0; 
  • trunk/ARB_GDE/GDE_FileIO.cxx

    r5901 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 // #include <malloc.h> 
    4 #include <string.h> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8 #include <aw_root.hxx> 
    9 #include <aw_device.hxx> 
    10 #include <aw_window.hxx> 
    11 #include <awt.hxx> 
    12  
    13 #include "gde.hxx" 
    14 #include "GDE_def.h" 
    15 #include "GDE_menu.h" 
    16 #include "GDE_extglob.h" 
     1#include "GDE_proto.h" 
    172 
    183int MAX(int a,int b) 
  • trunk/ARB_GDE/GDE_Genbank.cxx

    r5695 r6280  
    1 #include <sys/time.h> 
    2 #include <stdio.h> 
    3 // #include <malloc.h> 
    4 #include <string.h> 
     1#include "GDE_extglob.h" 
    52#include <time.h> 
    6  
    7 //#include <xview/xview.h> 
    8 //#include <xview/panel.h> 
    9  
    10 #include <arbdb.h> 
    11 #include <aw_root.hxx> 
    12 #include <aw_device.hxx> 
    13 #include <aw_window.hxx> 
    14 #include <awt.hxx> 
    15  
    16 #include "gde.hxx" 
    17 #include "GDE_menu.h" 
    18 #include "GDE_def.h" 
    19 #include "GDE_extglob.h" 
    203 
    214/* 
  • trunk/ARB_GDE/GDE_HGLfile.cxx

    r5695 r6280  
    1 #include <sys/time.h> 
    2 #include <stdio.h> 
    3 #include <stdlib.h> 
    4 // #include <malloc.h> 
    5 #include <string.h> 
     1#include "GDE_extglob.h" 
    62#include <time.h> 
    7  
    8 //#include <xview/xview.h> 
    9 //#include <xview/panel.h> 
    10  
    11 #include <arbdb.h> 
    12 #include <aw_root.hxx> 
    13 #include <aw_device.hxx> 
    14 #include <aw_window.hxx> 
    15 #include <awt.hxx> 
    16  
    17 #include "gde.hxx" 
    18 #include "GDE_menu.h" 
    19 #include "GDE_def.h" 
    20 #include "GDE_extglob.h" 
    213 
    224/* 
  • trunk/ARB_GDE/GDE_ParseMenu.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 // #include <malloc.h> 
     1#include "GDE_extglob.h" 
    52#include <ctype.h> 
    6 #include <assert.h> 
    7  
    8 #include <arbdb.h> 
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <awt.hxx> 
    13  
    14 #include "gde.hxx" 
    15 #include "GDE_menu.h" 
    16 #include "GDE_def.h" 
    17 #include "GDE_global.h" 
    18 #include "GDE_extglob.h" 
    193 
    204static int getline(FILE *file,char *string) 
     
    468452    } 
    469453 
    470     assert(num_menus>0); // if this fails, the file ARB_GDEmenus contained no menus (maybe file has zero size) 
     454    gde_assert(num_menus>0); // if this fails, the file ARB_GDEmenus contained no menus (maybe file has zero size) 
    471455 
    472456    return; 
  • trunk/ARB_GDE/GDE_arbdb_io.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 #include <memory.h> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8 #include <aw_root.hxx> 
    9 #include <aw_device.hxx> 
    10 #include <aw_window.hxx> 
    11 #include <awt.hxx> 
     1#include "GDE_def.h" 
     2#include "GDE_proto.h" 
     3 
     4#include <AW_rename.hxx> 
     5#include <AP_filter.hxx> 
    126#include <aw_awars.hxx> 
    13 #include <awt_tree.hxx> 
    14  
    15 #include "gde.hxx" 
    16 #include "GDE_def.h" 
    17 #include "GDE_menu.h" 
    18 #include "GDE_extglob.h" 
    19 #include "AW_rename.hxx" 
     7 
     8/*AISC_MKPT_PROMOTE:#ifndef GDE_EXTGLOB_H*/ 
     9/*AISC_MKPT_PROMOTE:#include "GDE_extglob.h"*/ 
     10/*AISC_MKPT_PROMOTE:#endif*/ 
    2011 
    2112typedef unsigned int UINT; 
     
    4132static int InsertDatainGDE(NA_Alignment *dataset,GBDATA **the_species,unsigned char **the_names, 
    4233                           unsigned char **the_sequences, unsigned long numberspecies, 
    43                            unsigned long maxalignlen, AP_filter *filter, GapCompression compress, 
     34                           unsigned long maxalignlen, const AP_filter *filter, GapCompression compress, 
    4435                           bool cutoff_stop_codon) 
    4536{ 
     
    4738    GBDATA      *gb_species; 
    4839    GBDATA      *gbd; 
    49     int          newfiltercreated = 0; 
    5040    NA_Sequence *this_elem; 
     41    AP_filter   *allocatedFilter = 0; 
    5142 
    5243    gde_assert((the_species==0) != (the_names==0)); 
    5344 
    5445    if (filter==0) { 
    55         filter = new AP_filter; 
    56         filter->init(maxalignlen); 
    57         newfiltercreated=1; 
     46        allocatedFilter = new AP_filter(maxalignlen); 
     47        filter          = allocatedFilter; 
    5848    } 
    5949    else { 
    60         size_t fl = filter->filter_len; 
     50        size_t fl = filter->get_length(); 
    6151        if (fl < maxalignlen) { 
    6252            aw_message("Warning: Your filter is shorter than the alignment len"); 
     
    9181 
    9282    if (compress==COMPRESS_ALL) { // compress all gaps and filter positions 
    93         long          len = filter->real_len; 
     83        long          len = filter->get_filtered_length(); 
    9484        unsigned long i; 
    9585 
     
    10090                char c = the_sequences[i][col]; 
    10191                if (!c) break; 
    102                 if ((filter->filter_mask[col]) && (c!='-') && (c!='.')) { 
     92                if ((filter->use_position(col)) && (c!='-') && (c!='.')) { 
    10393                    sequfilt[i][newcount++] = c; 
    10494                } 
     
    134124            } 
    135125 
     126            bool  modified     = false; 
     127            char *filterString = filter->to_string(); 
     128 
    136129            for (i=0; i<maxalignlen; i++) { 
    137                 if (filter->filter_mask[i]) { 
     130                if (filter->use_position(i)) { 
    138131                    bool wantColumn = false; 
    139132 
     
    147140                    } 
    148141                    if (!wantColumn) { 
    149                         filter->filter_mask[i] = 0; 
    150                         filter->real_len--; 
     142                        filterString[i] = '0'; 
     143                        modified        = true; 
    151144                    } 
    152145                } 
    153146            } 
    154         } 
    155  
    156         long   len = filter->real_len; 
     147 
     148            if (modified) { 
     149                size_t len = filter->get_length(); 
     150 
     151                delete allocatedFilter; 
     152                filter = allocatedFilter = new AP_filter(filterString, NULL, len); 
     153            } 
     154 
     155            free(filterString); 
     156        } 
     157 
     158        long   len = filter->get_filtered_length(); 
    157159        size_t i; 
    158160 
     
    165167            memset(sequfilt[i],'.',len); // Generate empty sequences 
    166168 
    167             size_t col; 
    168             for (col=0; (col<maxalignlen) && (c=the_sequences[i][col]); col++) { 
    169                 if (filter->filter_mask[col]) { 
    170                     sequfilt[i][newcount++] = filter->simplify[c]; 
     169            const uchar *simplify = filter->get_simplify_table(); 
     170            for (size_t col=0; (col<maxalignlen) && (c=the_sequences[i][col]); col++) { 
     171                if (filter->use_position(col)) { 
     172                    sequfilt[i][newcount++] = simplify[c]; 
    171173                } 
    172174            } 
     
    303305        free(sequfilt); 
    304306    } 
    305     if (newfiltercreated) delete filter; 
     307    delete allocatedFilter; 
    306308    return 0; 
    307309} 
  • trunk/ARB_GDE/GDE_def.h

    r5078 r6280  
     1#ifndef GDE_DEF_H 
     2#define GDE_DEF_H 
     3 
     4#ifndef ARBDBT_H 
     5#include <arbdbt.h> 
     6#endif 
     7 
    18/* 
    29 
     
    236243extern NA_Alignment *DataSet; 
    237244 
    238  
    239245#define getcmask(a,b) (b < ((a)->offset))?0:((a)->cmask[(b-(a)->offset)]) 
    240246 
     247#else 
     248#error GDE_def.h included twice 
     249#endif // GDE_DEF_H 
  • trunk/ARB_GDE/GDE_event.cxx

    r6141 r6280  
    1 #include <unistd.h> 
    2 #include <netdb.h> 
    3 #include <sys/time.h> 
    4 #include <sys/types.h> 
    5 #include <sys/stat.h> 
    6 #include <stdio.h> 
    7 #include <stdlib.h> 
    8 #include <string.h> 
    9 //#include <xview/xview.h> 
    10 //#include <xview/panel.h> 
    11 #include <arbdb.h> 
    12 #include <arbdbt.h> 
    13 // #include <malloc.h> 
    14 #include <aw_root.hxx> 
    15 #include <aw_device.hxx> 
    16 #include <aw_window.hxx> 
    17 #include <awt.hxx> 
    18 #include <awt_tree.hxx> 
    19 #include <awt_sel_boxes.hxx> 
    20 #include <gde.hxx> 
    21 #include "GDE_menu.h" 
    22 #include "GDE_def.h" 
    231#include "GDE_extglob.h" 
    242#include "GDE_awars.h" 
    253 
     4#include <awt_filter.hxx> 
     5#include <aw_window.hxx> 
     6#include <AP_filter.hxx> 
     7 
     8#include <set> 
    269#include <string> 
    27 #include <set> 
    2810 
    2911using namespace std; 
  • trunk/ARB_GDE/GDE_menu.h

    r6141 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : GDE_menu.h                                        // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6// =============================================================== // 
     7 
     8#ifndef GDE_MENU_H 
     9#define GDE_MENU_H 
     10 
     11#ifndef GDE_HXX 
     12#include "gde.hxx" 
     13#endif 
     14#ifndef GDE_DEF_H 
     15#include "GDE_def.h" 
     16#endif 
    117 
    218#ifndef ARB_ASSERT_H 
    319#include <arb_assert.h> 
    420#endif 
     21 
    522#define gde_assert(bed) arb_assert(bed) 
    623 
     
    4360} GfileFormat; 
    4461 
     62class AW_window; 
     63 
    4564typedef struct GmenuItemtype 
    4665{ 
     
    7392} Gmenu; 
    7493 
    75 // typedef unsigned char uchar; 
     94typedef unsigned char uchar; 
    7695 
    7796extern struct choose_get_sequence_struct { 
     
    81100} gde_cgss; 
    82101 
     102 
     103#else 
     104#error GDE_menu.h included twice 
     105#endif // GDE_MENU_H 
  • trunk/ARB_GDE/GDE_proto.h

    r5968 r6280  
    1414 
    1515 
    16 /* GDE_ParseMenu.cxx */ 
    17 void ParseMenu(void); 
    18 int Find(const char *target, const char *key); 
    19 int Find2(const char *target, const char *key); 
    20 void Error(const char *msg) __ATTR__NORETURN; 
    21 void crop(char *input, char *head, char *tail); 
     16/* GDE.cxx */ 
    2217 
    23 /* GDE.cxx */ 
     18#ifndef GDE_MENU_H 
     19#include "GDE_menu.h" 
     20#endif 
     21 
    2422char *GDE_makeawarname(GmenuItem *gmenuitem, long i); 
    2523void GDE_load_menu(AW_window *awm, AW_active mask, const char *menulabel, const char *menuitemlabel); 
    2624void create_gde_var(AW_root *aw_root, AW_default aw_def, char *(*get_sequences )(void *THIS, GBDATA **&the_species, uchar **&the_names, uchar **&the_sequences, long &numberspecies, long &maxalignlen ), gde_cgss_window_type wt, void *THIS); 
    27  
    28 /* GDE_event.cxx */ 
    29 void GDE_startaction_cb(AW_window *aw, GmenuItem *gmenuitem, AW_CL cd); 
    30  
    31 /* GDE_arbdb_io.cxx */ 
    32 void ReadArbdb_plain(char *filename, NA_Alignment *dataset, int type); 
    33 int ReadArbdb2(NA_Alignment *dataset, AP_filter *filter, GapCompression compress, bool cutoff_stop_codon); 
    34 int ReadArbdb(NA_Alignment *dataset, bool marked, AP_filter *filter, GapCompression compress, bool cutoff_stop_codon); 
    35 int getelem(NA_Sequence *a, int b); 
    36 void putelem(NA_Sequence *a, int b, NA_Base c); 
    37  
    38 /* GDE_HGLfile.cxx */ 
    39 void ReadGDE(char *filename, NA_Alignment *dataset, int type); 
    40 int WriteGDE(NA_Alignment *aln, char *filename, int method, int maskable); 
    41 void SeqNorm(NA_Sequence *seq); 
    42 char *uniqueID(void); 
    43  
    44 /* GDE_Genbank.cxx */ 
    45 void ReadGen(char *filename, NA_Alignment *dataset, int type); 
    46 int WriteGen(NA_Alignment *aln, char *filename, int method, int maskable); 
    47 void SetTime(void *b); 
    4825 
    4926/* GDE_FileIO.cxx */ 
     
    6744int WriteCMask(NA_Alignment *aln, char *filename, int method, int maskable); 
    6845 
     46/* GDE_Genbank.cxx */ 
     47void ReadGen(char *filename, NA_Alignment *dataset, int type); 
     48int WriteGen(NA_Alignment *aln, char *filename, int method, int maskable); 
     49void SetTime(void *b); 
     50 
     51/* GDE_HGLfile.cxx */ 
     52void ReadGDE(char *filename, NA_Alignment *dataset, int type); 
     53int WriteGDE(NA_Alignment *aln, char *filename, int method, int maskable); 
     54void SeqNorm(NA_Sequence *seq); 
     55char *uniqueID(void); 
     56 
     57/* GDE_ParseMenu.cxx */ 
     58void ParseMenu(void); 
     59int Find(const char *target, const char *key); 
     60int Find2(const char *target, const char *key); 
     61void Error(const char *msg) __ATTR__NORETURN; 
     62void crop(char *input, char *head, char *tail); 
     63 
     64/* GDE_arbdb_io.cxx */ 
     65 
     66#ifndef GDE_EXTGLOB_H 
     67#include "GDE_extglob.h" 
     68#endif 
     69 
     70void ReadArbdb_plain(char *filename, NA_Alignment *dataset, int type); 
     71int ReadArbdb2(NA_Alignment *dataset, AP_filter *filter, GapCompression compress, bool cutoff_stop_codon); 
     72int ReadArbdb(NA_Alignment *dataset, bool marked, AP_filter *filter, GapCompression compress, bool cutoff_stop_codon); 
     73int getelem(NA_Sequence *a, int b); 
     74void putelem(NA_Sequence *a, int b, NA_Base c); 
     75 
     76/* GDE_event.cxx */ 
     77void GDE_startaction_cb(AW_window *aw, GmenuItem *gmenuitem, AW_CL cd); 
     78 
    6979#else 
    7080#error GDE_proto.h included twice 
  • trunk/ARB_GDE/Makefile

    r6277 r6280  
    22.SUFFIXES: .o .cxx .depend 
    33 
    4 CPP_OBJECTS =   GDE_ParseMenu.o GDE.o GDE_event.o \ 
    5         GDE_arbdb_io.o  GDE_HGLfile.o\ 
    6         GDE_Genbank.o GDE_FileIO.o 
     4CPP_OBJECTS =   \ 
     5        GDE.o \ 
     6        GDE_FileIO.o \ 
     7        GDE_Genbank.o \ 
     8        GDE_HGLfile.o \ 
     9        GDE_ParseMenu.o \ 
     10        GDE_arbdb_io.o \ 
     11        GDE_event.o \ 
     12        GDE_global.o \ 
    713 
    814CPP_FILES=$(CPP_OBJECTS:.o=.cxx) 
     
    1319        $(CPP) $(cflags) -c $< $(CPPINCLUDES) 
    1420 
    15 proto: GDE_proto.h 
    16  
    1721GDE_proto.h: $(CPP_FILES) Makefile 
    18         ../MAKEBIN/aisc_mkpt -G -A -E -w GDE_proto.h $(CPP_FILES) > GDE_proto.h.tmp 
     22        $(MAKE) proto 
     23 
     24proto: 
     25        ../MAKEBIN/aisc_mkpt -P -G -A -E -w GDE_proto.h $(CPP_FILES) > GDE_proto.h.tmp 
    1926        ../SOURCE_TOOLS/mv_if_diff GDE_proto.h.tmp GDE_proto.h 
    2027 
     
    6067GDE.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    6168GDE.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    62 GDE.o: $(ARBHOME)/INCLUDE/awt.hxx 
     69GDE.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    6370GDE.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    6471GDE.o: $(ARBHOME)/INCLUDE/smartptr.h 
     
    7279GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    7380GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     81GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    7482GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    7583GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    8088GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/attributes.h 
    8189GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    82 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    83 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    84 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    85 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    8690GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/AW_rename.hxx 
    8791GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    88 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    89 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/awt.hxx 
    90 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    91 GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    9292GDE_arbdb_io.o: $(ARBHOME)/INCLUDE/smartptr.h 
    9393 
     
    101101GDE_event.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    102102GDE_event.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     103GDE_event.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    103104GDE_event.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    104105GDE_event.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    108109GDE_event.o: $(ARBHOME)/INCLUDE/arbtools.h 
    109110GDE_event.o: $(ARBHOME)/INCLUDE/attributes.h 
    110 GDE_event.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    111111GDE_event.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    112112GDE_event.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    114114GDE_event.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    115115GDE_event.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    116 GDE_event.o: $(ARBHOME)/INCLUDE/awt.hxx 
    117 GDE_event.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    118 GDE_event.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    119 GDE_event.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     116GDE_event.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    120117GDE_event.o: $(ARBHOME)/INCLUDE/smartptr.h 
    121118 
     
    135132GDE_FileIO.o: $(ARBHOME)/INCLUDE/arbtools.h 
    136133GDE_FileIO.o: $(ARBHOME)/INCLUDE/attributes.h 
    137 GDE_FileIO.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    138 GDE_FileIO.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    139 GDE_FileIO.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    140134GDE_FileIO.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    141 GDE_FileIO.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    142 GDE_FileIO.o: $(ARBHOME)/INCLUDE/awt.hxx 
    143135GDE_FileIO.o: $(ARBHOME)/INCLUDE/smartptr.h 
    144136 
     
    150142GDE_Genbank.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    151143GDE_Genbank.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     144GDE_Genbank.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    152145GDE_Genbank.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    153146GDE_Genbank.o: $(ARBHOME)/INCLUDE/arb_error.h 
    154147GDE_Genbank.o: $(ARBHOME)/INCLUDE/arbdb.h 
    155148GDE_Genbank.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     149GDE_Genbank.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    156150GDE_Genbank.o: $(ARBHOME)/INCLUDE/arbtools.h 
    157151GDE_Genbank.o: $(ARBHOME)/INCLUDE/attributes.h 
    158 GDE_Genbank.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    159 GDE_Genbank.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    160 GDE_Genbank.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    161152GDE_Genbank.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    162 GDE_Genbank.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    163 GDE_Genbank.o: $(ARBHOME)/INCLUDE/awt.hxx 
    164153GDE_Genbank.o: $(ARBHOME)/INCLUDE/smartptr.h 
     154 
     155GDE_global.o: gde.hxx 
     156GDE_global.o: GDE_def.h 
     157GDE_global.o: GDE_extglob.h 
     158GDE_global.o: GDE_menu.h 
     159GDE_global.o: GDE_proto.h 
     160GDE_global.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     161GDE_global.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     162GDE_global.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     163GDE_global.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     164GDE_global.o: $(ARBHOME)/INCLUDE/arb_error.h 
     165GDE_global.o: $(ARBHOME)/INCLUDE/arbdb.h 
     166GDE_global.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     167GDE_global.o: $(ARBHOME)/INCLUDE/arbdbt.h 
     168GDE_global.o: $(ARBHOME)/INCLUDE/arbtools.h 
     169GDE_global.o: $(ARBHOME)/INCLUDE/attributes.h 
     170GDE_global.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
     171GDE_global.o: $(ARBHOME)/INCLUDE/smartptr.h 
    165172 
    166173GDE_HGLfile.o: gde.hxx 
     
    171178GDE_HGLfile.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    172179GDE_HGLfile.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     180GDE_HGLfile.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    173181GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    174182GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arb_error.h 
    175183GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arbdb.h 
    176184GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     185GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    177186GDE_HGLfile.o: $(ARBHOME)/INCLUDE/arbtools.h 
    178187GDE_HGLfile.o: $(ARBHOME)/INCLUDE/attributes.h 
    179 GDE_HGLfile.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    180 GDE_HGLfile.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    181 GDE_HGLfile.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    182188GDE_HGLfile.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    183 GDE_HGLfile.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    184 GDE_HGLfile.o: $(ARBHOME)/INCLUDE/awt.hxx 
    185189GDE_HGLfile.o: $(ARBHOME)/INCLUDE/smartptr.h 
    186190 
     
    188192GDE_ParseMenu.o: GDE_def.h 
    189193GDE_ParseMenu.o: GDE_extglob.h 
    190 GDE_ParseMenu.o: GDE_global.h 
    191194GDE_ParseMenu.o: GDE_menu.h 
    192195GDE_ParseMenu.o: GDE_proto.h 
    193196GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    194197GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     198GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    195199GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    196200GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arb_error.h 
    197201GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arbdb.h 
    198202GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     203GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    199204GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/arbtools.h 
    200205GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/attributes.h 
    201 GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    202 GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    203 GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    204206GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    205 GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    206 GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/awt.hxx 
    207207GDE_ParseMenu.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/ARB_GDE/gde.hxx

    r5834 r6280  
    1111#ifndef GDE_HXX 
    1212#define GDE_HXX 
     13 
     14#ifndef AW_ROOT_HXX 
     15#include <aw_root.hxx> 
     16#endif 
    1317 
    1418typedef unsigned char uchar; 
  • trunk/AWT

    • Property svn:ignore
      •  

        old new  
        55libAWT.so 
        66Makefile.bak 
         7Makefile.old 
  • trunk/AWT/AWT_db_browser.cxx

    r6277 r6280  
    1313 
    1414#include "awt.hxx" 
    15 #include "awt_tree.hxx" 
     15 
     16#include <arbdbt.h> 
    1617#include <inline.h> 
     18#include <AP_Tree.hxx> 
    1719 
    1820#include <string> 
  • trunk/AWT/AWT_query_and_functions.cxx

    r6187 r6280  
    17431743 
    17441744// @@@ awt_mark_colored is obsolete! (will be replaced by dynamic coloring in the future) 
    1745 static void awt_mark_colored(AW_window *aww, AW_CL cl_cmd, AW_CL cl_mode) 
    1746 { 
     1745static void awt_mark_colored(AW_window *aww, AW_CL cl_cmd, AW_CL cl_mode) { 
    17471746    const color_mark_data  *cmd         = (struct color_mark_data *)cl_cmd; 
    17481747    const ad_item_selector *sel         = cmd->sel; 
    17491748    int                     mode        = int(cl_mode); // 0 = unmark 1 = mark 2 = invert 
    1750     GB_ERROR                error       = 0; 
    17511749    AW_root                *aw_root     = aww->get_root(); 
    17521750    int                     color_group = aw_root->awar(AWAR_COLORIZE)->read_int(); 
     
    17561754 
    17571755    for (GBDATA *gb_item_container = sel->get_first_item_container(cmd->gb_main, aw_root, range); 
    1758          !error && gb_item_container; 
     1756         gb_item_container; 
    17591757         gb_item_container = sel->get_next_item_container(gb_item_container, range)) 
     1758    { 
     1759        for (GBDATA *gb_item = sel->get_first_item(gb_item_container); 
     1760             gb_item; 
     1761             gb_item = sel->get_next_item(gb_item)) 
    17601762        { 
    1761             for (GBDATA *gb_item = sel->get_first_item(gb_item_container); 
    1762                  !error && gb_item; 
    1763                  gb_item       = sel->get_next_item(gb_item)) 
    1764                 { 
    1765                     long my_color = AW_find_color_group(gb_item, true); 
    1766                     if (my_color == color_group) { 
    1767                         bool marked = GB_read_flag(gb_item); 
    1768  
    1769                         switch (mode) { 
    1770                         case 0: marked = 0; break; 
    1771                         case 1: marked = 1; break; 
    1772                         case 2: marked = !marked; break; 
    1773                         default : awt_assert(0); break; 
    1774                         } 
    1775  
    1776                         error = GB_write_flag(gb_item, marked); 
    1777                     } 
    1778                 } 
    1779         } 
    1780  
    1781     if (error) GB_export_error(error); 
     1763            long my_color = AW_find_color_group(gb_item, true); 
     1764            if (my_color == color_group) { 
     1765                bool marked = GB_read_flag(gb_item); 
     1766 
     1767                switch (mode) { 
     1768                    case 0: marked = 0; break; 
     1769                    case 1: marked = 1; break; 
     1770                    case 2: marked = !marked; break; 
     1771                    default : awt_assert(0); break; 
     1772                } 
     1773 
     1774                GB_write_flag(gb_item, marked); 
     1775            } 
     1776        } 
     1777    } 
     1778 
    17821779} 
    17831780 
  • trunk/AWT/Makefile

    r6277 r6280  
    44 
    55OBJECTS =       \ 
    6                 AWT_input_mask.o AWT_hotkeys.o \ 
    7                 AWT_www.o AWT_tables.o AWT_irstree.o \ 
    8                 AWT_asciiprint.o AWT_map_key.o AWT_tree_cmp.o AWT_seq_colors.o \ 
    9                 AWT_pro_a_nucs.o AWT_csp.o AWT_canvas.o AWT_dtree.o AWT_tree.o AWT_tree_cb.o AWT_nei.o \ 
    10                 AWT_filter.o AWT_sel_boxes.o AWT_canio.o AWT_nds.o \ 
    11                 AWT_query_and_functions.o AWT_file_selection.o \ 
    12                 AWT_preset.o AWT_seq_dna.o AWT_seq_protein.o AWT_seq_simple_pro.o \ 
    13                 AWT_codon_table.o AWT_iupac.o AWT_config_manager.o AWT_advice.o AWT_db_browser.o \ 
    14                 AWT_attributes.o AWT_changekey.o AWT_item_sel_list.o AWT_macro.o AWT_translate.o 
     6                AWT_advice.o \ 
     7                AWT_asciiprint.o \ 
     8                AWT_attributes.o \ 
     9                AWT_canio.o \ 
     10                AWT_canvas.o \ 
     11                AWT_changekey.o \ 
     12                AWT_config_manager.o \ 
     13                AWT_db_browser.o \ 
     14                AWT_file_selection.o \ 
     15                AWT_hotkeys.o \ 
     16                AWT_input_mask.o \ 
     17                AWT_item_sel_list.o \ 
     18                AWT_iupac.o \ 
     19                AWT_macro.o \ 
     20                AWT_map_key.o \ 
     21                AWT_nds.o \ 
     22                AWT_preset.o \ 
     23                AWT_query_and_functions.o \ 
     24                AWT_sel_boxes.o \ 
     25                AWT_seq_colors.o \ 
     26                AWT_tables.o \ 
     27                AWT_www.o \ 
    1528 
    1629$(MAIN): $(OBJECTS) 
     
    2235 
    2336#       $(CPPLIB) $(cflags) -c -D_USE_AW_WINDOW $<  $(CPPINCLUDES) 
    24  
    25 awt_tree_cb.hxx: AWT_tree_cb.cxx 
    26         rm -f $@ 
    27         ../MAKEBIN/aisc_mkpt -w $@ -C $? >$@ 
    2837 
    2938clean: 
     
    152161AWT_changekey.o: $(ARBHOME)/INCLUDE/smartptr.h 
    153162 
    154 AWT_codon_table.o: awt.hxx 
    155 AWT_codon_table.o: awt_codon_table.hxx 
    156 AWT_codon_table.o: awt_iupac.hxx 
    157 AWT_codon_table.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    158 AWT_codon_table.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    159 AWT_codon_table.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    160 AWT_codon_table.o: $(ARBHOME)/INCLUDE/arb_error.h 
    161 AWT_codon_table.o: $(ARBHOME)/INCLUDE/arbdb.h 
    162 AWT_codon_table.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    163 AWT_codon_table.o: $(ARBHOME)/INCLUDE/arbtools.h 
    164 AWT_codon_table.o: $(ARBHOME)/INCLUDE/attributes.h 
    165 AWT_codon_table.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    166 AWT_codon_table.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    167 AWT_codon_table.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    168 AWT_codon_table.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    169 AWT_codon_table.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    170 AWT_codon_table.o: $(ARBHOME)/INCLUDE/smartptr.h 
    171  
    172163AWT_config_manager.o: awt.hxx 
    173164AWT_config_manager.o: awt_config_manager.hxx 
     
    187178AWT_config_manager.o: $(ARBHOME)/INCLUDE/smartptr.h 
    188179 
    189 AWT_csp.o: awt.hxx 
    190 AWT_csp.o: awt_csp.hxx 
    191 AWT_csp.o: awt_pro_a_nucs.hxx 
    192 AWT_csp.o: awt_sel_boxes.hxx 
    193 AWT_csp.o: awt_tree.hxx 
    194 AWT_csp.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    195 AWT_csp.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    196 AWT_csp.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    197 AWT_csp.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    198 AWT_csp.o: $(ARBHOME)/INCLUDE/arb_error.h 
    199 AWT_csp.o: $(ARBHOME)/INCLUDE/arbdb.h 
    200 AWT_csp.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    201 AWT_csp.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    202 AWT_csp.o: $(ARBHOME)/INCLUDE/arbtools.h 
    203 AWT_csp.o: $(ARBHOME)/INCLUDE/attributes.h 
    204 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    205 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    206 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    207 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    208 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    209 AWT_csp.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    210 AWT_csp.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
    211 AWT_csp.o: $(ARBHOME)/INCLUDE/smartptr.h 
    212  
    213180AWT_db_browser.o: awt.hxx 
    214 AWT_db_browser.o: awt_pro_a_nucs.hxx 
    215 AWT_db_browser.o: awt_tree.hxx 
    216181AWT_db_browser.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    217182AWT_db_browser.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    218183AWT_db_browser.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     184AWT_db_browser.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     185AWT_db_browser.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     186AWT_db_browser.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    219187AWT_db_browser.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    220188AWT_db_browser.o: $(ARBHOME)/INCLUDE/arb_error.h 
     189AWT_db_browser.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    221190AWT_db_browser.o: $(ARBHOME)/INCLUDE/arbdb.h 
    222191AWT_db_browser.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    230199AWT_db_browser.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    231200AWT_db_browser.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
     201AWT_db_browser.o: $(ARBHOME)/INCLUDE/downcast.h 
    232202AWT_db_browser.o: $(ARBHOME)/INCLUDE/inline.h 
    233203AWT_db_browser.o: $(ARBHOME)/INCLUDE/smartptr.h 
    234  
    235 AWT_dtree.o: awt.hxx 
    236 AWT_dtree.o: awt_attributes.hxx 
    237 AWT_dtree.o: awt_canvas.hxx 
    238 AWT_dtree.o: awt_dtree.hxx 
    239 AWT_dtree.o: awt_nds.hxx 
    240 AWT_dtree.o: awt_pro_a_nucs.hxx 
    241 AWT_dtree.o: awt_tree.hxx 
    242 AWT_dtree.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    243 AWT_dtree.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    244 AWT_dtree.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    245 AWT_dtree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    246 AWT_dtree.o: $(ARBHOME)/INCLUDE/arb_error.h 
    247 AWT_dtree.o: $(ARBHOME)/INCLUDE/arbdb.h 
    248 AWT_dtree.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    249 AWT_dtree.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    250 AWT_dtree.o: $(ARBHOME)/INCLUDE/arbtools.h 
    251 AWT_dtree.o: $(ARBHOME)/INCLUDE/attributes.h 
    252 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    253 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    254 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    255 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    256 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    257 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    258 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    259 AWT_dtree.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    260 AWT_dtree.o: $(ARBHOME)/INCLUDE/smartptr.h 
    261204 
    262205AWT_file_selection.o: awt.hxx 
     
    279222AWT_file_selection.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    280223AWT_file_selection.o: $(ARBHOME)/INCLUDE/smartptr.h 
    281  
    282 AWT_filter.o: awt.hxx 
    283 AWT_filter.o: awt_pro_a_nucs.hxx 
    284 AWT_filter.o: awt_sel_boxes.hxx 
    285 AWT_filter.o: awt_tree.hxx 
    286 AWT_filter.o: awtfilter.hxx 
    287 AWT_filter.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    288 AWT_filter.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    289 AWT_filter.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    290 AWT_filter.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    291 AWT_filter.o: $(ARBHOME)/INCLUDE/arb_error.h 
    292 AWT_filter.o: $(ARBHOME)/INCLUDE/arbdb.h 
    293 AWT_filter.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    294 AWT_filter.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    295 AWT_filter.o: $(ARBHOME)/INCLUDE/arbtools.h 
    296 AWT_filter.o: $(ARBHOME)/INCLUDE/attributes.h 
    297 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    298 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    299 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    300 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    301 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    302 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    303 AWT_filter.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    304 AWT_filter.o: $(ARBHOME)/INCLUDE/smartptr.h 
    305224 
    306225AWT_hotkeys.o: awt_hotkeys.hxx 
     
    328247AWT_input_mask.o: $(ARBHOME)/INCLUDE/smartptr.h 
    329248 
    330 AWT_irstree.o: awt_canvas.hxx 
    331 AWT_irstree.o: awt_dtree.hxx 
    332 AWT_irstree.o: awt_nds.hxx 
    333 AWT_irstree.o: awt_pro_a_nucs.hxx 
    334 AWT_irstree.o: awt_tree.hxx 
    335 AWT_irstree.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    336 AWT_irstree.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    337 AWT_irstree.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    338 AWT_irstree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    339 AWT_irstree.o: $(ARBHOME)/INCLUDE/arb_error.h 
    340 AWT_irstree.o: $(ARBHOME)/INCLUDE/arbdb.h 
    341 AWT_irstree.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    342 AWT_irstree.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    343 AWT_irstree.o: $(ARBHOME)/INCLUDE/arbtools.h 
    344 AWT_irstree.o: $(ARBHOME)/INCLUDE/attributes.h 
    345 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    346 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    347 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    348 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    349 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    350 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    351 AWT_irstree.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    352 AWT_irstree.o: $(ARBHOME)/INCLUDE/smartptr.h 
    353  
    354249AWT_item_sel_list.o: awt.hxx 
    355250AWT_item_sel_list.o: awt_item_sel_list.hxx 
     
    434329AWT_nds.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    435330AWT_nds.o: $(ARBHOME)/INCLUDE/smartptr.h 
    436  
    437 AWT_nei.o: awt_nei.hxx 
    438 AWT_nei.o: awt_pro_a_nucs.hxx 
    439 AWT_nei.o: awt_tree.hxx 
    440 AWT_nei.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    441 AWT_nei.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    442 AWT_nei.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    443 AWT_nei.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    444 AWT_nei.o: $(ARBHOME)/INCLUDE/arb_error.h 
    445 AWT_nei.o: $(ARBHOME)/INCLUDE/arbdb.h 
    446 AWT_nei.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    447 AWT_nei.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    448 AWT_nei.o: $(ARBHOME)/INCLUDE/arbtools.h 
    449 AWT_nei.o: $(ARBHOME)/INCLUDE/attributes.h 
    450 AWT_nei.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    451 AWT_nei.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    452 AWT_nei.o: $(ARBHOME)/INCLUDE/smartptr.h 
    453331 
    454332AWT_preset.o: aw_def.hxx 
     
    474352AWT_preset.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    475353AWT_preset.o: $(ARBHOME)/INCLUDE/smartptr.h 
    476  
    477 AWT_pro_a_nucs.o: awt.hxx 
    478 AWT_pro_a_nucs.o: awt_codon_table.hxx 
    479 AWT_pro_a_nucs.o: awt_pro_a_nucs.hxx 
    480 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    481 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    482 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    483 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    484 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arb_error.h 
    485 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbdb.h 
    486 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    487 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    488 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbtools.h 
    489 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/attributes.h 
    490 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    491 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    492 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    493 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    494 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    495 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/inline.h 
    496 AWT_pro_a_nucs.o: $(ARBHOME)/INCLUDE/smartptr.h 
    497354 
    498355AWT_query_and_functions.o: awt.hxx 
     
    567424AWT_seq_colors.o: $(ARBHOME)/INCLUDE/smartptr.h 
    568425 
    569 AWT_seq_dna.o: awt_parsimony_defaults.hxx 
    570 AWT_seq_dna.o: awt_pro_a_nucs.hxx 
    571 AWT_seq_dna.o: awt_seq_dna.hxx 
    572 AWT_seq_dna.o: awt_tree.hxx 
    573 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    574 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    575 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    576 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    577 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arb_error.h 
    578 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arbdb.h 
    579 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    580 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    581 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/arbtools.h 
    582 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/attributes.h 
    583 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    584 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    585 AWT_seq_dna.o: $(ARBHOME)/INCLUDE/smartptr.h 
    586  
    587 AWT_seq_protein.o: awt_parsimony_defaults.hxx 
    588 AWT_seq_protein.o: awt_pro_a_nucs.hxx 
    589 AWT_seq_protein.o: awt_seq_protein.hxx 
    590 AWT_seq_protein.o: awt_tree.hxx 
    591 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    592 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    593 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    594 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    595 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arb_error.h 
    596 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arbdb.h 
    597 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    598 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    599 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/arbtools.h 
    600 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/attributes.h 
    601 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    602 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    603 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/inline.h 
    604 AWT_seq_protein.o: $(ARBHOME)/INCLUDE/smartptr.h 
    605  
    606 AWT_seq_simple_pro.o: awt_pro_a_nucs.hxx 
    607 AWT_seq_simple_pro.o: awt_seq_simple_pro.hxx 
    608 AWT_seq_simple_pro.o: awt_tree.hxx 
    609 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    610 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    611 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    612 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    613 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arb_error.h 
    614 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arbdb.h 
    615 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    616 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    617 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/arbtools.h 
    618 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/attributes.h 
    619 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    620 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    621 AWT_seq_simple_pro.o: $(ARBHOME)/INCLUDE/smartptr.h 
    622  
    623426AWT_tables.o: awt.hxx 
    624427AWT_tables.o: awt_sel_boxes.hxx 
     
    643446AWT_tables.o: $(ARBHOME)/INCLUDE/smartptr.h 
    644447 
    645 AWT_translate.o: awt.hxx 
    646 AWT_translate.o: awt_codon_table.hxx 
    647 AWT_translate.o: awt_pro_a_nucs.hxx 
    648 AWT_translate.o: awt_translate.hxx 
    649 AWT_translate.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    650 AWT_translate.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    651 AWT_translate.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    652 AWT_translate.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    653 AWT_translate.o: $(ARBHOME)/INCLUDE/arb_error.h 
    654 AWT_translate.o: $(ARBHOME)/INCLUDE/arbdb.h 
    655 AWT_translate.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    656 AWT_translate.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    657 AWT_translate.o: $(ARBHOME)/INCLUDE/arbtools.h 
    658 AWT_translate.o: $(ARBHOME)/INCLUDE/attributes.h 
    659 AWT_translate.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    660 AWT_translate.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    661 AWT_translate.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    662 AWT_translate.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    663 AWT_translate.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    664 AWT_translate.o: $(ARBHOME)/INCLUDE/smartptr.h 
    665  
    666 AWT_tree.o: awt.hxx 
    667 AWT_tree.o: awt_attributes.hxx 
    668 AWT_tree.o: awt_canvas.hxx 
    669 AWT_tree.o: awt_pro_a_nucs.hxx 
    670 AWT_tree.o: awt_tree.hxx 
    671 AWT_tree.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    672 AWT_tree.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    673 AWT_tree.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    674 AWT_tree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    675 AWT_tree.o: $(ARBHOME)/INCLUDE/arb_error.h 
    676 AWT_tree.o: $(ARBHOME)/INCLUDE/arbdb.h 
    677 AWT_tree.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    678 AWT_tree.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    679 AWT_tree.o: $(ARBHOME)/INCLUDE/arbtools.h 
    680 AWT_tree.o: $(ARBHOME)/INCLUDE/attributes.h 
    681 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    682 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    683 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    684 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    685 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    686 AWT_tree.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    687 AWT_tree.o: $(ARBHOME)/INCLUDE/smartptr.h 
    688  
    689 AWT_tree_cb.o: awt.hxx 
    690 AWT_tree_cb.o: awt_advice.hxx 
    691 AWT_tree_cb.o: awt_canvas.hxx 
    692 AWT_tree_cb.o: awt_dtree.hxx 
    693 AWT_tree_cb.o: awt_pro_a_nucs.hxx 
    694 AWT_tree_cb.o: awt_tree.hxx 
    695 AWT_tree_cb.o: awt_tree_cb.hxx 
    696 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    697 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    698 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    699 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    700 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arb_error.h 
    701 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arbdb.h 
    702 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    703 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    704 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/arbtools.h 
    705 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/attributes.h 
    706 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    707 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    708 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    709 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    710 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    711 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    712 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    713 AWT_tree_cb.o: $(ARBHOME)/INCLUDE/smartptr.h 
    714  
    715 AWT_tree_cmp.o: awt.hxx 
    716 AWT_tree_cmp.o: awt_pro_a_nucs.hxx 
    717 AWT_tree_cmp.o: awt_tree.hxx 
    718 AWT_tree_cmp.o: awt_tree_cmp.hxx 
    719 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    720 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    721 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    722 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    723 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arb_error.h 
    724 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arbdb.h 
    725 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    726 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    727 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/arbtools.h 
    728 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/attributes.h 
    729 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    730 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    731 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    732 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    733 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    734 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    735 AWT_tree_cmp.o: $(ARBHOME)/INCLUDE/smartptr.h 
    736  
    737448AWT_www.o: awt.hxx 
    738449AWT_www.o: awt_config_manager.hxx 
  • trunk/AWT/awt_canvas.hxx

    r5901 r6280  
    2424    AWT_MODE_ZOOM,          // no command 
    2525    AWT_MODE_LZOOM, 
    26     AWT_MODE_MOD, // species info 
     26    AWT_MODE_EDIT, // species info 
    2727    AWT_MODE_WWW, 
    2828    AWT_MODE_LINE, 
  • trunk/AWT/awt_item_sel_list.hxx

    r6141 r6280  
    2121    AWT_SF_HIDDEN   = 2, 
    2222    // continue with 4, 8 
    23     AWT_SF_ALL      = ((AWT_SF_HIDDEN<<1)-1),  
     23    AWT_SF_ALL      = ((AWT_SF_HIDDEN<<1)-1), 
    2424}; 
     25 
     26#define AWT_NDS_FILTER    (1<<GB_STRING)|(1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_BITS)|(1<<GB_LINK) 
     27#define AWT_PARS_FILTER   (1<<GB_STRING)|(1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_BITS)|(1<<GB_LINK) 
     28#define AWT_STRING_FILTER (1<<GB_STRING)|(1<<GB_BITS)|(1<<GB_LINK) 
     29 
     30struct ad_item_selector; 
    2531 
    2632AW_CL awt_create_selection_list_on_scandb(GBDATA                 *gb_main, 
  • trunk/AWT/awt_sel_boxes.hxx

    r5901 r6280  
    1414#define AWT_SEL_BOXES_HXX 
    1515 
    16 class  AP_filter; 
     16#ifndef ARBDBT_H 
     17#include <arbdbt.h> 
     18#endif 
     19#ifndef AW_ROOT_HXX 
     20#include <aw_root.hxx> 
     21#endif 
     22 
     23class AP_filter; 
    1724struct adfiltercbstruct; 
    1825 
     
    6976                               AW_window* (*create_popup)(AW_root *, AW_default)); // .. or create_popup  (both together not allowed) 
    7077 
    71 /***********************    FILTERS     ************************/ 
    72 adfiltercbstruct *awt_create_select_filter(AW_root *aw_root,GBDATA *gb_main, const char *def_name); 
    73 /* Create a data structure for filters (needed for awt_create_select_filter_win */ 
    74 /* Create a filter selection box, this box needs 3 AWARS: 
    75    1. "$def_name" 
    76    2. "$def_name:/name=/filter" 
    77    3. "$def_name:/name=/alignment" 
    78    and some internal awars 
    79 */ 
    80 void awt_set_awar_to_valid_filter_good_for_tree_methods(GBDATA *gb_main,AW_root *awr, const char *awar_name); 
    81  
    82 AW_window *awt_create_select_filter_win(AW_root *aw_root, AW_CL cd_adfiltercbstruct); 
    83 /* not just the box, but the whole window */ 
    84  
    85 AP_filter *awt_get_filter(AW_root *aw_root, adfiltercbstruct *acbs); 
    86  
    87 char *AWT_get_combined_filter_name(AW_root *aw_root, GB_CSTR prefix); 
    88  
    89 #define AWT_NDS_FILTER (1<<GB_STRING)|(1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_BITS)|(1<<GB_LINK) 
    90 #define AWT_PARS_FILTER (1<<GB_STRING)|(1<<GB_BYTE)|(1<<GB_INT)|(1<<GB_FLOAT)|(1<<GB_BITS)|(1<<GB_LINK) 
    91 #define AWT_STRING_FILTER (1<<GB_STRING)|(1<<GB_BITS)|(1<<GB_LINK) 
    92  
    9378/***********************    species fields     ************************/ 
    9479 
  • trunk/AWTI/AWTI_export.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <unistd.h> 
    4 #include <string.h> 
    5 // #include <malloc.h> 
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8 #include <aw_root.hxx> 
    9 #include <aw_device.hxx> 
    10 #include <aw_window.hxx> 
     1#include "awti_export.hxx" 
     2#include "awti_exp_local.hxx" 
     3 
     4#include <aw_awars.hxx> 
    115#include <aw_global.hxx> 
    126#include <awt.hxx> 
    13 #include <awt_tree.hxx> 
     7#include <awt_filter.hxx> 
     8#include <AP_filter.hxx> 
     9#include <xml.hxx> 
    1410#include <inline.h> 
    15  
    16 #include "awti_export.hxx" 
    17 #include "awti_exp_local.hxx" 
    18 #include "awt_sel_boxes.hxx" 
    19 #include "aw_awars.hxx" 
    20  
    21 #include "xml.hxx" 
    2211 
    2312#define awte_assert(cond) arb_assert(cond) 
     
    173162    int                  compress; // 0 = no;1 = vertical gaps; 2 = all gaps; 
    174163 
    175     size_t  max_ali_len;        // length of alignment 
    176     int    *export_column;      // list of exported seq data positions 
    177     int     columns;            // how many columns get exported 
    178  
    179     GBDATA *single_species;     // if != NULL -> first/next only return that species (used to export to multiple files)  
     164    size_t  max_ali_len;                            // length of alignment 
     165    size_t *export_column;                          // list of exported seq data positions 
     166    size_t  columns;                                // how many columns get exported 
     167 
     168    GBDATA *single_species;     // if != NULL -> first/next only return that species (used to export to multiple files) 
    180169 
    181170public: 
     
    214203        } 
    215204 
    216         if (size_t(filter->filter_len) < max_ali_len) { 
    217             aw_message(GBS_global_string("Warning: Your filter is shorter than the alignment (%li<%zu)", 
    218                                          filter->filter_len, max_ali_len)); 
    219             max_ali_len = filter->filter_len; 
     205        if (filter->get_length() < max_ali_len) { 
     206            aw_message(GBS_global_string("Warning: Your filter is shorter than the alignment (%zu<%zu)", 
     207                                         filter->get_length(), max_ali_len)); 
     208            max_ali_len = filter->get_length(); 
    220209        } 
    221210    } 
     
    276265    awte_assert(!in_single_mode()); 
    277266 
    278     filter->calc_filter_2_seq(); 
    279267    if (compress == 1) {        // compress vertical gaps! 
    280         int  gap_columns        = filter->real_len; 
    281         int *gap_column         = new int[gap_columns+1]; 
    282         memcpy(gap_column, filter->filterpos_2_seqpos, gap_columns*sizeof(*gap_column)); 
     268        size_t  gap_columns = filter->get_filtered_length(); 
     269        size_t *gap_column  = new size_t[gap_columns+1]; 
     270 
     271        const size_t *filterpos_2_seqpos = filter->get_filterpos_2_seqpos(); 
     272        memcpy(gap_column, filterpos_2_seqpos, gap_columns*sizeof(*gap_column)); 
    283273        gap_column[gap_columns] = max_ali_len; 
    284274 
     
    302292 
    303293            if (!err) { 
    304                 int j = 0; 
    305                 int i; 
     294                size_t j = 0; 
     295                size_t i; 
    306296                for (i = 0; i<gap_columns; ++i) { 
    307297                    if (isGap(sdata[gap_column[i]])) { 
     
    311301                } 
    312302 
    313                 int skipped_columns  = i-j; 
    314                 gap_columns      -= skipped_columns; 
    315                 awte_assert(gap_columns >= 0); 
     303                awte_assert(i >= j); 
     304                size_t skipped_columns  = i-j; 
     305                awte_assert(gap_columns >= skipped_columns); 
     306                gap_columns            -= skipped_columns; 
    316307            } 
    317308            ++count; 
     
    325316 
    326317        if (!err) { 
    327             columns       = filter->real_len - gap_columns; 
    328             export_column = new int[columns]; 
    329  
    330             int gpos = 0;           // index into array of vertical gaps 
    331             int epos = 0;           // index into array of exported columns 
    332             int flen = filter->real_len; 
    333             int a; 
     318            columns       = filter->get_filtered_length() - gap_columns; 
     319            export_column = new size_t[columns]; 
     320 
     321            size_t gpos = 0;           // index into array of vertical gaps 
     322            size_t epos = 0;           // index into array of exported columns 
     323            size_t flen = filter->get_filtered_length(); 
     324            size_t a; 
    334325            for (a = 0; a<flen && gpos<gap_columns; ++a) { 
    335                 int fpos = filter->filterpos_2_seqpos[a]; 
     326                size_t fpos = filterpos_2_seqpos[a]; 
    336327                if (fpos == gap_column[gpos]) { // only gaps here -> skip column 
    337328                    gpos++; 
     
    344335            } 
    345336            for (; a<flen; ++a) { 
    346                 export_column[epos++] = filter->filterpos_2_seqpos[a]; 
     337                export_column[epos++] = filterpos_2_seqpos[a]; 
    347338            } 
    348339 
     
    351342 
    352343        delete [] gap_column; 
    353         delete [] filter->filterpos_2_seqpos; 
    354         filter->filterpos_2_seqpos = 0; 
    355344    } 
    356345    else { // compress all or none (simply use filter) 
    357         export_column              = filter->filterpos_2_seqpos; 
    358         filter->filterpos_2_seqpos = 0; 
    359         columns                    = filter->real_len; 
     346        const size_t *filterpos_2_seqpos = filter->get_filterpos_2_seqpos(); 
     347 
     348        columns       = filter->get_filtered_length(); 
     349        export_column = new size_t[columns]; 
     350 
     351        memcpy(export_column, filterpos_2_seqpos, columns*sizeof(*filterpos_2_seqpos)); 
    360352    } 
    361353 
     
    377369        } 
    378370        else { 
    379             int          i; 
    380             const uchar *simplify = filter->simplify; 
     371            size_t       i; 
     372            const uchar *simplify = filter->get_simplify_table(); 
    381373 
    382374            if (cut_stop_codon) { 
     
    388380 
    389381            if (compress == 2) { // compress all gaps 
    390                 int j = 0; 
     382                size_t j = 0; 
    391383                for (i = 0; i<columns; ++i) { 
    392384                    size_t seq_pos = export_column[i]; 
  • trunk/AWTI/Makefile

    r6277 r6280  
    3535AWTI_export.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3636AWTI_export.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     37AWTI_export.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    3738AWTI_export.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    3839AWTI_export.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    4344AWTI_export.o: $(ARBHOME)/INCLUDE/attributes.h 
    4445AWTI_export.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    45 AWTI_export.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    4646AWTI_export.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    4747AWTI_export.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
     
    5151AWTI_export.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    5252AWTI_export.o: $(ARBHOME)/INCLUDE/awt.hxx 
    53 AWTI_export.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    54 AWTI_export.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    55 AWTI_export.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     53AWTI_export.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    5654AWTI_export.o: $(ARBHOME)/INCLUDE/inline.h 
    5755AWTI_export.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/AWTI/awti_export.hxx

    r6091 r6280  
    1313#define AWTI_EXPORT_HXX 
    1414 
    15 #ifndef ARB_ASSERT_H 
    16 #include <arb_assert.h> 
     15#ifndef ARBDBT_H 
     16#include <arbdbt.h> 
    1717#endif 
     18 
     19class AW_window; 
     20class AW_root; 
    1821 
    1922AW_window *open_AWTC_export_window(AW_root *awr,GBDATA *gb_main); 
  • trunk/DIST/DI_clusters.cxx

    r6252 r6280  
    4848 
    4949void DI_create_cluster_awars(AW_root *aw_root, AW_default def, AW_default db) { 
    50     aw_root->awar_float(AWAR_CLUSTER_MAXDIST, 0.5, def)->set_minmax(0.0, 100.0); 
     50    aw_root->awar_float(AWAR_CLUSTER_MAXDIST, 3.0, def)->set_minmax(0.0, 100.0); 
    5151    aw_root->awar_int(AWAR_CLUSTER_MINSIZE, 7, def)->set_minmax(2, INT_MAX); 
    5252    aw_root->awar_int(AWAR_CLUSTER_AUTOMARK, 1, def); 
  • trunk/DIST/DI_compress_matrix.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <string.h> 
    3 #include <stdlib.h> 
    4 #include <memory.h> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8  
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <aw_preset.hxx> 
    13  
    14 #include <awt_tree.hxx> 
    15 #include "dist.hxx" 
    16  
    17 #include <di_matr.hxx> 
    18 #include <di_view_matrix.hxx> 
     1#include "di_matr.hxx" 
    192 
    203/*  returns 1 only if groupname != null and there are species for that group */ 
  • trunk/DIST/DI_main.cxx

    r6247 r6280  
    1919 
    2020AW_window *DI_create_matrix_window(AW_root *aw_root); 
    21 void       DI_create_matrix_variables(AW_root *aw_root, AW_default aw_def); 
     21void       DI_create_matrix_variables(AW_root *aw_root, AW_default aw_def, AW_default db); 
    2222#ifdef FINDCORR 
    2323AW_window *bc_create_main_window( AW_root *awr); 
     
    8181    } 
    8282 
    83     DI_create_matrix_variables(aw_root,aw_default); 
     83    DI_create_matrix_variables(aw_root, aw_default, GLOBAL_gb_main); 
    8484#ifdef FINDCORR 
    8585    bc_create_bc_variables(aw_root,aw_default); 
  • trunk/DIST/DI_matr.cxx

    r6247 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 // #include <malloc.h> 
    5 #include <string.h> 
    6  
    7 #include <math.h> 
    8 #include <time.h> 
    9 #include <limits.h> 
    10  
    11 #include <arbdb.h> 
    12 #include <arbdbt.h> 
    13  
    14 #include <aw_root.hxx> 
    15 #include <aw_device.hxx> 
    16 #include <aw_window.hxx> 
    17 #include <aw_preset.hxx> 
    18 #include <aw_global.hxx> 
    19 #include <aw_awars.hxx> 
    20  
    21 #include <awt.hxx> 
    22 #include <awt_tree.hxx> 
    23 #include <awt_sel_boxes.hxx> 
    24 #include <awt_macro.hxx> 
    25 #include <awt_csp.hxx> 
    26  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : DI_matr.cxx                                       // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "di_protdist.hxx" 
     12#include "di_clusters.hxx" 
    2713#include "dist.hxx" 
     14#include "di_view_matrix.hxx" 
     15#include "di_matr.hxx" 
     16#include "di_awars.hxx" 
     17 
     18#include <neighbourjoin.hxx> 
     19#include <AP_seq_dna.hxx> 
     20#include <AP_filter.hxx> 
    2821#include <BI_helix.hxx> 
    2922#include <CT_ctree.hxx> 
    30 #include "di_matr.hxx" 
    31 #include "di_protdist.hxx" 
    32 #include "di_view_matrix.hxx" 
     23#include <awt_macro.hxx> 
     24#include <awt.hxx> 
     25#include <awt_sel_boxes.hxx> 
     26#include <awt_filter.hxx> 
     27#include <awt_csp.hxx> 
     28#include <aw_preset.hxx> 
     29#include <aw_awars.hxx> 
     30#include <aw_global.hxx> 
     31 
     32#include <gui_aliview.hxx> 
     33 
     34#include <climits> 
     35#include <ctime> 
    3336 
    3437#define di_assert(cond) arb_assert(cond) 
     
    3639// -------------------------------------------------------------------------------- 
    3740 
    38 #define AWAR_DIST_FILTER_PREFIX      AWAR_DIST_PREFIX "filter/" 
    39 #define AWAR_DIST_COLUMN_STAT_PREFIX AWAR_DIST_PREFIX "col_stat/" 
    40 #define AWAR_DIST_TREE_PREFIX        AWAR_DIST_PREFIX "tree/" 
    41  
    42 #define AWAR_DIST_MATRIX_DNA_BASE    AWAR_DIST_PREFIX "dna/matrix" 
    43 #define AWAR_DIST_MATRIX_DNA_ENABLED "tmp/" AWAR_DIST_MATRIX_DNA_BASE "/enable" 
    44  
    45 #define AWAR_DIST_WHICH_SPECIES   AWAR_DIST_PREFIX "which_species" 
    46 #define AWAR_DIST_ALIGNMENT       AWAR_DIST_PREFIX "alignment" 
    4741#define AWAR_DIST_BOOTSTRAP_COUNT AWAR_DIST_PREFIX "bootstrap/count" 
    4842#define AWAR_DIST_CANCEL_CHARS    AWAR_DIST_PREFIX "cancel/chars" 
    4943 
    50 #define AWAR_DIST_FILTER_ALIGNMENT AWAR_DIST_FILTER_PREFIX "alignment" 
    51 #define AWAR_DIST_FILTER_NAME      AWAR_DIST_FILTER_PREFIX "name" 
    52 #define AWAR_DIST_FILTER_FILTER    AWAR_DIST_FILTER_PREFIX "filter" 
    53 #define AWAR_DIST_FILTER_SIMPLIFY  AWAR_DIST_FILTER_PREFIX "simplify" 
    54  
    5544#define AWAR_DIST_COLUMN_STAT_ALIGNMENT AWAR_DIST_COLUMN_STAT_PREFIX "alignment" 
    5645#define AWAR_DIST_COLUMN_STAT_NAME      AWAR_DIST_COLUMN_STAT_PREFIX "name" 
    5746 
    58 #define AWAR_DIST_TREE_STD_NAME  AWAR_DIST_TREE_PREFIX "tree_name" 
    59 #define AWAR_DIST_TREE_CURR_NAME "tmp/" AWAR_DIST_TREE_PREFIX "curr_tree_name" 
    6047#define AWAR_DIST_TREE_SORT_NAME "tmp/" AWAR_DIST_TREE_PREFIX "sort_tree_name" 
    6148#define AWAR_DIST_TREE_COMP_NAME "tmp/" AWAR_DIST_TREE_PREFIX "compr_tree_name" 
     49#define AWAR_DIST_TREE_STD_NAME  AWAR_DIST_TREE_PREFIX "tree_name" 
    6250 
    6351#define AWAR_DIST_SAVE_MATRIX_TYPE     AWAR_DIST_SAVE_MATRIX_BASE "/type" 
     
    6654// -------------------------------------------------------------------------------- 
    6755 
    68 DI_MATRIX   *DI_MATRIX::ROOT = 0; 
    69 DI_dmatrix *di_dmatrix     = 0; 
    70 AWT_csp    *global_csp     = 0; 
    71  
    72 static adfiltercbstruct *dist_filter_cl = 0; 
     56DI_MATRIX  *DI_MATRIX::ROOT = 0; 
     57DI_dmatrix *di_dmatrix      = 0; 
    7358 
    7459AP_matrix DI_dna_matrix(AP_MAX); 
     
    10489} 
    10590 
    106 void DI_create_matrix_variables(AW_root *aw_root, AW_default def) 
     91void DI_create_matrix_variables(AW_root *aw_root, AW_default def, AW_default db) 
    10792{ 
    108     GB_transaction dummy(GLOBAL_gb_main); 
     93    GB_transaction dummy(db); 
    10994    DI_dna_matrix.set_description("",""); 
    11095    DI_dna_matrix.x_description[AP_A] = strdup("A"); 
     
    132117    aw_root->awar_string(AWAR_DIST_WHICH_SPECIES, "marked", def)->add_callback(delete_matrix_cb); 
    133118    { 
    134         char *default_ali = GBT_get_default_alignment(GLOBAL_gb_main); 
     119        char *default_ali = GBT_get_default_alignment(db); 
    135120        aw_root->awar_string( AWAR_DIST_ALIGNMENT,"",def)      ->add_callback(delete_matrix_cb)->write_string(default_ali); 
    136121        free(default_ali); 
     
    155140    aw_root->awar_string(AWAR_DIST_TREE_STD_NAME,  "tree_nj", def); 
    156141    { 
    157         char *currentTree = aw_root->awar_string(AWAR_TREE, "", GLOBAL_gb_main)->read_string(); 
     142        char *currentTree = aw_root->awar_string(AWAR_TREE, "", db)->read_string(); 
    158143        aw_root->awar_string(AWAR_DIST_TREE_CURR_NAME, currentTree, def); 
    159144        aw_root->awar_string(AWAR_DIST_TREE_SORT_NAME, currentTree, def)->add_callback(delete_matrix_cb); 
     
    166151    aw_root->awar_float(AWAR_DIST_MIN_DIST, 0.0); 
    167152    aw_root->awar_float(AWAR_DIST_MAX_DIST, 0.0); 
    168      
    169     aw_root->awar_string(AWAR_SPECIES_NAME, "", GLOBAL_gb_main); 
     153 
     154    aw_root->awar_string(AWAR_SPECIES_NAME, "", db); 
     155 
     156    DI_create_cluster_awars(aw_root, def, db); 
    170157 
    171158#if defined(DEBUG) 
     
    173160#endif // DEBUG 
    174161 
    175     GB_push_transaction(GLOBAL_gb_main); 
    176  
    177     GBDATA *gb_species_data = GB_search(GLOBAL_gb_main,"species_data",GB_CREATE_CONTAINER); 
    178     GB_add_callback(gb_species_data,GB_CB_CHANGED,(GB_CB)delete_matrix_cb,0); 
    179  
    180     GB_pop_transaction(GLOBAL_gb_main); 
    181  
    182 } 
    183  
    184 DI_ENTRY::DI_ENTRY(GBDATA *gbd,class DI_MATRIX *phmatri) { 
     162    { 
     163        GB_push_transaction(db); 
     164 
     165        GBDATA *gb_species_data = GB_search(db,"species_data",GB_CREATE_CONTAINER); 
     166        GB_add_callback(gb_species_data,GB_CB_CHANGED,(GB_CB)delete_matrix_cb,0); 
     167 
     168        GB_pop_transaction(db); 
     169    } 
     170} 
     171 
     172DI_ENTRY::DI_ENTRY(GBDATA *gbd, DI_MATRIX *phmatri) { 
    185173    memset((char *)this,0,sizeof(DI_ENTRY)); 
    186174    phmatrix = phmatri; 
    187175 
    188     GBDATA *gb_ali = GB_entry(gbd,phmatrix->use); 
     176    GBDATA *gb_ali = GB_entry(gbd, phmatrix->get_aliname()); 
    189177    if (gb_ali) { 
    190178        GBDATA *gb_data = GB_entry(gb_ali,"data"); 
    191179        if (gb_data) { 
    192             const char *seq = GB_read_char_pntr(gb_data); 
    193              
    194180            if (phmatrix->is_AA) { 
    195                 sequence = sequence_protein = new AP_sequence_simple_protein(phmatrix->tree_root); 
     181                sequence = sequence_protein = new AP_sequence_simple_protein(phmatrix->get_aliview()); 
    196182            } 
    197183            else { 
    198                 sequence = sequence_parsimony = new AP_sequence_parsimony(phmatrix->tree_root); 
    199             } 
    200             sequence->set(seq); 
     184                sequence = sequence_parsimony = new AP_sequence_parsimony(phmatrix->get_aliview()); 
     185            } 
     186            sequence->bind_to_species(gbd); 
     187            sequence->lazy_load_sequence(); // load sequence 
    201188 
    202189            name      = GBT_read_string(gbd, "name"); 
     
    206193} 
    207194 
    208 DI_ENTRY::DI_ENTRY(char *namei,class DI_MATRIX *phmatri) 
     195DI_ENTRY::DI_ENTRY(char *namei, DI_MATRIX *phmatri) 
    209196{ 
    210197    memset((char *)this,0,sizeof(DI_ENTRY)); 
     
    222209} 
    223210 
    224 DI_MATRIX::DI_MATRIX(GBDATA *gb_maini,AW_root *awr) 
    225 { 
    226     memset((char *)this,0,sizeof(DI_MATRIX)); 
     211DI_MATRIX::DI_MATRIX(const AliView& aliview_, AW_root *awr) { 
     212    memset((char *)this, 0, sizeof(*this)); 
    227213    aw_root = awr; 
    228     gb_main = gb_maini; 
    229 } 
    230  
    231 char *DI_MATRIX::unload(void) 
    232 { 
    233     freeset(use, 0); 
    234     long i; 
    235     for (i=0;i<nentries;i++){ 
     214    aliview = new AliView(aliview_); 
     215} 
     216 
     217char *DI_MATRIX::unload() { 
     218    for (long i=0; i<nentries; i++) { 
    236219        delete entries[i]; 
    237220    } 
    238     delete tree_root; 
    239221    freeset(entries, 0); 
    240222    nentries = 0; 
     
    242224} 
    243225 
    244 DI_MATRIX::~DI_MATRIX(void) 
     226DI_MATRIX::~DI_MATRIX() 
    245227{ 
    246228    unload(); 
    247229    delete matrix; 
     230    delete aliview;  
    248231} 
    249232 
     
    255238} 
    256239 
    257 char *DI_MATRIX::load(char *usei, AP_filter *filter, AP_weights *weights, LoadWhat what, GB_CSTR sort_tree_name, bool show_warnings, GBDATA **species_list) { 
    258     delete tree_root; 
    259     tree_root = new AP_tree_root(gb_main,0,0); 
    260     tree_root->filter = filter; 
    261     tree_root->weights = weights; 
    262     this->use = strdup(usei); 
    263     this->gb_main = GLOBAL_gb_main; 
     240char *DI_MATRIX::load(LoadWhat what, GB_CSTR sort_tree_name, bool show_warnings, GBDATA **species_list) { 
     241    GBDATA     *gb_main = get_gb_main(); 
     242    const char *use     = get_aliname(); 
     243     
    264244    GB_push_transaction(gb_main); 
    265245 
     
    452432} 
    453433 
    454 long *DI_MATRIX::create_helix_filter(BI_helix *helix,AP_filter *filter){ 
    455     long *result = (long *)calloc(sizeof(long),(size_t)filter->real_len); 
    456     long *temp = (long *)calloc(sizeof(long),(size_t)filter->real_len); 
    457     int i,count; 
    458     count = 0; 
    459     for (i=0;i<filter->filter_len;i++) { 
    460         if (filter->filter_mask[i]) { 
     434long *DI_MATRIX::create_helix_filter(BI_helix *helix, const AP_filter *filter){ 
     435    long   *result = (long *)calloc(sizeof(long), filter->get_filtered_length()); 
     436    long   *temp   = (long *)calloc(sizeof(long), filter->get_filtered_length()); 
     437    int     count  = 0; 
     438    size_t  i; 
     439 
     440    for (i=0; i<filter->get_length(); i++) { 
     441        if (filter->use_position(i)) { 
    461442            temp[i] = count; 
    462443            if (helix->pairtype(i)== HELIX_PAIR) { 
    463444                result[count] = helix->opposite_position(i); 
    464             }else{ 
     445            } 
     446            else { 
    465447                result[count] = -1; 
    466448            } 
     
    482464        return "There are no species selected"; 
    483465    } 
    484     long   row,col,pos,s_len; 
    485     unsigned char *seq1,*seq2; 
    486     s_len = tree_root->filter->real_len; 
     466    long row,col,pos,s_len; 
     467     
     468    const unsigned char *seq1,*seq2; 
     469    s_len = aliview->get_length(); 
    487470    this->clear(hrates); 
    488471    this->clear(nrates); 
     
    492475        if (aw_status(gauge*gauge)) return "Aborted"; 
    493476        for (col=0; col<row; col++) { 
    494             seq1 = (unsigned char *)entries[row]->sequence_parsimony->sequence; 
    495             seq2 = (unsigned char *)entries[col]->sequence_parsimony->sequence; 
     477            seq1 = entries[row]->sequence_parsimony->get_usequence(); 
     478            seq2 = entries[col]->sequence_parsimony->get_usequence(); 
    496479            for (pos = 0; pos < s_len; pos++){ 
    497480                if(filter[pos]>=0) { 
     
    505488    } 
    506489    for (row = 0; row<nentries;row++){ 
    507         seq1 = (unsigned char *)entries[row]->sequence_parsimony->sequence; 
     490        seq1 = entries[row]->sequence_parsimony->get_usequence(); 
    508491        for (pos = 0; pos < s_len; pos++){ 
    509492            if(filter[pos]>=0) { 
     
    525508    static BI_helix *helix = 0; 
    526509    if (!helix) helix = new BI_helix(); 
    527     const char *error = helix->init(gb_main); 
     510    const char *error = helix->init(get_gb_main()); 
    528511    if (error) return error; 
    529512 
     
    535518 
    536519    fprintf(out,"Pairs in helical regions:\n"); 
    537     long *filter = create_helix_filter(helix,tree_root->filter); 
     520    long *filter = create_helix_filter(helix, aliview->get_filter()); 
    538521    error = calculate_rates(temp,temp2,pairs,filter); 
    539522    if (error){ 
     
    549532    rate_write(temp2,out); 
    550533 
    551     long   row,col,pos,s_len; 
    552     char *seq1,*seq2; 
    553     s_len = tree_root->filter->real_len; 
     534    long row,col,pos,s_len; 
     535 
     536    s_len = aliview->get_length(); 
    554537    fprintf(out,"\nDistance matrix (Helixdist Helixlen Nonhelixdist Nonhelixlen):"); 
    555538    fprintf(out,"\n%li",nentries); 
     539 
    556540    const int MAXDISTDEBUG = 1000; 
    557     double distdebug[MAXDISTDEBUG]; 
     541    double    distdebug[MAXDISTDEBUG]; 
     542 
    558543    for (pos = 0;pos<MAXDISTDEBUG;pos++) distdebug[pos] = 0.0; 
     544     
    559545    for (row = 0; row<nentries;row++){ 
    560546        if ( nentries > 100 || ((row&0xf) == 0)){ 
     
    568554 
    569555        for (col=0; col<row; col++) { 
    570             seq1 = entries[row]->sequence_parsimony->sequence; 
    571             seq2= entries[col]->sequence_parsimony->sequence; 
     556            const unsigned char *seq1,*seq2; 
     557 
     558            seq1 = entries[row]->sequence_parsimony->get_usequence(); 
     559            seq2 = entries[col]->sequence_parsimony->get_usequence(); 
    572560            this->clear(temp); 
    573561            this->clear(temp2); 
     562             
    574563            for (pos = 0; pos < s_len; pos++){ 
    575                 if(filter[pos]>=0) { 
    576                     temp[(unsigned char)*seq1][(unsigned char)*seq2]++; 
    577                 }else{ 
    578                     temp2[(unsigned char)*seq1][(unsigned char)*seq2]++; 
    579                 } 
     564                if (filter[pos]>=0) temp [*seq1][*seq2]++; 
     565                else                temp2[*seq1][*seq2]++; 
    580566                seq1++; seq2++; 
    581567            } 
     
    619605char *DI_MATRIX::calculate_overall_freqs(double rel_frequencies[AP_MAX], char *cancel) 
    620606{ 
    621     long  hits2[AP_MAX]; 
    622     long  sum   = 0; 
    623     int   i,row; 
    624     char *seq1; 
    625     int   pos; 
    626     int   b; 
    627     long  s_len = tree_root->filter->real_len; 
     607    long hits2[AP_MAX]; 
     608    long sum   = 0; 
     609    int  i,row; 
     610    int  pos; 
     611    int  b; 
     612    long s_len = aliview->get_length(); 
    628613 
    629614    memset((char *) &hits2[0], 0, sizeof(hits2)); 
    630615    for (row = 0; row < nentries; row++) { 
    631         seq1 = entries[row]->sequence_parsimony->sequence; 
     616        const char *seq1 = entries[row]->sequence_parsimony->get_sequence(); 
    632617        for (pos = 0; pos < s_len; pos++) { 
    633618            b = *(seq1++); 
     
    678663    matrix = new AP_smatrix(nentries); 
    679664 
    680     long   s_len = tree_root->filter->real_len; 
     665    long   s_len = aliview->get_length(); 
    681666    long   hits[AP_MAX][AP_MAX]; 
    682667    int    row; 
     
    719704        for (col=0; col<=row; col++) { 
    720705            columns    = 0; 
    721             char *seq1 = entries[row]->sequence_parsimony->sequence; 
    722             char *seq2 = entries[col]->sequence_parsimony->sequence; 
     706            const unsigned char *seq1 = entries[row]->sequence_parsimony->get_usequence(); 
     707            const unsigned char *seq2 = entries[col]->sequence_parsimony->get_usequence(); 
    723708            b          = 0.0; 
    724709            switch(transformation){ 
     
    732717                        int pos; 
    733718                        for (pos = s_len; pos >=0; pos--){ 
    734                             hits[(unsigned char)*(seq1++)][(unsigned char)*(seq2++)]++; 
     719                            hits[*(seq1++)][*(seq2++)]++; 
    735720                        } 
    736721                        int x,y; 
     
    782767                    memset((char *)hits,0,sizeof(long) * AP_MAX * AP_MAX); 
    783768                    for (pos = s_len; pos >=0; pos--){ 
    784                         hits[(unsigned char)*(seq1++)][(unsigned char)*(seq2++)]++; 
     769                        hits[*(seq1++)][*(seq2++)]++; 
    785770                    } 
    786771                    switch(transformation){ 
     
    890875    matrix = new AP_smatrix(nentries); 
    891876 
    892     di_protdist prodist(whichcode, whichcat, nentries,entries, tree_root->filter->real_len,matrix); 
     877    di_protdist prodist(whichcode, whichcat, nentries, entries, aliview->get_length(), matrix); 
    893878    return prodist.makedists(); 
    894879} 
    895880 
    896 static GB_ERROR di_calculate_matrix_cb(AW_window *aww, AW_CL bootstrap_flag, AW_CL cl_show_warnings) // returns "Aborted" if stopped by user 
    897 { 
    898     bool show_warnings = (bool)cl_show_warnings; 
     881static GB_ERROR di_calculate_matrix(AW_window *aww, const WeightedFilter *weighted_filter, bool bootstrap_flag, bool show_warnings) { 
     882    // returns "Aborted" if stopped by user 
    899883    GB_push_transaction(GLOBAL_gb_main); 
    900884    if (DI_MATRIX::ROOT){ 
     
    918902    char *cancel = aw_root->awar(AWAR_DIST_CANCEL_CHARS)->read_string(); 
    919903 
    920     AP_filter *ap_filter = awt_get_filter(aw_root, dist_filter_cl); 
    921     if (bootstrap_flag){ 
    922         ap_filter->enable_bootstrap(); 
    923     } 
    924  
    925     AP_weights *ap_weights = new AP_weights; 
    926     ap_weights->init(ap_filter); 
     904    AliView *aliview = weighted_filter->create_aliview(use); 
     905    if (bootstrap_flag) aliview->get_filter()->enable_bootstrap(); 
    927906 
    928907    char *load_what      = aw_root->awar(AWAR_DIST_WHICH_SPECIES)->read_string(); 
     
    932911    GB_ERROR error    = 0; 
    933912    { 
    934         DI_MATRIX *phm = new DI_MATRIX(GLOBAL_gb_main,aw_root); 
     913        DI_MATRIX *phm   = new DI_MATRIX(*aliview, aw_root); 
    935914        phm->matrix_type = DI_MATRIX_FULL; 
    936         phm->load(use, ap_filter, ap_weights, all_flag, sort_tree_name, show_warnings, NULL); 
     915        phm->load(all_flag, sort_tree_name, show_warnings, NULL); 
     916         
    937917        free(sort_tree_name); 
    938918        GB_pop_transaction(GLOBAL_gb_main); 
    939919        if (aw_status()) { 
    940920            phm->unload(); 
    941             return "Aborted"; 
    942         } 
    943  
    944         DI_TRANSFORMATION trans = (DI_TRANSFORMATION)aw_root->awar(AWAR_DIST_CORR_TRANS)->read_int(); 
    945  
    946         if (phm->is_AA){ 
    947             error = phm->calculate_pro(trans); 
    948         }else{ 
    949             error = phm->calculate(aw_root,cancel,0.0,trans); 
    950         } 
    951         if (!bootstrap_flag){ 
    952             aw_closestatus(); 
    953         } 
     921            error = "Aborted"; 
     922        } 
     923        else { 
     924            DI_TRANSFORMATION trans = (DI_TRANSFORMATION)aw_root->awar(AWAR_DIST_CORR_TRANS)->read_int(); 
     925 
     926            if (phm->is_AA) error = phm->calculate_pro(trans); 
     927            else error            = phm->calculate(aw_root,cancel,0.0,trans); 
     928        } 
     929        if (!bootstrap_flag) aw_closestatus(); 
    954930        delete phm->ROOT; 
    955931        if (error && strcmp(error,"Aborted")){ 
     
    960936        else { 
    961937            phm->ROOT = phm; 
    962  
    963938        } 
    964939    } 
     
    966941 
    967942    free(cancel); 
    968     delete ap_filter; 
    969     delete ap_weights; 
     943    delete aliview;  
    970944 
    971945    free(use); 
     
    973947} 
    974948 
    975 static void di_mark_by_distance(AW_window *aww) { 
     949static void di_mark_by_distance(AW_window *aww, AW_CL cl_weightedFilter) { 
    976950    AW_root *aw_root    = aww->get_root(); 
    977951    double   lowerBound = aw_root->awar(AWAR_DIST_MIN_DIST)->read_float(); 
     
    1003977            } 
    1004978            else { 
    1005                 char              *use           = aw_root->awar(AWAR_DIST_ALIGNMENT)->read_string(); 
    1006                 char              *cancel        = aw_root->awar(AWAR_DIST_CANCEL_CHARS)->read_string(); 
    1007                 AP_filter         *ap_filter     = awt_get_filter(aw_root,dist_filter_cl); 
    1008                 AP_weights        *ap_weights    = new AP_weights; 
    1009                 AP_smatrix        *ap_ratematrix = 0; 
    1010                 DI_TRANSFORMATION  trans         = (DI_TRANSFORMATION)aw_root->awar(AWAR_DIST_CORR_TRANS)->read_int(); 
    1011  
    1012                 ap_weights->init(ap_filter); 
     979                char              *use             = aw_root->awar(AWAR_DIST_ALIGNMENT)->read_string(); 
     980                char              *cancel          = aw_root->awar(AWAR_DIST_CANCEL_CHARS)->read_string(); 
     981                AP_smatrix        *ap_ratematrix   = 0; 
     982                DI_TRANSFORMATION  trans           = (DI_TRANSFORMATION)aw_root->awar(AWAR_DIST_CORR_TRANS)->read_int(); 
     983                WeightedFilter    *weighted_filter = (WeightedFilter*)cl_weightedFilter; 
     984                AliView           *aliview         = weighted_filter->create_aliview(use); 
    1013985 
    1014986                if (!error) { 
     
    10281000                         gb_species = GBT_next_species(gb_species)) 
    10291001                    { 
    1030                         DI_MATRIX *phm         = new DI_MATRIX(GLOBAL_gb_main, aw_root); 
     1002                        DI_MATRIX *phm         = new DI_MATRIX(*aliview, aw_root); 
    10311003                        phm->matrix_type       = DI_MATRIX_FULL; 
    10321004                        GBDATA *species_pair[] = { gb_selected, gb_species, NULL }; 
    10331005 
    1034                         phm->load(use, ap_filter, ap_weights, DI_LOAD_LIST, NULL, false, species_pair); 
     1006                        phm->load(DI_LOAD_LIST, NULL, false, species_pair); 
    10351007 
    10361008                        if (phm->is_AA){ 
     
    10641036 
    10651037                delete ap_ratematrix; 
    1066                 delete ap_weights; 
    1067                 delete ap_filter; 
     1038                delete aliview; 
    10681039                free(cancel); 
    10691040                free(use); 
     
    10881059} 
    10891060 
    1090 static void di_view_matrix_cb(AW_window *aww){ 
    1091     GB_ERROR error = di_calculate_matrix_cb(aww,0,true); 
     1061static void di_view_matrix_cb(AW_window *aww, AW_CL cl_sparam) { 
     1062    save_matrix_params *sparam = (save_matrix_params*)cl_sparam; 
     1063    GB_ERROR            error  = di_calculate_matrix(aww, sparam->weighted_filter, 0, true); 
    10921064    if (error) return; 
    10931065 
     
    10971069    if (!viewer) { 
    10981070        AW_root *aw_root = aww->get_root(); 
    1099         viewer           = DI_create_view_matrix_window(aw_root, di_dmatrix); 
     1071        viewer           = DI_create_view_matrix_window(aw_root, di_dmatrix, sparam); 
    11001072         
    11011073        AW_awar *awar_sel = aw_root->awar(AWAR_SPECIES_NAME); 
     
    11091081} 
    11101082 
    1111 static void di_save_matrix_cb(AW_window *aww) 
    1112 { 
     1083static void di_save_matrix_cb(AW_window *aww, AW_CL cl_weightedFilter) { 
    11131084    // save the matrix 
    1114     GB_ERROR error = di_calculate_matrix_cb(aww,0, true); 
     1085    WeightedFilter *weighted_filter = (WeightedFilter*)cl_weightedFilter; 
     1086    GB_ERROR error = di_calculate_matrix(aww, weighted_filter, 0, true); 
    11151087    if (!error) { 
    11161088        char              *filename = aww->get_root()->awar(AWAR_DIST_SAVE_MATRIX_FILENAME)->read_string(); 
     
    11241096} 
    11251097 
    1126 AW_window *DI_create_save_matrix_window(AW_root *aw_root, char *base_name) 
    1127 { 
     1098AW_window *DI_create_save_matrix_window(AW_root *aw_root, save_matrix_params *save_params) { 
    11281099    static AW_window_simple *aws = 0; 
    1129     if (aws) return aws; 
    1130     aws = new AW_window_simple; 
    1131     aws->init( aw_root, "SAVE_MATRIX", "Save Matrix"); 
    1132     aws->load_xfig("sel_box_user.fig"); 
    1133  
    1134     aws->at("close");aws->callback((AW_CB0)AW_POPDOWN); 
    1135     aws->create_button("CLOSE", "CANCEL","C"); 
    1136  
    1137  
    1138     aws->at("help");aws->callback(AW_POPUP_HELP,(AW_CL)"save_matrix.hlp"); 
    1139     aws->create_button("HELP", "HELP","H"); 
    1140  
    1141     aws->at("user"); 
    1142     aws->create_option_menu(AWAR_DIST_SAVE_MATRIX_TYPE); 
    1143     aws->insert_default_option("Phylip Format (Lower Triangular Matrix)","P",DI_SAVE_PHYLIP_COMP); 
    1144     aws->insert_option("Readable (using NDS)","R",DI_SAVE_READABLE); 
    1145     aws->insert_option("Tabbed (using NDS)","R",DI_SAVE_TABBED); 
    1146     aws->update_option_menu(); 
    1147  
    1148     awt_create_selection_box((AW_window *)aws,base_name); 
    1149  
    1150     aws->at("save2");aws->callback(di_save_matrix_cb); 
    1151     aws->create_button("SAVE", "SAVE","S"); 
    1152  
    1153     aws->callback( (AW_CB0)AW_POPDOWN); 
    1154     aws->at("cancel2"); 
    1155     aws->create_button("CLOSE", "CANCEL","C"); 
    1156  
     1100    if (!aws) { 
     1101        aws = new AW_window_simple; 
     1102        aws->init( aw_root, "SAVE_MATRIX", "Save Matrix"); 
     1103        aws->load_xfig("sel_box_user.fig"); 
     1104 
     1105        aws->at("close");aws->callback((AW_CB0)AW_POPDOWN); 
     1106        aws->create_button("CLOSE", "CANCEL","C"); 
     1107 
     1108 
     1109        aws->at("help");aws->callback(AW_POPUP_HELP,(AW_CL)"save_matrix.hlp"); 
     1110        aws->create_button("HELP", "HELP","H"); 
     1111 
     1112        aws->at("user"); 
     1113        aws->create_option_menu(AWAR_DIST_SAVE_MATRIX_TYPE); 
     1114        aws->insert_default_option("Phylip Format (Lower Triangular Matrix)","P",DI_SAVE_PHYLIP_COMP); 
     1115        aws->insert_option("Readable (using NDS)","R",DI_SAVE_READABLE); 
     1116        aws->insert_option("Tabbed (using NDS)","R",DI_SAVE_TABBED); 
     1117        aws->update_option_menu(); 
     1118 
     1119        awt_create_selection_box((AW_window *)aws, save_params->awar_base); 
     1120 
     1121        aws->at("save2"); 
     1122        aws->callback(di_save_matrix_cb, (AW_CL)save_params->weighted_filter); 
     1123        aws->create_button("SAVE", "SAVE","S"); 
     1124 
     1125        aws->callback( (AW_CB0)AW_POPDOWN); 
     1126        aws->at("cancel2"); 
     1127        aws->create_button("CLOSE", "CANCEL","C"); 
     1128    } 
    11571129    return aws; 
    11581130} 
     
    12061178} 
    12071179 
    1208 static void di_calculate_tree_cb(AW_window *aww, AW_CL bootstrap_flag) 
     1180static void di_calculate_tree_cb(AW_window *aww, AW_CL cl_weightedFilter, AW_CL bootstrap_flag) 
    12091181{ 
    12101182    AW_root   *aw_root         = aww->get_root(); 
     
    12261198    int last_status_upd  = 0; 
    12271199 
     1200    WeightedFilter *weighted_filter = (WeightedFilter*)cl_weightedFilter; 
     1201 
    12281202    if (!error) { 
    12291203        { 
     
    12441218 
    12451219            gb_assert(DI_MATRIX::ROOT == 0); 
    1246             di_calculate_matrix_cb(aww,bootstrap_flag, true); 
     1220            di_calculate_matrix(aww, weighted_filter, bootstrap_flag, true); 
    12471221 
    12481222            DI_MATRIX *matr = DI_MATRIX::ROOT; 
     
    12901264        DI_MATRIX::ROOT = 0; 
    12911265 
    1292         error = di_calculate_matrix_cb(aww, bootstrap_flag, bootstrap_flag ? false : true); 
     1266        error = di_calculate_matrix(aww, weighted_filter, bootstrap_flag, bootstrap_flag ? false : true); 
    12931267        if (error && strcmp(error,"Aborted") == 0) { 
    12941268            error = 0;          // clear error (otherwise no tree will be read below) 
     
    13841358    aw_status("Read the database"); 
    13851359 
    1386     DI_MATRIX *phm = new DI_MATRIX(GLOBAL_gb_main,aw_root); 
    13871360    char    *filter_str = aw_root->awar(AWAR_DIST_FILTER_FILTER)->read_string(); 
    13881361    char    *cancel = aw_root->awar(AWAR_DIST_CANCEL_CHARS)->read_string(); 
    13891362 
    1390     AP_filter *ap_filter = new AP_filter; 
    1391     long flen = strlen(filter_str); 
    1392     if (flen == ali_len){ 
    1393         ap_filter->init(filter_str,"0",ali_len); 
    1394     }else{ 
    1395         if (flen){ 
    1396             aw_message("WARNING: YOUR FILTER LEN IS NOT THE ALIGNMENT LEN\nFILTER IS TRUNCATED WITH ZEROS OR CUTTED"); 
    1397             ap_filter->init(filter_str,"0",ali_len); 
    1398         }else{ 
    1399             ap_filter->init(ali_len); 
    1400         } 
    1401     } 
    1402  
    1403     AP_weights *ap_weights = new AP_weights; 
    1404     ap_weights->init(ap_filter); 
    1405  
     1363    AliView *aliview; 
     1364    { 
     1365        AP_filter *ap_filter = NULL; 
     1366        long       flen  = strlen(filter_str); 
     1367 
     1368        if (flen == ali_len){ 
     1369            ap_filter = new AP_filter(filter_str, "0", ali_len); 
     1370        } 
     1371        else { 
     1372            if (flen) { 
     1373                aw_message("WARNING: YOUR FILTER LEN IS NOT THE ALIGNMENT LEN\nFILTER IS TRUNCATED WITH ZEROS OR CUTTED"); 
     1374                ap_filter = new AP_filter(filter_str, "0", ali_len); 
     1375            } 
     1376            else { 
     1377                ap_filter = new AP_filter(ali_len); // unfiltered 
     1378            } 
     1379        } 
     1380 
     1381        AP_weights ap_weights(ap_filter); 
     1382 
     1383        aliview = new AliView(GLOBAL_gb_main, *ap_filter, ap_weights, use); 
     1384        delete ap_filter; 
     1385    } 
     1386 
     1387    DI_MATRIX *phm = new DI_MATRIX(*aliview,aw_root); 
     1388     
    14061389    char *load_what      = aw_root->awar(AWAR_DIST_WHICH_SPECIES)->read_string(); 
    14071390    char *sort_tree_name = aw_root->awar(AWAR_DIST_TREE_SORT_NAME)->read_string(); 
    1408      
     1391 
    14091392    LoadWhat all_flag = (strcmp(load_what,"all") == 0) ? DI_LOAD_ALL : DI_LOAD_MARKED; 
    14101393 
    14111394    delete phm->ROOT; 
    14121395    phm->ROOT = 0; 
    1413     phm->load(use, ap_filter, ap_weights, all_flag, sort_tree_name, true, NULL); 
     1396 
     1397    phm->load(all_flag, sort_tree_name, true, NULL); 
    14141398    free(sort_tree_name); 
    14151399    GB_pop_transaction(GLOBAL_gb_main); 
     
    14201404    trans = (DI_TRANSFORMATION)aw_root->awar(AWAR_DIST_CORR_TRANS)->read_int(); 
    14211405 
    1422  
    1423     char *error = phm->analyse(aw_root); 
     1406    phm->analyse(); 
    14241407    aw_closestatus(); 
    14251408 
    14261409    delete phm; 
    1427     if (error) aw_message(error); 
    14281410 
    14291411    free(load_what); 
    14301412 
    14311413    free(cancel); 
    1432     delete ap_filter; 
    1433     delete ap_weights; 
     1414    delete aliview; 
    14341415 
    14351416    free(use); 
     
    14451426} 
    14461427 
    1447 static void di_calculate_full_matrix_cb(AW_window *aww){ 
     1428static void di_calculate_full_matrix_cb(AW_window *aww, AW_CL cl_weightedFilter){ 
    14481429    if (DI_MATRIX::ROOT && DI_MATRIX::ROOT->matrix_type == DI_MATRIX_FULL) return; 
    14491430    delete_matrix_cb(0); 
    1450     di_calculate_matrix_cb(aww,0, true); 
     1431    WeightedFilter *weighted_filter = (WeightedFilter*)cl_weightedFilter; 
     1432    di_calculate_matrix(aww, weighted_filter, 0, true); 
    14511433    if (di_dmatrix){ 
    14521434        di_dmatrix->resized(); 
     
    14551437} 
    14561438 
    1457 static void di_compress_tree_cb(AW_window *aww){ 
     1439static void di_compress_tree_cb(AW_window *aww, AW_CL cl_weightedFilter) { 
    14581440    GB_transaction dummy(GLOBAL_gb_main); 
    14591441    char *treename = aww->get_root()->awar(AWAR_DIST_TREE_COMP_NAME)->read_string(); 
     
    14661448    } 
    14671449 
    1468     di_calculate_matrix_cb(aww,0, true); 
     1450    WeightedFilter *weighted_filter = (WeightedFilter*)cl_weightedFilter; 
     1451    di_calculate_matrix(aww, weighted_filter, 0, true); 
    14691452    if (!DI_MATRIX::ROOT) error = "Cannot calculate your matrix"; 
    14701453 
     
    15381521AW_window *DI_create_matrix_window(AW_root *aw_root) { 
    15391522    AW_window_simple_menu *aws = new AW_window_simple_menu; 
    1540     aws->init( aw_root, "NEIGHBOUR JOINING", "NEIGHBOUR JOINING"); 
     1523    aws->init( aw_root, "NEIGHBOUR JOINING", "NEIGHBOUR JOINING [ARB_DIST]"); 
    15411524    aws->load_xfig("di_ge_ma.fig"); 
    15421525    aws->button_length( 10 ); 
     
    15691552 
    15701553    aws->insert_help_topic("help ...", "h", "dist.hlp", AWM_ALL, (AW_CB)AW_POPUP_HELP, (AW_CL)"dist.hlp", 0); 
     1554 
     1555    // ------------------ 
     1556    //      left side 
    15711557 
    15721558    aws->at( "which_species" ); 
     
    15791565    awt_create_selection_list_on_ad(GLOBAL_gb_main, (AW_window *)aws,AWAR_DIST_ALIGNMENT,"*="); 
    15801566 
     1567    // filter & weights 
     1568 
     1569    WeightedFilter *weighted_filter = // do NOT free (bound to callbacks) 
     1570        new WeightedFilter(GLOBAL_gb_main, aws->get_root(), AWAR_DIST_FILTER_NAME, AWAR_DIST_COLUMN_STAT_NAME); 
     1571 
    15811572    aws->at("filter_select"); 
    1582     dist_filter_cl = awt_create_select_filter(aws->get_root(), GLOBAL_gb_main, AWAR_DIST_FILTER_NAME); 
    1583     aws->callback(AW_POPUP, (AW_CL)awt_create_select_filter_win, (AW_CL)dist_filter_cl); 
     1573    aws->callback(AW_POPUP, (AW_CL)awt_create_select_filter_win, (AW_CL)(weighted_filter->get_adfiltercbstruct())); 
    15841574    aws->create_button("SELECT_FILTER", AWAR_DIST_FILTER_NAME); 
    15851575 
    15861576    aws->at("weights_select"); 
    15871577    aws->sens_mask(AWM_EXP); 
    1588     global_csp = new AWT_csp(GLOBAL_gb_main,aws->get_root(),AWAR_DIST_COLUMN_STAT_NAME); 
    1589     aws->callback(AW_POPUP,(AW_CL)create_csp_window, (AW_CL)global_csp); 
     1578    aws->callback(AW_POPUP,(AW_CL)create_csp_window, (AW_CL)weighted_filter->get_csp()); 
    15901579    aws->create_button("SELECT_COL_STAT",AWAR_DIST_COLUMN_STAT_NAME); 
    15911580    aws->sens_mask(AWM_ALL); 
     
    16251614    aws->update_option_menu(); 
    16261615 
     1616    aws->at("autodetect");   // auto 
     1617    aws->callback(di_autodetect_callback); 
     1618    aws->sens_mask(AWM_EXP); 
     1619    aws->create_button("AUTODETECT_CORRECTION", "AUTODETECT","A"); 
     1620    aws->sens_mask(AWM_ALL); 
     1621 
    16271622    // ------------------- 
    16281623    //      right side 
    1629     // ------------------- 
     1624 
    16301625 
    16311626    aws->at("mark_distance"); 
    1632     aws->callback(di_mark_by_distance); 
     1627    aws->callback(di_mark_by_distance, (AW_CL)weighted_filter); 
    16331628    aws->create_autosize_button("MARK_BY_DIST", "Mark all species"); 
    16341629 
     
    16411636    // ----------------- 
    16421637 
    1643     aws->button_length(18); 
    1644  
    1645     //     aws->at("compress"); 
    1646     //     aws->callback(AW_POPUP,  (AW_CL)create_select_compress_tree,0); 
    1647     //     aws->help_text("compress_tree.hlp"); 
    1648     //     aws->create_button("CALC_COMPRESSED_MATRIX", "Calculate\nCompressed M. ...","C"); 
    1649  
    1650     aws->at("compress"); 
    1651     aws->callback(di_compress_tree_cb); 
    1652     aws->create_button("CALC_COMPRESSED_MATRIX", "Calculate\nCompressed Matrix","C"); 
    1653  
    1654     aws->at("calculate"); 
    1655     aws->callback(di_calculate_full_matrix_cb); 
    1656     aws->create_button("CALC_FULL_MATRIX", "Calculate\nFull Matrix","F"); 
    1657  
    1658     aws->button_length(13); 
    1659  
    1660     aws->at("save_matrix"); 
    1661     aws->callback(AW_POPUP, (AW_CL)DI_create_save_matrix_window,(AW_CL)AWAR_DIST_SAVE_MATRIX_BASE); 
    1662     aws->create_button("SAVE_MATRIX", "Save matrix","M"); 
    1663  
    1664     aws->at("view_matrix"); 
    1665     aws->callback(di_view_matrix_cb); 
    1666     aws->create_button("VIEW_MATRIX", "View matrix","V"); 
     1638    // tree selection 
    16671639 
    16681640    aws->at("tree_list"); 
    16691641    awt_create_selection_list_on_trees(GLOBAL_gb_main,(AW_window *)aws,AWAR_DIST_TREE_CURR_NAME); 
    16701642 
     1643    aws->at("detect_clusters"); 
     1644    aws->callback(AW_POPUP, (AW_CL)DI_create_cluster_detection_window, (AW_CL)weighted_filter); 
     1645    aws->create_autosize_button("DETECT_CLUSTERS", "Detect homogenous clusters in tree","D"); 
     1646 
     1647    // matrix calculation 
     1648 
    16711649    aws->button_length(18); 
    1672  
    1673     aws->at("t_calculate"); 
    1674     aws->callback(di_calculate_tree_cb,0); 
    1675     aws->create_button("CALC_TREE", "Calculate \ntree","C"); 
    1676  
    1677     aws->at("bootstrap"); 
    1678     aws->callback(di_calculate_tree_cb,1); 
    1679     aws->create_button("CALC_BOOTSTRAP_TREE", "Calculate \nbootstrap tree"); 
    1680  
    1681     aws->at("bcount"); 
    1682     aws->create_input_field(AWAR_DIST_BOOTSTRAP_COUNT, 7); 
    1683  
    1684     aws->at("autodetect");   // auto 
    1685     aws->callback(di_autodetect_callback); 
    1686     aws->sens_mask(AWM_EXP); 
    1687     aws->create_button("AUTODETECT_CORRECTION", "AUTODETECT","A"); 
    1688     aws->sens_mask(AWM_ALL); 
    1689  
    1690     aws->at("sort_tree_name"); 
    1691     aws->create_input_field(AWAR_DIST_TREE_SORT_NAME,12); 
    1692     aws->at("compr_tree_name"); 
    1693     aws->create_input_field(AWAR_DIST_TREE_COMP_NAME,12); 
    1694     aws->at("calc_tree_name"); 
    1695     aws->create_input_field(AWAR_DIST_TREE_STD_NAME,12); 
     1650    aws->at("calculate"); 
     1651    aws->callback(di_calculate_full_matrix_cb, (AW_CL)weighted_filter); 
     1652    aws->create_button("CALC_FULL_MATRIX", "Calculate\nFull Matrix","F"); 
     1653    aws->at("compress"); 
     1654    aws->callback(di_compress_tree_cb, (AW_CL)weighted_filter); 
     1655    aws->create_button("CALC_COMPRESSED_MATRIX", "Calculate\nCompressed Matrix","C"); 
     1656 
     1657    aws->button_length(13); 
     1658 
     1659    { 
     1660        save_matrix_params *sparams = new save_matrix_params; // do not free (bound to callbacks) 
     1661 
     1662        sparams->awar_base       = AWAR_DIST_SAVE_MATRIX_BASE; 
     1663        sparams->weighted_filter = weighted_filter; 
     1664 
     1665        aws->at("save_matrix"); 
     1666        aws->callback(AW_POPUP, (AW_CL)DI_create_save_matrix_window,(AW_CL)sparams); 
     1667        aws->create_button("SAVE_MATRIX", "Save matrix","M"); 
     1668 
     1669        aws->at("view_matrix"); 
     1670        aws->callback(di_view_matrix_cb, (AW_CL)sparams); 
     1671        aws->create_button("VIEW_MATRIX", "View matrix","V"); 
     1672    } 
    16961673 
    16971674    aws->button_length(22); 
    1698  
    16991675    aws->at("use_compr_tree"); 
    17001676    aws->callback(di_define_compression_tree_name_cb); 
    17011677    aws->create_button("USE_COMPRESSION_TREE", "Use to compress", ""); 
    1702  
    17031678    aws->at("use_sort_tree"); 
    17041679    aws->callback(di_define_sort_tree_name_cb); 
    17051680    aws->create_button("USE_SORT_TREE", "Use to sort", ""); 
    17061681 
     1682    aws->at("compr_tree_name"); 
     1683    aws->create_input_field(AWAR_DIST_TREE_COMP_NAME,12); 
     1684    aws->at("sort_tree_name"); 
     1685    aws->create_input_field(AWAR_DIST_TREE_SORT_NAME,12); 
     1686 
     1687    // tree calculation 
     1688 
     1689    aws->button_length(18); 
     1690    aws->at("t_calculate"); 
     1691    aws->callback(di_calculate_tree_cb, (AW_CL)weighted_filter, 0); 
     1692    aws->create_button("CALC_TREE", "Calculate \ntree","C"); 
     1693    aws->at("bootstrap"); 
     1694    aws->callback(di_calculate_tree_cb, (AW_CL)weighted_filter, 1); 
     1695    aws->create_button("CALC_BOOTSTRAP_TREE", "Calculate \nbootstrap tree"); 
     1696 
     1697    aws->button_length(22); 
    17071698    aws->at("use_existing"); 
    17081699    aws->callback(di_define_save_tree_name_cb); 
    17091700    aws->create_button("USE_NAME", "Use as new tree name", ""); 
    17101701 
     1702    aws->at("calc_tree_name"); 
     1703    aws->create_input_field(AWAR_DIST_TREE_STD_NAME,12); 
     1704     
     1705    aws->at("bcount"); 
     1706    aws->create_input_field(AWAR_DIST_BOOTSTRAP_COUNT, 7); 
     1707 
    17111708    GB_pop_transaction(GLOBAL_gb_main); 
    17121709    return (AW_window *)aws; 
  • trunk/DIST/DI_mldist.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 // #include <malloc.h> 
    5 #include <string.h> 
    6  
    7 #include <math.h> 
    8  
    9 #include <arbdb.h> 
    10 #include <arbdbt.h> 
    11  
    12 #include <aw_root.hxx> 
    13 #include <aw_device.hxx> 
    14 #include <aw_window.hxx> 
    15 #include <aw_preset.hxx> 
    16 #include <awt.hxx> 
    17  
    18 #include <awt_tree.hxx> 
    19 #include "dist.hxx" 
    20 #include <awt_csp.hxx> 
    21  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : DI_mldist.cxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "di_mldist.hxx" 
    2212#include "di_matr.hxx" 
    23 #include "di_mldist.hxx" 
    24  
    25 #define epsilon         0.000001/* a small number */ 
    26  
     13 
     14#include <AP_seq_simple_pro.hxx> 
     15 
     16#include <cmath> 
     17 
     18 
     19#define epsilon 0.000001                            // a small number 
    2720 
    2821void di_mldist::givens(di_ml_matrix a,long i,long j,long n,double ctheta,double stheta,GB_BOOL left) 
     
    231224        { 
    232225            /* move all unknown characters to del */ 
    233             ap_pro *seq1 = entries[i]->sequence_protein->sequence; 
     226            ap_pro *seq = entries[i]->sequence_protein->get_sequence(); 
    234227            for (k = 0; k <chars ; k++) { 
    235                 b1 = seq1[k]; 
     228                b1 = seq[k]; 
    236229                if (b1 <=val) continue; 
    237230                if (b1 == asx || b1 == glx) continue; 
    238                 seq1[k] = del; 
     231                seq[k] = del; 
    239232            } 
    240233        } 
     
    250243                tt = pos_2_tt(pos); 
    251244                build_akt_predikt(tt); 
    252                 ap_pro *seq1 = entries[i]->sequence_protein->sequence; 
    253                 ap_pro *seq2 = entries[j]->sequence_protein->sequence; 
     245                const ap_pro *seq1 = entries[i]->sequence_protein->get_sequence(); 
     246                const ap_pro *seq2 = entries[j]->sequence_protein->get_sequence(); 
    254247                for (k = chars; k >0; k--) { 
    255248                    b1 = *(seq1++); 
  • trunk/DIST/DI_protdist.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 // #include <malloc.h> 
    5 #include <string.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : DI_protdist.cxx                                   // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "di_protdist.hxx" 
     12#include "di_matr.hxx" 
    613 
    714#include <math.h> 
    815 
    9 #include <arbdb.h> 
    10 #include <arbdbt.h> 
    11  
    12 #include <aw_root.hxx> 
    13 #include <aw_device.hxx> 
    14 #include <aw_window.hxx> 
    15 #include <aw_preset.hxx> 
    16 #include <awt.hxx> 
    17  
    18 #include <awt_tree.hxx> 
    19 #include "dist.hxx" 
    20 #include <awt_csp.hxx> 
    21  
    22 #include "di_matr.hxx" 
    23 #include "di_protdist.hxx" 
    24  
    25 #define epsilon         0.000001/* a small number */ 
     16#define di_assert(cond) arb_assert(cond) 
     17 
     18#define epsilon 0.000001        /* a small number */ 
    2619 
    2720double   di_protdist::pameigs[20] = { 
     
    676669        { 
    677670            /* move all unknown characters to del */ 
    678             ap_pro *seq1 = entries[i]->sequence_protein->sequence; 
     671            ap_pro *seq1 = entries[i]->sequence_protein->get_sequence(); 
    679672            for (k = 0; k <chars ; k++) { 
    680673                b1 = seq1[k]; 
     
    699692                    tt = pos_2_tt(pos); 
    700693                    build_akt_predikt(tt); 
    701                     ap_pro *seq1 = entries[i]->sequence_protein->sequence; 
    702                     ap_pro *seq2 = entries[j]->sequence_protein->sequence; 
     694                    const ap_pro *seq1 = entries[i]->sequence_protein->get_sequence(); 
     695                    const ap_pro *seq2 = entries[j]->sequence_protein->get_sequence(); 
    703696                    for (k = chars; k >0; k--) { 
    704697                        b1 = *(seq1++); 
     
    742735                m = 0; 
    743736                n = 0; 
    744                 ap_pro *seq1 = entries[i]->sequence_protein->sequence; 
    745                 ap_pro *seq2 = entries[j]->sequence_protein->sequence; 
     737                const ap_pro *seq1 = entries[i]->sequence_protein->get_sequence(); 
     738                const ap_pro *seq2 = entries[j]->sequence_protein->get_sequence(); 
    746739                for (k = chars; k >0; k--) { 
    747740                    b1 = *(seq1++); 
  • trunk/DIST/DI_save_matr.cxx

    r5402 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 // #include <malloc.h> 
    4 #include <memory.h> 
    5 #include <string.h> 
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8  
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <awt_tree.hxx> 
    13 #include "dist.hxx" 
    14 #include <awt_nds.hxx> 
    15 #include <awt_csp.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : DI_save_matr.cxx                                  // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    1610 
    1711#include "di_matr.hxx" 
    18  
     12#include <awt_nds.hxx> 
    1913 
    2014const char *DI_MATRIX::save(char *filename,enum DI_SAVE_TYPE type) 
     
    4337        case DI_SAVE_TABBED: 
    4438            { 
     39                GBDATA         *gb_main  = get_gb_main(); 
    4540                GB_transaction  dummy(gb_main); 
    46                 size_t          app_size = 200; // maximum width for NDS output (and max. height for vertical one) 
     41                size_t          app_size = 200;     // maximum width for NDS output (and max. height for vertical one) 
    4742                size_t          maxnds   = 0; 
    4843                bool            tabbed   = (type == DI_SAVE_TABBED); 
     
    142137                        if (!tabbed) fputc(' ', out); 
    143138 
    144                         if (val2 > max) max  = val2; 
    145                         if (val2 < min) min  = val2; 
    146                         sum                 += val; 
     139                        if (val2 > max) max = val2; 
     140                        if (val2 < min) min = val2; 
     141                         
     142                        sum += val2; // ralf: before this added 'val' (which was included somehow) 
    147143                    } 
    148144                    fprintf(out,"\n"); 
  • trunk/DIST/DI_view_matrix.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 #include <string.h> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8  
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : DI_view_matrix.cxx                                // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "di_view_matrix.hxx" 
     12#include "di_matr.hxx" 
     13#include "dist.hxx" 
     14 
    1115#include <aw_window.hxx> 
     16#include <aw_awars.hxx> 
    1217#include <aw_preset.hxx> 
    13 #include <aw_awars.hxx> 
    14  
    15 #include <awt_tree.hxx> 
     18 
    1619#include <awt_canvas.hxx> 
    17 #include "dist.hxx" 
    18  
    19 #include <di_matr.hxx> 
    20 #include <di_view_matrix.hxx> 
    2120 
    2221void vertical_change_cb  (AW_window *aww,DI_dmatrix *dis) { dis->monitor_vertical_scroll_cb(aww); } 
     
    550549} 
    551550 
    552 AW_window *DI_create_view_matrix_window(AW_root *awr, DI_dmatrix *dmatrix){ 
     551AW_window *DI_create_view_matrix_window(AW_root *awr, DI_dmatrix *dmatrix, save_matrix_params *sparam) { 
    553552    di_bind_dist_awars(awr, dmatrix); 
    554553    AW_window_menu *awm = new AW_window_menu(); 
     
    580579 
    581580    awm->create_menu("File","F"); 
    582     awm->insert_menu_topic("save_matrix",   "Save Matrix to File",  "S","save_matrix.hlp",  AWM_ALL, AW_POPUP, (AW_CL)DI_create_save_matrix_window, (AW_CL)AWAR_DIST_SAVE_MATRIX_BASE); 
     581    awm->insert_menu_topic("save_matrix",   "Save Matrix to File",  "S","save_matrix.hlp",  AWM_ALL, AW_POPUP, (AW_CL)DI_create_save_matrix_window, (AW_CL)sparam); 
    583582    awm->insert_menu_topic("close",     "Close",    "C",0,  AWM_ALL,    (AW_CB)AW_POPDOWN, (AW_CL)0, 0 ); 
    584583 
  • trunk/DIST/Makefile

    r6277 r6280  
    33.SUFFIXES: .o .cxx .depend 
    44 
    5 CPP_OBJECTS = DI_mldist.o DI_protdist.o DI_compress_matrix.o DI_view_matrix.o DI_save_matr.o DI_main.o DI_matr.o distanalyse.o 
     5CPP_OBJECTS = \ 
     6        DI_foundclusters.o \ 
     7        DI_clusters.o \ 
     8        DI_clustertree.o \ 
     9        DI_compress_matrix.o \ 
     10        DI_main.o \ 
     11        DI_matr.o \ 
     12        DI_mldist.o \ 
     13        DI_protdist.o \ 
     14        DI_save_matr.o \ 
     15        DI_view_matrix.o \ 
     16        distanalyse.o \ 
    617 
    718$(MAIN): $(CPP_OBJECTS) 
     
    3041# For formatting issues see SOURCE_TOOLS/fix_depends.pl 
    3142 
     43DI_clusters.o: di_awars.hxx 
     44DI_clusters.o: di_clusters.hxx 
     45DI_clusters.o: di_clustertree.hxx 
     46DI_clusters.o: di_foundclusters.hxx 
     47DI_clusters.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     48DI_clusters.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     49DI_clusters.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     50DI_clusters.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     51DI_clusters.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     52DI_clusters.o: $(ARBHOME)/INCLUDE/AP_seq_dna.hxx 
     53DI_clusters.o: $(ARBHOME)/INCLUDE/AP_seq_simple_pro.hxx 
     54DI_clusters.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     55DI_clusters.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     56DI_clusters.o: $(ARBHOME)/INCLUDE/arb_error.h 
     57DI_clusters.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
     58DI_clusters.o: $(ARBHOME)/INCLUDE/arbdb.h 
     59DI_clusters.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     60DI_clusters.o: $(ARBHOME)/INCLUDE/arbdbt.h 
     61DI_clusters.o: $(ARBHOME)/INCLUDE/arbtools.h 
     62DI_clusters.o: $(ARBHOME)/INCLUDE/attributes.h 
     63DI_clusters.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
     64DI_clusters.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
     65DI_clusters.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     66DI_clusters.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
     67DI_clusters.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
     68DI_clusters.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
     69DI_clusters.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
     70DI_clusters.o: $(ARBHOME)/INCLUDE/downcast.h 
     71DI_clusters.o: $(ARBHOME)/INCLUDE/gui_aliview.hxx 
     72DI_clusters.o: $(ARBHOME)/INCLUDE/smartptr.h 
     73 
     74DI_clustertree.o: di_clustertree.hxx 
     75DI_clustertree.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     76DI_clustertree.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     77DI_clustertree.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     78DI_clustertree.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     79DI_clustertree.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     80DI_clustertree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     81DI_clustertree.o: $(ARBHOME)/INCLUDE/arb_error.h 
     82DI_clustertree.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
     83DI_clustertree.o: $(ARBHOME)/INCLUDE/arbdb.h 
     84DI_clustertree.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     85DI_clustertree.o: $(ARBHOME)/INCLUDE/arbdbt.h 
     86DI_clustertree.o: $(ARBHOME)/INCLUDE/arbtools.h 
     87DI_clustertree.o: $(ARBHOME)/INCLUDE/attributes.h 
     88DI_clustertree.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
     89DI_clustertree.o: $(ARBHOME)/INCLUDE/downcast.h 
     90DI_clustertree.o: $(ARBHOME)/INCLUDE/smartptr.h 
     91 
    3292DI_compress_matrix.o: di_matr.hxx 
    33 DI_compress_matrix.o: di_view_matrix.hxx 
    34 DI_compress_matrix.o: dist.hxx 
    3593DI_compress_matrix.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    3694DI_compress_matrix.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3795DI_compress_matrix.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     96DI_compress_matrix.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     97DI_compress_matrix.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     98DI_compress_matrix.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     99DI_compress_matrix.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     100DI_compress_matrix.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    38101DI_compress_matrix.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    39102DI_compress_matrix.o: $(ARBHOME)/INCLUDE/arb_error.h 
     103DI_compress_matrix.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    40104DI_compress_matrix.o: $(ARBHOME)/INCLUDE/arbdb.h 
    41105DI_compress_matrix.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    44108DI_compress_matrix.o: $(ARBHOME)/INCLUDE/attributes.h 
    45109DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    46 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    47 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    48 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    49 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    50110DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    51 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    52 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    53 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    54 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    55 DI_compress_matrix.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     111DI_compress_matrix.o: $(ARBHOME)/INCLUDE/downcast.h 
    56112DI_compress_matrix.o: $(ARBHOME)/INCLUDE/smartptr.h 
     113 
     114DI_foundclusters.o: di_clustertree.hxx 
     115DI_foundclusters.o: di_foundclusters.hxx 
     116DI_foundclusters.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     117DI_foundclusters.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     118DI_foundclusters.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     119DI_foundclusters.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     120DI_foundclusters.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     121DI_foundclusters.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     122DI_foundclusters.o: $(ARBHOME)/INCLUDE/arb_error.h 
     123DI_foundclusters.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
     124DI_foundclusters.o: $(ARBHOME)/INCLUDE/arbdb.h 
     125DI_foundclusters.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     126DI_foundclusters.o: $(ARBHOME)/INCLUDE/arbdbt.h 
     127DI_foundclusters.o: $(ARBHOME)/INCLUDE/arbtools.h 
     128DI_foundclusters.o: $(ARBHOME)/INCLUDE/attributes.h 
     129DI_foundclusters.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
     130DI_foundclusters.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     131DI_foundclusters.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
     132DI_foundclusters.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
     133DI_foundclusters.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
     134DI_foundclusters.o: $(ARBHOME)/INCLUDE/downcast.h 
     135DI_foundclusters.o: $(ARBHOME)/INCLUDE/gui_aliview.hxx 
     136DI_foundclusters.o: $(ARBHOME)/INCLUDE/smartptr.h 
    57137 
    58138DI_main.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     
    75155DI_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
    76156 
     157DI_matr.o: di_awars.hxx 
     158DI_matr.o: di_clusters.hxx 
    77159DI_matr.o: di_matr.hxx 
    78160DI_matr.o: di_protdist.hxx 
     
    82164DI_matr.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    83165DI_matr.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     166DI_matr.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     167DI_matr.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     168DI_matr.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     169DI_matr.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     170DI_matr.o: $(ARBHOME)/INCLUDE/AP_seq_dna.hxx 
     171DI_matr.o: $(ARBHOME)/INCLUDE/AP_seq_simple_pro.hxx 
     172DI_matr.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     173DI_matr.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    84174DI_matr.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    85175DI_matr.o: $(ARBHOME)/INCLUDE/arb_error.h 
     176DI_matr.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    86177DI_matr.o: $(ARBHOME)/INCLUDE/arbdb.h 
    87178DI_matr.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    100191DI_matr.o: $(ARBHOME)/INCLUDE/awt.hxx 
    101192DI_matr.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
     193DI_matr.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    102194DI_matr.o: $(ARBHOME)/INCLUDE/awt_macro.hxx 
    103 DI_matr.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    104195DI_matr.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    105 DI_matr.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    106 DI_matr.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    107 DI_matr.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    108196DI_matr.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
    109197DI_matr.o: $(ARBHOME)/INCLUDE/CT_ctree.hxx 
     198DI_matr.o: $(ARBHOME)/INCLUDE/downcast.h 
     199DI_matr.o: $(ARBHOME)/INCLUDE/gui_aliview.hxx 
     200DI_matr.o: $(ARBHOME)/INCLUDE/neighbourjoin.hxx 
    110201DI_matr.o: $(ARBHOME)/INCLUDE/smartptr.h 
    111202 
    112203DI_mldist.o: di_matr.hxx 
    113204DI_mldist.o: di_mldist.hxx 
    114 DI_mldist.o: dist.hxx 
    115205DI_mldist.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    116206DI_mldist.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    117207DI_mldist.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     208DI_mldist.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     209DI_mldist.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     210DI_mldist.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     211DI_mldist.o: $(ARBHOME)/INCLUDE/AP_seq_simple_pro.hxx 
     212DI_mldist.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     213DI_mldist.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    118214DI_mldist.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    119215DI_mldist.o: $(ARBHOME)/INCLUDE/arb_error.h 
     216DI_mldist.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    120217DI_mldist.o: $(ARBHOME)/INCLUDE/arbdb.h 
    121218DI_mldist.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    124221DI_mldist.o: $(ARBHOME)/INCLUDE/attributes.h 
    125222DI_mldist.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    126 DI_mldist.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    127 DI_mldist.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    128 DI_mldist.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    129 DI_mldist.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    130223DI_mldist.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    131 DI_mldist.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    132 DI_mldist.o: $(ARBHOME)/INCLUDE/awt.hxx 
    133 DI_mldist.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    134 DI_mldist.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    135 DI_mldist.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    136 DI_mldist.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    137 DI_mldist.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     224DI_mldist.o: $(ARBHOME)/INCLUDE/downcast.h 
    138225DI_mldist.o: $(ARBHOME)/INCLUDE/smartptr.h 
    139226 
    140227DI_protdist.o: di_matr.hxx 
    141228DI_protdist.o: di_protdist.hxx 
    142 DI_protdist.o: dist.hxx 
    143229DI_protdist.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    144230DI_protdist.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    145231DI_protdist.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     232DI_protdist.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     233DI_protdist.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     234DI_protdist.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     235DI_protdist.o: $(ARBHOME)/INCLUDE/AP_seq_simple_pro.hxx 
     236DI_protdist.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     237DI_protdist.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    146238DI_protdist.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    147239DI_protdist.o: $(ARBHOME)/INCLUDE/arb_error.h 
     240DI_protdist.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    148241DI_protdist.o: $(ARBHOME)/INCLUDE/arbdb.h 
    149242DI_protdist.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    152245DI_protdist.o: $(ARBHOME)/INCLUDE/attributes.h 
    153246DI_protdist.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    154 DI_protdist.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    155 DI_protdist.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    156 DI_protdist.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    157 DI_protdist.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    158247DI_protdist.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    159 DI_protdist.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    160 DI_protdist.o: $(ARBHOME)/INCLUDE/awt.hxx 
    161 DI_protdist.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    162 DI_protdist.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    163 DI_protdist.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    164 DI_protdist.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    165 DI_protdist.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     248DI_protdist.o: $(ARBHOME)/INCLUDE/downcast.h 
    166249DI_protdist.o: $(ARBHOME)/INCLUDE/smartptr.h 
    167250 
    168251DI_save_matr.o: di_matr.hxx 
    169 DI_save_matr.o: dist.hxx 
    170252DI_save_matr.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    171253DI_save_matr.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    172254DI_save_matr.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     255DI_save_matr.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     256DI_save_matr.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     257DI_save_matr.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     258DI_save_matr.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     259DI_save_matr.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    173260DI_save_matr.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    174261DI_save_matr.o: $(ARBHOME)/INCLUDE/arb_error.h 
     262DI_save_matr.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    175263DI_save_matr.o: $(ARBHOME)/INCLUDE/arbdb.h 
    176264DI_save_matr.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    179267DI_save_matr.o: $(ARBHOME)/INCLUDE/attributes.h 
    180268DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    181 DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    182 DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    183 DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    184269DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    185 DI_save_matr.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    186 DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    187270DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    188 DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    189 DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    190 DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    191 DI_save_matr.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     271DI_save_matr.o: $(ARBHOME)/INCLUDE/downcast.h 
    192272DI_save_matr.o: $(ARBHOME)/INCLUDE/smartptr.h 
    193273 
     
    198278DI_view_matrix.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    199279DI_view_matrix.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     280DI_view_matrix.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     281DI_view_matrix.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     282DI_view_matrix.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     283DI_view_matrix.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     284DI_view_matrix.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    200285DI_view_matrix.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    201286DI_view_matrix.o: $(ARBHOME)/INCLUDE/arb_error.h 
     287DI_view_matrix.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    202288DI_view_matrix.o: $(ARBHOME)/INCLUDE/arbdb.h 
    203289DI_view_matrix.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    214300DI_view_matrix.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    215301DI_view_matrix.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    216 DI_view_matrix.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    217 DI_view_matrix.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    218 DI_view_matrix.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    219 DI_view_matrix.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     302DI_view_matrix.o: $(ARBHOME)/INCLUDE/downcast.h 
    220303DI_view_matrix.o: $(ARBHOME)/INCLUDE/smartptr.h 
    221304 
    222305distanalyse.o: di_matr.hxx 
    223 distanalyse.o: dist.hxx 
    224306distanalyse.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    225307distanalyse.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    226308distanalyse.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     309distanalyse.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     310distanalyse.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     311distanalyse.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     312distanalyse.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
     313distanalyse.o: $(ARBHOME)/INCLUDE/AP_seq_dna.hxx 
     314distanalyse.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     315distanalyse.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    227316distanalyse.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    228317distanalyse.o: $(ARBHOME)/INCLUDE/arb_error.h 
     318distanalyse.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    229319distanalyse.o: $(ARBHOME)/INCLUDE/arbdb.h 
    230320distanalyse.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    233323distanalyse.o: $(ARBHOME)/INCLUDE/attributes.h 
    234324distanalyse.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    235 distanalyse.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    236 distanalyse.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    237 distanalyse.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    238325distanalyse.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    239 distanalyse.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    240 distanalyse.o: $(ARBHOME)/INCLUDE/awt.hxx 
    241 distanalyse.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    242 distanalyse.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    243 distanalyse.o: $(ARBHOME)/INCLUDE/awt_seq_simple_pro.hxx 
    244 distanalyse.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     326distanalyse.o: $(ARBHOME)/INCLUDE/downcast.h 
    245327distanalyse.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/DIST/di_matr.hxx

    r5420 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : di_matr.hxx                                       // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef DI_MATR_HXX 
     12#define DI_MATR_HXX 
     13 
     14#ifndef AP_PRO_A_NUCS_HXX 
     15#include <AP_pro_a_nucs.hxx> 
     16#endif 
     17#ifndef AP_TREE_HXX 
     18#include <AP_Tree.hxx> 
     19#endif 
     20#ifndef AP_MATRIX_HXX 
     21#include <AP_matrix.hxx> 
     22#endif 
     23 
    124 
    225#define AWAR_DIST_PREFIX           "dist/" 
     
    3053enum DI_MATRIX_TYPE { 
    3154    DI_MATRIX_FULL, 
    32     DI_MATRIX_COMPRESSED }; 
     55    DI_MATRIX_COMPRESSED 
     56}; 
    3357 
    3458class DI_MATRIX; 
    3559class AW_root; 
     60class AP_sequence_parsimony; 
     61class AP_sequence_simple_protein; 
    3662 
    3763class DI_ENTRY { 
     
    6490enum LoadWhat { DI_LOAD_ALL, DI_LOAD_MARKED, DI_LOAD_LIST }; 
    6591 
    66 class DI_MATRIX { 
    67 private: 
     92class DI_MATRIX : Noncopyable { 
    6893    friend class DI_ENTRY; 
    6994 
    70     GBDATA       *gb_main; 
    71     GBDATA       *gb_species_data; 
    72     char         *use; 
    73     long          seq_len; 
    74     char          cancel_columns[256]; 
    75     AP_tree_root *tree_root; 
    76     AW_root      *aw_root;             // only link 
    77     long          entries_mem_size; 
     95    GBDATA  *gb_species_data; 
     96    long     seq_len; 
     97    char     cancel_columns[256]; 
     98    AW_root *aw_root;                               // only link 
     99    long     entries_mem_size; 
     100    AliView *aliview; 
    78101 
    79102public: 
     
    85108    DI_MATRIX_TYPE     matrix_type; 
    86109 
    87     DI_MATRIX(GBDATA *gb_main,AW_root *awr); 
    88     ~DI_MATRIX(void); 
     110    DI_MATRIX(const AliView& aliview, AW_root *awr); 
     111    ~DI_MATRIX(); 
    89112 
    90     char *load(char *use, AP_filter *filter, AP_weights *weights, LoadWhat what, GB_CSTR sort_tree_name, bool show_warnings, GBDATA **species_list); 
     113    GBDATA *get_gb_main() const { return aliview->get_gb_main(); } 
     114    const char *get_aliname() const { return aliview->get_aliname(); } 
     115    const AliView *get_aliview() const { return aliview; } 
     116 
     117    char *load(LoadWhat what, GB_CSTR sort_tree_name, bool show_warnings, GBDATA **species_list); 
    91118    char *unload(void); 
    92119    const char *save(char *filename,enum DI_SAVE_TYPE type); 
     
    95122    void    make_sym(DI_MUT_MATR &hits); 
    96123    void    rate_write(DI_MUT_MATR &hits,FILE *out); 
    97     long    *create_helix_filter(BI_helix *helix,AP_filter *filter); 
     124    long    *create_helix_filter(BI_helix *helix, const AP_filter *filter); 
    98125    // 0 non helix 1 helix; compressed filter 
    99126    GB_ERROR calculate_rates(DI_MUT_MATR &hrates,DI_MUT_MATR &nrates,DI_MUT_MATR &pairs,long *filter); 
     
    103130    char *calculate_overall_freqs(double rel_frequencies[AP_MAX],char *cancel_columns); 
    104131    GB_ERROR calculate_pro(DI_TRANSFORMATION transformation); 
    105     char *analyse(AW_root *aw_root); 
     132    void analyse(); 
    106133 
    107134    int search_group(GBT_TREE *node,GB_HASH *hash, long *groupcnt,char *groupname, DI_ENTRY **groups);       // @@ OLIVER 
     
    109136}; 
    110137 
     138class WeightedFilter; 
     139struct save_matrix_params { 
     140    const char           *awar_base; 
     141    const WeightedFilter *weighted_filter; 
     142}; 
    111143 
    112 AW_window *DI_create_save_matrix_window(AW_root *aw_root, char *base_name); 
     144AW_window *DI_create_save_matrix_window(AW_root *aw_root, save_matrix_params *save_params); 
     145 
     146#else 
     147#error di_matr.hxx included twice 
     148#endif // DI_MATR_HXX 
  • trunk/DIST/di_mldist.hxx

    r5392 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : di_mldist.hxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef DI_MLDIST_HXX 
     12#define DI_MLDIST_HXX 
     13 
     14#ifndef ARBDBT_H 
     15#include <arbdbt.h> 
     16#endif 
     17 
     18 
    119const int DI_ML_RESOLUTION   = 1000; // max res 
    220const int DI_ML_MAX_DIST     = 10; // max dist 
     
    725typedef double di_pml_matrix[DI_ML_MAX_MAT_SIZE][DI_ML_MAX_MAT_SIZE]; 
    826typedef char   di_bool_matrix[DI_ML_MAX_MAT_SIZE][DI_ML_MAX_MAT_SIZE]; 
     27 
     28class DI_ENTRY; 
     29class AP_smatrix; 
    930 
    1031class di_mldist { 
     
    6485    const char *makedists();    // calculate the distance matrix 
    6586}; 
     87 
     88#else 
     89#error di_mldist.hxx included twice 
     90#endif // DI_MLDIST_HXX 
  • trunk/DIST/di_protdist.hxx

    r5392 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : di_protdist.hxx                                   // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    110 
    2 const int di_max_aa     = stop; // mussed be 20 
     11#ifndef DI_PROTDIST_HXX 
     12#define DI_PROTDIST_HXX 
     13 
     14#ifndef AP_SEQ_SIMPLE_PRO_HXX 
     15#include <AP_seq_simple_pro.hxx> 
     16#endif 
     17 
     18const int di_max_aa     = stop; // must be 20 
    319const int di_max_paa    = unk;  // includes virtual aa 
    420const int di_resolution = 1000; // max res 
     
    1834typedef double di_paa_matrix[di_max_paa][di_max_paa]; 
    1935typedef char   di_bool_matrix[di_max_paa][di_max_paa]; 
     36 
     37class DI_ENTRY; 
     38class AP_smatrix; 
    2039 
    2140class di_protdist { 
     
    86105    const char *makedists();    // calculate the distance matrix 
    87106}; 
     107 
     108#else 
     109#error di_protdist.hxx included twice 
     110#endif // DI_PROTDIST_HXX 
  • trunk/DIST/di_view_matrix.hxx

    r5675 r6280  
    1111#define DI_VIEW_MATRIX_HXX 
    1212 
    13 #ifndef AW_WINDOW_HXX 
    14 #include <aw_window.hxx> 
     13#ifndef AW_ROOT_HXX 
     14#include <aw_root.hxx> 
    1515#endif 
    1616 
     
    2626    DI_G_LAST                   // must be last 
    2727} DI_gc; 
     28 
     29class AW_device; 
     30class AW_event; 
     31class DI_MATRIX; 
    2832 
    2933class DI_dmatrix { 
     
    7276}; 
    7377 
    74 AW_window *DI_create_view_matrix_window(AW_root *awr, DI_dmatrix *dmatrix); 
     78struct save_matrix_params; 
     79AW_window *DI_create_view_matrix_window(AW_root *awr, DI_dmatrix *dmatrix, save_matrix_params *sparam); 
    7580 
    7681 
  • trunk/DIST/dist.hxx

    r5968 r6280  
    1212#define DIST_HXX 
    1313 
    14 #ifndef AWT_SEQ_DNA_HXX 
    15 #include <awt_seq_dna.hxx> 
    16 #endif 
    17 #ifndef AWT_SEQ_SIMPLE_PRO_HXX 
    18 #include <awt_seq_simple_pro.hxx> 
     14#ifndef ARBDBT_H 
     15#include <arbdbt.h> 
    1916#endif 
    2017 
     
    2219 
    2320extern GBDATA *GLOBAL_gb_main; 
    24 GBT_TREE *neighbourjoining(char **names, AP_FLOAT **m, long size, size_t structure_size); 
    2521 
    2622#else 
  • trunk/DIST/distanalyse.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 #include <string.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : distanalyse.cxx                                   // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    510 
    6 #include <math.h> 
    7  
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10  
    11 #include <aw_root.hxx> 
    12 #include <aw_device.hxx> 
    13 #include <aw_window.hxx> 
    14  
    15 #include <awt.hxx> 
    16  
    17 #include <awt_tree.hxx> 
    18 #include "dist.hxx" 
    1911#include "di_matr.hxx" 
     12#include <AP_seq_dna.hxx> 
     13#include <AP_filter.hxx> 
    2014 
    2115 
    22  
    23 char *DI_MATRIX::analyse(AW_root *awrdummy) 
    24 { 
    25     AWUSE(awrdummy); 
    26     long  row, pos; 
    27     char *sequ, ch, dummy[280]; 
     16void DI_MATRIX::analyse() { 
     17    long  row; 
    2818 
    2919    long    act_gci, mean_gci=0; 
     
    3525            aw_message("A lot of sequences!\n   ==> fast Kimura selected! (instead of PAM)"); 
    3626            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_KIMURA); 
    37         }else{ 
    38             aw_message(     "Only limited number of sequences!\n" 
    39                             "   ==> slow PAM selected! (instead of Kimura)"); 
     27        } 
     28        else{ 
     29            aw_message("Only limited number of sequences!\n" 
     30                       "   ==> slow PAM selected! (instead of Kimura)"); 
    4031            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_PAM); 
    4132        } 
    42         return 0; 
    4333    } 
     34    else { 
     35        // calculate meanvalue of sequencelength: 
     36        for(row=0; row<nentries; row++) { 
     37            act_gci = 0; 
     38            act_len = 0; 
     39         
     40            const char *sequ = entries[row]->sequence_parsimony->get_sequence(); 
    4441 
     42            size_t flen = aliview->get_length(); 
     43            for (size_t pos=0; pos<flen; pos++) { 
     44                char ch = sequ[pos]; 
     45                if(ch == AP_C || ch == AP_G) act_gci++; 
     46                if(ch == AP_A || ch == AP_C || ch == AP_G || ch == AP_T) act_len++; 
     47            } 
     48            mean_gci += act_gci; 
     49            act_gc = ((float) act_gci) / act_len; 
     50            if(act_gc < min_gc) min_gc = act_gc; 
     51            if(act_gc > max_gc) max_gc = act_gc; 
     52            mean_len += act_len; 
     53            if(act_len < min_len) min_len = act_len; 
     54            if(act_len > max_len) max_len = act_len; 
     55        } 
    4556 
    46     //calculate meanvalue of sequencelength: 
     57        if (min_len * 1.3 < max_len) { 
     58            aw_message("Warning: The length of sequences differs significantly!\n" 
     59                       "        Be careful: Neighbour Joining is sensitive to\n" 
     60                       "        this kind of \"error\""); 
     61        } 
     62        mean_gc = ((float) mean_gci) / mean_len / nentries; 
     63        mean_len /= nentries; 
    4764 
    48     for(row=0; row<nentries; row++) { 
    49         act_gci = 0; 
    50         act_len = 0; 
    51         sequ = entries[row]->sequence_parsimony->sequence; 
    52         for(pos=0; pos<tree_root->filter->real_len; pos++) { 
    53             ch = sequ[pos]; 
    54             if(ch == AP_C || ch == AP_G) act_gci++; 
    55             if(ch == AP_A || ch == AP_C || ch == AP_G || ch == AP_T) act_len++; 
     65        if(mean_len < 100) { 
     66            aw_message("Too short sequences!\n   ==> No correction selected!"); 
     67            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_NONE); 
    5668        } 
    57         mean_gci += act_gci; 
    58         act_gc = ((float) act_gci) / act_len; 
    59         if(act_gc < min_gc) min_gc = act_gc; 
    60         if(act_gc > max_gc) max_gc = act_gc; 
    61         mean_len += act_len; 
    62         if(act_len < min_len) min_len = act_len; 
    63         if(act_len > max_len) max_len = act_len; 
     69        else if(mean_len < 300) { 
     70            aw_message("Meanlength shorter than 300\n   ==> Jukes Cantor selected!"); 
     71            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_JUKES_CANTOR); 
     72        } 
     73        else if ((mean_len < 1000) || ((max_gc / min_gc) < 1.2)) { 
     74            const char *reason; 
     75            if(mean_len < 1000) reason = "Sequences are too short for Olsen!"; 
     76            else                reason = GBS_global_string("Maximal GC (%f) : Minimal GC (%f) < 1.2", max_gc, min_gc); 
     77 
     78            reason = GBS_global_string("%s  ==> Felsenstein selected!", reason); 
     79            aw_message(reason); 
     80            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_FELSENSTEIN); 
     81        } 
     82        else { 
     83            aw_message("Olsen selected!"); 
     84            aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_OLSEN); 
     85        } 
    6486    } 
    65  
    66     if (min_len * 1.3 < max_len) { 
    67         aw_message("Warning: The length of sequences differs significantly\n" 
    68                    "        be careful, neighbour joining is sensitive to\n" 
    69                    "        this kind of error"); 
    70     } 
    71     mean_gc = ((float) mean_gci) / mean_len / nentries; 
    72     mean_len /= nentries; 
    73  
    74  
    75     if(mean_len < 100) { 
    76         aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_NONE); 
    77         aw_message("Too short sequences!\n   ==> No correction selected!"); 
    78         return NULL; 
    79     } 
    80  
    81     if(mean_len < 300) { 
    82         aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_JUKES_CANTOR); 
    83         aw_message("Meanlength shorter than 300\n   ==> Jukes Cantor selected!"); 
    84         return NULL; 
    85     } 
    86  
    87     if((mean_len < 1000) || ((max_gc / min_gc) < 1.2)) { 
    88         if(mean_len < 1000) 
    89             sprintf(dummy, "Too short sequences for Olsen! \n"); 
    90         else 
    91             sprintf(dummy, "Maximal GC (%f) : Minimal GC (%f) < 1.2\n", max_gc, min_gc); 
    92         sprintf(dummy, "%s   ==> Felsenstein selected!", dummy); 
    93         aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_FELSENSTEIN); 
    94         aw_message(dummy); 
    95         return NULL; 
    96     } 
    97  
    98     aw_root->awar(AWAR_DIST_CORR_TRANS)->write_int(DI_TRANSFORMATION_OLSEN); 
    99     aw_message("Olsen selected!"); 
    100     return NULL; 
    101  
    10287} 
  • trunk/EDIT4/ED4_ProteinViewer.cxx

    r6141 r6280  
    1414#include "ed4_class.hxx" 
    1515 
    16 #include <awt_pro_a_nucs.hxx> 
    17 #include <awt_codon_table.hxx> 
    18 #include <awt_translate.hxx> 
     16#include <AP_pro_a_nucs.hxx> 
     17#include <AP_codon_table.hxx> 
     18#include <Translate.hxx> 
    1919#include <awt_seq_colors.hxx> 
    2020#include <aw_question.hxx> 
    2121#include <aw_preset.hxx> 
    2222#include <aw_awars.hxx> 
    23 #include <arbdbt.h> 
    2423 
    2524#include <iostream> 
     
    633632                    const char *AAname = 0; 
    634633                    if(base>='A' && base<='Z') { 
    635                         AAname = AWT_get_protein_name(base); 
     634                        AAname = AP_get_protein_name(base); 
    636635                    } 
    637636                    else if (base=='*') { 
  • trunk/EDIT4/ED4_main.cxx

    r6208 r6280  
    2020#include <st_window.hxx> 
    2121#include <gde.hxx> 
    22 #include<awt_pro_a_nucs.hxx> 
     22#include <AP_pro_a_nucs.hxx> 
    2323 
    2424#include <ed4_extern.hxx> 
  • trunk/EDIT4/ED4_manager.cxx

    r6279 r6280  
    18131813                    e4_assert(gbd); 
    18141814 
    1815 #if defined(ASSERTION_USED) 
    1816                     GB_ERROR error = 
    1817 #endif // ASSERTION_USED 
    1818                         GB_write_flag(gbd, mark ? 1 : 0); 
    1819                     e4_assert(!error); 
    1820  
     1815                    GB_write_flag(gbd, mark ? 1 : 0); 
    18211816                    sel++; 
    18221817                } 
  • trunk/EDIT4/ED4_search.cxx

    r6257 r6280  
    14461446    ED4_SearchPositionType  pattern  = ED4_SearchPositionType(cl_pattern); 
    14471447    ED4_terminal           *terminal = ED4_ROOT->root_group_man->get_first_terminal(); 
    1448     GB_ERROR                error    = 0; 
    14491448    GB_transaction          ta(GLOBAL_gb_main); 
    14501449 
    1451     while (terminal && !error) { 
     1450    while (terminal) { 
    14521451        if (terminal->is_sequence_terminal()) { 
    14531452            ED4_sequence_terminal *seq_terminal = terminal->to_sequence_terminal(); 
     
    14621461                    GBDATA *gbd = species_man->get_species_pointer(); 
    14631462                    e4_assert(gbd); 
    1464                     error = GB_write_flag(gbd, 1); 
     1463                    GB_write_flag(gbd, 1); 
    14651464                }             
    14661465            } 
     
    14681467 
    14691468        terminal = terminal->get_next_terminal(); 
    1470     } 
    1471  
    1472     if (error) { 
    1473         error = ta.close(error); 
    1474         aw_message(error); 
    14751469    } 
    14761470} 
  • trunk/EDIT4/Makefile

    r6277 r6280  
    252252ED4_main.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    253253ED4_main.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     254ED4_main.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
    254255ED4_main.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    255256ED4_main.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    271272ED4_main.o: $(ARBHOME)/INCLUDE/awt.hxx 
    272273ED4_main.o: $(ARBHOME)/INCLUDE/awt_map_key.hxx 
    273 ED4_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    274274ED4_main.o: $(ARBHOME)/INCLUDE/awt_seq_colors.hxx 
    275275ED4_main.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
     
    443443ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    444444ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     445ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/AP_codon_table.hxx 
     446ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
    445447ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    446448ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    461463ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    462464ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/awt.hxx 
    463 ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/awt_codon_table.hxx 
    464 ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    465465ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/awt_seq_colors.hxx 
    466 ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/awt_translate.hxx 
    467466ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/smartptr.h 
     467ED4_ProteinViewer.o: $(ARBHOME)/INCLUDE/Translate.hxx 
    468468 
    469469ED4_RNA3D.o: ../RNA3D/RNA3D_Main.hxx 
  • trunk/GENOM/EXP_interface.cxx

    r6188 r6280  
    1313//  ==================================================================== // 
    1414 
    15 #include <awt.hxx> 
    16 #include <awt_canvas.hxx> 
    17 #include <awt_item_sel_list.hxx> 
    18 #include <awt_sel_boxes.hxx> 
    19 #include <arbdbt.h> 
    20 #include <aw_awars.hxx> 
    21 #include <db_scanner.hxx> 
    22  
    23 #include "EXP.hxx" 
     15#include "EXP_local.hxx" 
    2416#include "EXP_interface.hxx" 
    25 #include "EXP_local.hxx" 
    26  
    27 #include "GEN.hxx" 
     17 
    2818#include "GEN_local.hxx" 
    2919#include "GEN_interface.hxx" 
    3020 
     21#include <db_scanner.hxx> 
     22 
     23#include <awt_sel_boxes.hxx> 
     24#include <awt_item_sel_list.hxx> 
     25#include <awt.hxx> 
     26 
     27#include <aw_awars.hxx> 
     28 
    3129#include "../NTREE/ad_spec.hxx" 
    3230#include <../NTREE/nt_internal.h> 
    33  
    34 #include <cstdlib> 
    35 #include <cstring> 
    3631 
    3732using namespace std; 
  • trunk/GENOM/EXP_local.hxx

    r5675 r6280  
    1616#define EXP_LOCAL_HXX 
    1717 
     18#ifndef EXP_HXX 
     19#include <EXP.hxx> 
     20#endif 
     21#ifndef AW_ROOT_HXX 
     22#include <aw_root.hxx> 
     23#endif 
    1824#ifndef ARB_ASSERT_H 
    1925#include <arb_assert.h> 
  • trunk/GENOM/GEN_graphic.cxx

    r5942 r6280  
    117117            } 
    118118            case AWT_MODE_SELECT: 
    119             case AWT_MODE_MOD: { 
     119            case AWT_MODE_EDIT: { 
    120120                if(button==AWT_M_LEFT) { 
    121121                    GEN_gene *gene = 0; 
     
    127127                        aw_root->awar(AWAR_LOCAL_GENE_NAME(window_nr))->write_string(gene->Name().c_str()); 
    128128 
    129                         if (cmd == AWT_MODE_MOD) { 
     129                        if (cmd == AWT_MODE_EDIT) { 
    130130                            GEN_create_gene_window(aw_root)->activate(); 
    131131                        } 
  • trunk/GENOM/GEN_interface.cxx

    r6188 r6280  
    1 #include <cstdlib> 
    2 #include <cstring> 
    3 #include <awt.hxx> 
    4 #include <awt_canvas.hxx> 
     1#include "GEN_local.hxx" 
     2 
    53#include <awt_item_sel_list.hxx> 
    64#include <awt_sel_boxes.hxx> 
     
    86#include <db_scanner.hxx> 
    97 
    10 #include <arbdbt.h> 
    11 #include <probe_design.hxx> 
    12  
    138#include <ntree.hxx> 
    149#include <../NTREE/ad_spec.hxx> 
    1510#include <../NTREE/nt_internal.h> 
    1611 
    17 #ifndef GEN_LOCAL_HXX 
    18 #include "GEN_local.hxx" 
    19 #endif 
    20 #ifndef GEN_NDS_HXX 
    21 #include "GEN_nds.hxx" 
    22 #endif 
    2312 
    2413using namespace std; 
  • trunk/GENOM/GEN_interface.hxx

    r312 r6280  
    88#define GEN_INTERFACE_HXX 
    99 
     10#ifndef ARBDBT_H 
     11#include <arbdbt.h> 
     12#endif 
     13 
     14 
    1015extern struct ad_item_selector GEN_item_selector; 
    1116 
  • trunk/GENOM/GEN_map.cxx

    r6188 r6280  
    522522            break; 
    523523        } 
    524         case AWT_MODE_MOD: { 
     524        case AWT_MODE_EDIT: { 
    525525            text="INFO MODE    LEFT: click for info"; 
    526526            break; 
     
    922922 
    923923static void do_mark_command_for_one_species(int imode, GBDATA *gb_species, AW_CL cl_user) { 
    924     GEN_MARK_MODE mode  = (GEN_MARK_MODE)imode; 
    925     GB_ERROR      error = 0; 
     924    GEN_MARK_MODE mode = (GEN_MARK_MODE)imode; 
    926925 
    927926    for (GBDATA *gb_gene = GEN_first_gene(gb_species); 
    928          !error && gb_gene; 
     927         gb_gene; 
    929928         gb_gene = GEN_next_gene(gb_gene)) 
    930929    { 
     
    975974        } 
    976975 
    977         if (mark_flag != org_mark_flag) { 
    978             error = GB_write_flag(gb_gene, mark_flag?1:0); 
    979         } 
    980     } 
    981  
    982     if (error) aw_message(error); 
     976        if (mark_flag != org_mark_flag) GB_write_flag(gb_gene, mark_flag?1:0); 
     977    } 
    983978} 
    984979 
     
    16661661    create_mode("select.bitmap", "gen_mode.hlp", AWM_ALL, GEN_mode_event, (AW_CL)this, (AW_CL)AWT_MODE_SELECT); 
    16671662    create_mode("pzoom.bitmap",  "gen_mode.hlp", AWM_ALL, GEN_mode_event, (AW_CL)this, (AW_CL)AWT_MODE_ZOOM); 
    1668     create_mode("info.bitmap",   "gen_mode.hlp", AWM_ALL, GEN_mode_event, (AW_CL)this, (AW_CL)AWT_MODE_MOD); 
     1663    create_mode("info.bitmap",   "gen_mode.hlp", AWM_ALL, GEN_mode_event, (AW_CL)this, (AW_CL)AWT_MODE_EDIT); 
    16691664 
    16701665    // ------------------ 
  • trunk/GENOM/GEN_translations.cxx

    r6141 r6280  
    1111// =============================================================== // 
    1212 
     13#include "GEN_local.hxx" 
     14 
     15#include <Translate.hxx> 
     16#include <AP_codon_table.hxx> 
     17#include <aw_question.hxx> 
    1318#include <arbdbt.h> 
    14 #include <awt_translate.hxx> 
    15 #include <awt_codon_table.hxx> 
    16 #include <aw_question.hxx> 
    17  
    18 #include "GEN.hxx" 
    19 #include "GEN_local.hxx" 
    2019 
    2120using namespace std; 
  • trunk/GENOM/Makefile

    r6277 r6280  
    4040        $(MAKEDEPEND) -f- $(MAKEDEPENDFLAGS) $< 2>/dev/null >$@ 
    4141 
    42 # DO NOT DELETE 
     42# DO NOT DELETE THIS LINE -- make depend depends on it. 
    4343 
    4444# Do not add dependencies manually - use 'make depend' in $ARBHOME 
     
    7171EXP_interface.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    7272EXP_interface.o: $(ARBHOME)/INCLUDE/awt.hxx 
    73 EXP_interface.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    7473EXP_interface.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    7574EXP_interface.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
     
    158157GEN_interface.o: GEN.hxx 
    159158GEN_interface.o: GEN_local.hxx 
    160 GEN_interface.o: GEN_nds.hxx 
    161159GEN_interface.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    162160GEN_interface.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     
    177175GEN_interface.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    178176GEN_interface.o: $(ARBHOME)/INCLUDE/awt.hxx 
    179 GEN_interface.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    180177GEN_interface.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    181178GEN_interface.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    182179GEN_interface.o: $(ARBHOME)/INCLUDE/db_scanner.hxx 
    183180GEN_interface.o: $(ARBHOME)/INCLUDE/ntree.hxx 
    184 GEN_interface.o: $(ARBHOME)/INCLUDE/probe_design.hxx 
    185181GEN_interface.o: $(ARBHOME)/INCLUDE/smartptr.h 
    186182 
     
    249245GEN_translations.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    250246GEN_translations.o: $(ARBHOME)/INCLUDE/adGene.h 
     247GEN_translations.o: $(ARBHOME)/INCLUDE/AP_codon_table.hxx 
    251248GEN_translations.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    252249GEN_translations.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    263260GEN_translations.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    264261GEN_translations.o: $(ARBHOME)/INCLUDE/awt.hxx 
    265 GEN_translations.o: $(ARBHOME)/INCLUDE/awt_codon_table.hxx 
    266 GEN_translations.o: $(ARBHOME)/INCLUDE/awt_translate.hxx 
    267262GEN_translations.o: $(ARBHOME)/INCLUDE/smartptr.h 
     263GEN_translations.o: $(ARBHOME)/INCLUDE/Translate.hxx 
  • trunk/GENOM_IMPORT/DBwriter.cxx

    r6141 r6280  
    1616#include <arbdbt.h> 
    1717#include <adGene.h> 
    18 #include <awt_translate.hxx> 
     18#include <Translate.hxx> 
    1919#include <aw_question.hxx> 
    2020#include <GEN.hxx> 
     
    4848    if (!gb_container) throw DBerror(GBS_global_string("Failed to create container '%s'", name)); 
    4949 
    50     if (mark) { 
    51         GB_ERROR err = GB_write_flag(gb_container, 1); 
    52         if (err) throw DBerror(GBS_global_string("Failed to mark %s", name), err); 
    53     } 
     50    if (mark) GB_write_flag(gb_container, 1); 
    5451 
    5552    return gb_container; 
  • trunk/GENOM_IMPORT/Makefile

    r6277 r6280  
    8484DBwriter.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    8585DBwriter.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    86 DBwriter.o: $(ARBHOME)/INCLUDE/awt_translate.hxx 
    8786DBwriter.o: $(ARBHOME)/INCLUDE/FileBuffer.h 
    8887DBwriter.o: $(ARBHOME)/INCLUDE/GEN.hxx 
    8988DBwriter.o: $(ARBHOME)/INCLUDE/smartptr.h 
     89DBwriter.o: $(ARBHOME)/INCLUDE/Translate.hxx 
    9090 
    9191Feature.o: defs.h 
  • trunk/MERGE/MG_checkfield.cxx

    r6141 r6280  
    247247                                    GBS_diff_strings(s1,s2,exclude,ToUpper,correct,&positions1,&positions2,&corrected); 
    248248                                    if (corrected) { 
    249                                         error             = GB_write_as_string(gb_field2,s2); 
    250                                         if (!error) error = GB_write_flag(gb_species2,1); 
     249                                        error = GB_write_as_string(gb_field2,s2); 
     250                                        if (!error) GB_write_flag(gb_species2,1); 
    251251                                    } 
    252252                                } 
  • trunk/MERGE/MG_species.cxx

    r6141 r6280  
    686686                                else { 
    687687                                    if (!GBS_find_string(s2,s1,0)) { 
    688                                         error             = GB_write_string(gb_field2, GBS_global_string("%s %s", s2, s1)); 
    689                                         if (!error) error = GB_write_flag(gb_species2,1); 
     688                                        error = GB_write_string(gb_field2, GBS_global_string("%s %s", s2, s1)); 
     689                                        if (!error) GB_write_flag(gb_species2,1); 
    690690                                    } 
    691691                                } 
     
    695695                            } 
    696696                            else { // not GB_STRING 
    697                                 error             = GB_copy(gb_field2,gb_field1); 
    698                                 if (!error) error = GB_write_flag(gb_species2, 1); 
     697                                error = GB_copy(gb_field2,gb_field1); 
     698                                if (!error) GB_write_flag(gb_species2, 1); 
    699699                                if (transfer_of_alignment && !error){ 
    700700                                    error = MG_transfer_sequence(&rm,gb_species1,gb_species2); 
     
    827827                    } 
    828828                } 
    829                 if (!error) error = GB_write_flag(gb_species2,1); 
     829                if (!error) GB_write_flag(gb_species2,1); 
    830830            } 
    831831        } 
     
    11601160            else { 
    11611161                error             = GB_copy_with_protection(D_species, M_species, GB_TRUE); 
    1162                 if (!error) error = GB_write_flag(D_species,1); // mark species 
     1162                if (!error) GB_write_flag(D_species,1); // mark species 
    11631163                if (!error) error = GB_write_usr_private(D_species,255); // put in hitlist 
    11641164                if (!error) error = GBT_write_string(D_species, "name", m_name); 
  • trunk/MULTI_PROBE/MP_noclass.cxx

    r6160 r6280  
    1111#include <awt.hxx> 
    1212#include <awt_canvas.hxx> 
    13 #include <awt_tree.hxx> 
    14 #include <awt_dtree.hxx> 
    15 #include <awt_tree_cb.hxx> 
     13#include <AP_Tree.hxx> 
     14#include <TreeCallbacks.hxx> 
    1615 
    1716#include "MultiProbe.hxx" 
     
    6362    GB_transaction dummy(ntw->gb_main); 
    6463 
    65     AP_tree *ap_tree = AWT_TREE(ntw)->tree_root; 
     64    AP_tree *ap_tree = AWT_TREE(ntw)->get_root_node(); 
    6665    if (ap_tree) ap_tree->calc_color(); 
    6766 
     
    540539 
    541540    GB_transaction dummy(ntw->gb_main); 
    542     AWT_TREE(ntw)->tree_root->calc_color_probes(mp_main->get_stc()->sondentopf->get_color_hash()); 
     541    AWT_TREE(ntw)->get_root_node()->calc_color_probes(mp_main->get_stc()->sondentopf->get_color_hash()); 
    543542 
    544543    if (ntw->gb_main) 
     
    826825    GB_transaction dummy(ntw->gb_main); 
    827826 
    828     AWT_TREE(ntw)->tree_root->calc_color(); 
     827    AWT_TREE(ntw)->get_root_node()->calc_color(); 
    829828 
    830829    if (ntw->gb_main) 
  • trunk/MULTI_PROBE/MP_sonde.cxx

    r6137 r6280  
    44#include <arbdbt.h> 
    55#include <aw_root.hxx> 
    6 #include <awt_tree.hxx> 
    76#include <math.h> 
    87 
  • trunk/MULTI_PROBE/MP_sondentopf.cxx

    r5356 r6280  
    33#include <string.h> 
    44#include <arbdbt.h> 
    5 #include <awt_tree.hxx> 
     5#include <aw_root.hxx> 
     6#include <AP_Tree.hxx> // needed for GCs 
    67#include <math.h> 
    78 
  • trunk/MULTI_PROBE/Makefile

    r6277 r6280  
    126126MP_noclass.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    127127MP_noclass.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     128MP_noclass.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     129MP_noclass.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     130MP_noclass.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    128131MP_noclass.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    129132MP_noclass.o: $(ARBHOME)/INCLUDE/arb_error.h 
     133MP_noclass.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    130134MP_noclass.o: $(ARBHOME)/INCLUDE/arbdb.h 
    131135MP_noclass.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    142146MP_noclass.o: $(ARBHOME)/INCLUDE/awt.hxx 
    143147MP_noclass.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    144 MP_noclass.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    145 MP_noclass.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    146 MP_noclass.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    147 MP_noclass.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
    148148MP_noclass.o: $(ARBHOME)/INCLUDE/client.h 
     149MP_noclass.o: $(ARBHOME)/INCLUDE/downcast.h 
    149150MP_noclass.o: $(ARBHOME)/INCLUDE/PT_com.h 
    150151MP_noclass.o: $(ARBHOME)/INCLUDE/servercntrl.h 
    151152MP_noclass.o: $(ARBHOME)/INCLUDE/smartptr.h 
     153MP_noclass.o: $(ARBHOME)/INCLUDE/TreeCallbacks.hxx 
     154MP_noclass.o: $(ARBHOME)/INCLUDE/TreeDisplay.hxx 
    152155 
    153156MP_permute.o: MP_externs.hxx 
     
    239242MP_sonde.o: $(ARBHOME)/INCLUDE/attributes.h 
    240243MP_sonde.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    241 MP_sonde.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    242244MP_sonde.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    243 MP_sonde.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    244 MP_sonde.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    245245MP_sonde.o: $(ARBHOME)/INCLUDE/client.h 
    246246MP_sonde.o: $(ARBHOME)/INCLUDE/PT_com.h 
     
    256256MP_sondentopf.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    257257MP_sondentopf.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     258MP_sondentopf.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     259MP_sondentopf.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     260MP_sondentopf.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    258261MP_sondentopf.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    259262MP_sondentopf.o: $(ARBHOME)/INCLUDE/arb_error.h 
     263MP_sondentopf.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    260264MP_sondentopf.o: $(ARBHOME)/INCLUDE/arbdb.h 
    261265MP_sondentopf.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    266270MP_sondentopf.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    267271MP_sondentopf.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    268 MP_sondentopf.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    269 MP_sondentopf.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    270272MP_sondentopf.o: $(ARBHOME)/INCLUDE/client.h 
     273MP_sondentopf.o: $(ARBHOME)/INCLUDE/downcast.h 
    271274MP_sondentopf.o: $(ARBHOME)/INCLUDE/PT_com.h 
    272275MP_sondentopf.o: $(ARBHOME)/INCLUDE/servercntrl.h 
     
    281284MP_Window.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    282285MP_Window.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     286MP_Window.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    283287MP_Window.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    284288MP_Window.o: $(ARBHOME)/INCLUDE/arb_error.h 
    285289MP_Window.o: $(ARBHOME)/INCLUDE/arbdb.h 
    286290MP_Window.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     291MP_Window.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    287292MP_Window.o: $(ARBHOME)/INCLUDE/arbtools.h 
    288293MP_Window.o: $(ARBHOME)/INCLUDE/attributes.h 
  • trunk/Makefile

    r6277 r6280  
    631631                        XML/XML.a \ 
    632632 
     633# -----------------------  
     634#     library packets      
     635 
    633636ARCHS_CLIENT_PROBE = PROBE_COM/client.a 
    634637ARCHS_CLIENT_NAMES = NAMES_COM/client.a 
     
    640643# communication libs need aisc and aisc_mkpts: 
    641644$(ARCHS_COMMUNICATION:.a=.dummy) : $(ARCHS_MAKEBIN:.a=.dummy) 
     645 
     646ARCHS_SEQUENCE = \ 
     647                SL/SEQUENCE/SEQUENCE.a \ 
     648                SL/ALIVIEW/ALIVIEW.a \ 
     649                SL/PRONUC/PRONUC.a \ 
     650 
     651ARCHS_TREE = \ 
     652                $(ARCHS_SEQUENCE) \ 
     653                SL/FILTER/FILTER.a \ 
     654                SL/ARB_TREE/ARB_TREE.a \ 
     655 
     656# parsimony tree (used by NTREE, PARSIMONY, STAT(->EDIT[4]), DIST(obsolete!)) 
     657ARCHS_AP_TREE = \ 
     658                $(ARCHS_TREE) \ 
     659                SL/AP_TREE/AP_TREE.a \ 
    642660 
    643661#*************************************************************************************** 
     
    649667ARCHS_NTREE = \ 
    650668                $(ARCHS_CLIENT_PROBE) \ 
     669                $(ARCHS_AP_TREE) \ 
    651670                ARB_GDE/ARB_GDE.a \ 
    652671                AWTC/AWTC.a \ 
     
    664683                SL/DB_SCANNER/DB_SCANNER.a \ 
    665684                SL/FILE_BUFFER/FILE_BUFFER.a \ 
     685                SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ 
    666686                SL/HELIX/HELIX.a \ 
    667687                SL/REGEXPR/REGEXPR.a \ 
     688                SL/TRANSLATE/TRANSLATE.a \ 
     689                SL/TREEDISP/TREEDISP.a \ 
    668690                SL/TREE_READ/TREE_READ.a \ 
    669691                SL/TREE_WRITE/TREE_WRITE.a \ 
     
    690712EDIT = bin/arb_edit 
    691713ARCHS_EDIT = \ 
     714                $(ARCHS_AP_TREE) \ 
     715                ARB_GDE/ARB_GDE.a \ 
     716                EDIT/EDIT.a \ 
    692717                NAMES_COM/client.a \ 
    693718                SERVERCNTRL/SERVERCNTRL.a \ 
    694                 EDIT/EDIT.a \ 
    695                 ARB_GDE/ARB_GDE.a \ 
     719                SL/AW_HELIX/AW_HELIX.a \ 
     720                SL/AW_NAME/AW_NAME.a \ 
     721                SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ 
     722                SL/HELIX/HELIX.a \ 
    696723                STAT/STAT.a \ 
    697724                XML/XML.a \ 
    698                 SL/HELIX/HELIX.a \ 
    699                 SL/AW_HELIX/AW_HELIX.a \ 
    700                 SL/AW_NAME/AW_NAME.a \ 
    701725 
    702726$(EDIT): $(ARCHS_EDIT:.a=.dummy) shared_libs 
     
    711735 
    712736ARCHS_EDIT4 := \ 
    713                 NAMES_COM/client.a \ 
     737                $(ARCHS_AP_TREE) \ 
     738                ARB_GDE/ARB_GDE.a \ 
    714739                AWTC/AWTC.a \ 
    715740                EDIT4/EDIT4.a \ 
     741                ISLAND_HOPPING/ISLAND_HOPPING.a \ 
     742                NAMES_COM/client.a \ 
    716743                SECEDIT/SECEDIT.a \ 
    717744                SERVERCNTRL/SERVERCNTRL.a \ 
    718                 STAT/STAT.a \ 
    719                 ARB_GDE/ARB_GDE.a \ 
    720                 ISLAND_HOPPING/ISLAND_HOPPING.a \ 
    721                 SL/FAST_ALIGNER/FAST_ALIGNER.a \ 
    722                 SL/HELIX/HELIX.a \ 
    723745                SL/AW_HELIX/AW_HELIX.a \ 
    724746                SL/AW_NAME/AW_NAME.a \ 
     747                SL/FAST_ALIGNER/FAST_ALIGNER.a \ 
    725748                SL/FILE_BUFFER/FILE_BUFFER.a \ 
     749                SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ 
     750                SL/HELIX/HELIX.a \ 
     751                SL/TRANSLATE/TRANSLATE.a \ 
     752                STAT/STAT.a \ 
    726753                XML/XML.a \ 
    727754 
     
    759786                WETC/WETC.a \ 
    760787                SL/HELIX/HELIX.a \ 
     788                SL/FILTER/FILTER.a \ 
    761789                XML/XML.a \ 
    762790 
     
    772800ARCHS_DIST = \ 
    773801                $(ARCHS_CLIENT_PROBE) \ 
     802                $(ARCHS_AP_TREE) \ 
     803                CONSENSUS_TREE/CONSENSUS_TREE.a \ 
    774804                DIST/DIST.a \ 
     805                EISPACK/EISPACK.a \ 
    775806                SERVERCNTRL/SERVERCNTRL.a \ 
    776                 CONSENSUS_TREE/CONSENSUS_TREE.a \ 
    777                 EISPACK/EISPACK.a \ 
     807                SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ 
    778808                SL/HELIX/HELIX.a \ 
     809                SL/MATRIX/MATRIX.a \ 
     810                SL/NEIGHBOURJOIN/NEIGHBOURJOIN.a \ 
    779811                XML/XML.a \ 
    780812 
     
    789821PARSIMONY = bin/arb_pars 
    790822ARCHS_PARSIMONY = \ 
     823                $(ARCHS_AP_TREE) \ 
    791824                NAMES_COM/client.a \ 
     825                PARSIMONY/PARSIMONY.a \ 
    792826                SERVERCNTRL/SERVERCNTRL.a \ 
    793                 PARSIMONY/PARSIMONY.a \ 
     827                SL/AW_NAME/AW_NAME.a \ 
     828                SL/GUI_ALIVIEW/GUI_ALIVIEW.a \ 
    794829                SL/HELIX/HELIX.a \ 
    795                 SL/AW_NAME/AW_NAME.a \ 
     830                SL/TRANSLATE/TRANSLATE.a \ 
     831                SL/TREEDISP/TREEDISP.a \ 
    796832                XML/XML.a \ 
    797833 
     
    846882                PHYLO/PHYLO.a \ 
    847883                SL/HELIX/HELIX.a \ 
     884                SL/FILTER/FILTER.a \ 
     885                SL/MATRIX/MATRIX.a \ 
    848886                XML/XML.a \ 
    849887 
     
    11261164xmlin:  XML_IMPORT/XML_IMPORT.dummy# broken 
    11271165templ:  TEMPLATES/TEMPLATES.dummy 
     1166stat:   STAT/STAT.a $(NTREE) $(EDIT) $(EDIT4) 
    11281167 
    11291168#******************************************************************************** 
     
    11711210                AISC_COM/AISC_COM.proto \ 
    11721211                GDE/GDE.proto \ 
     1212                SL/SL.proto \ 
    11731213 
    11741214#******************************************************************************** 
  • trunk/NTREE/AP_conservProfile2Gnuplot.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 #include <math.h> 
    5 #include <unistd.h> 
    6 #include <sys/types.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_conservProfile2Gnuplot.cxx                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    710 
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10 #include <aw_root.hxx> 
    11 #include <aw_device.hxx> 
    12 #include <aw_window.hxx> 
    13 #include <aw_awars.hxx> 
     11#include "nt_internal.h" 
     12 
     13#include <awt.hxx> 
     14#include "ap_conservProfile2Gnuplot.hxx" 
     15 
    1416#include <aw_global.hxx> 
    15 #include <awt.hxx> 
    16 #include <awt_tree.hxx> 
    17 #include <awt_canvas.hxx> 
    18 #include <awt_csp.hxx> 
    19 #include "ap_conservProfile2Gnuplot.hxx" 
    20 //#include "nt_cb.hxx" 
    2117 
    2218extern GBDATA *GLOBAL_gb_main; 
  • trunk/NTREE/AP_csp_2_gnuplot.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 #include <math.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_csp_2_gnuplot.cxx                              // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "nt_internal.h" 
     12#include "ap_csp_2_gnuplot.hxx" 
     13 
     14#include <awt_filter.hxx> 
     15#include <awt.hxx> 
     16#include <awt_csp.hxx> 
     17#include <AP_filter.hxx> 
     18#include <aw_global.hxx> 
     19#include <aw_awars.hxx> 
     20 
    521#include <unistd.h> 
    6 #include <sys/types.h> 
    7  
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10 #include <aw_root.hxx> 
    11 #include <aw_device.hxx> 
    12 #include <aw_window.hxx> 
    13 #include <aw_awars.hxx> 
    14 #include <aw_global.hxx> 
    15 #include <awt.hxx> 
    16 #include <awt_tree.hxx> 
    17 #include <awt_csp.hxx> 
    18 #include <awt_sel_boxes.hxx> 
    19 #include "ap_csp_2_gnuplot.hxx" 
    20  
    21 #ifndef ARB_ASSERT_H 
    22 #include <arb_assert.h> 
    23 #endif 
     22 
    2423#define nt_assert(bed) arb_assert(bed) 
    2524 
    2625extern GBDATA *GLOBAL_gb_main; 
    2726 
    28  
    29 // ------------------------------------------------------------------------------------------------------------------------------ 
    30 //      static GB_ERROR split_stat_filename(const char *fname, char **dirPtr, char **name_prefixPtr, char **name_postfixPtr) 
    31 // ------------------------------------------------------------------------------------------------------------------------------ 
    3227static GB_ERROR split_stat_filename(const char *fname, char **dirPtr, char **name_prefixPtr, char **name_postfixPtr) { 
    3328    // 'fname' is sth like 'directory/prefix.sth_gnu' 
     
    6661    return 0; 
    6762} 
    68 // ------------------------------------------------------------------------------------------- 
    69 //      static char * get_overlay_files(AW_root *awr, const char *fname, GB_ERROR& error) 
    70 // ------------------------------------------------------------------------------------------- 
     63 
    7164static char * get_overlay_files(AW_root *awr, const char *fname, GB_ERROR& error) { 
    7265    nt_assert(!error); 
     
    219212} 
    220213 
    221 // ------------------------------------------------------------------------------ 
    222 //      void AP_csp_2_gnuplot_cb(AW_window *aww, AW_CL cspcd, AW_CL cl_mode) 
    223 // ------------------------------------------------------------------------------ 
     214// ------------------- 
     215//      SortedFreq 
     216 
     217class SortedFreq { 
     218    float *freq[4];  
     219 
     220public: 
     221    SortedFreq(const AWT_csp *csp); 
     222    ~SortedFreq(); 
     223 
     224    float get(PlotType plot_type, size_t pos) const { 
     225        float f; 
     226        switch (plot_type) { 
     227            case PT_MOST_FREQUENT_BASE:   f = freq[0][pos]; break; 
     228            case PT_SECOND_FREQUENT_BASE: f = freq[1][pos]; break; 
     229            case PT_THIRD_FREQUENT_BASE:  f = freq[2][pos]; break; 
     230            case PT_LEAST_FREQUENT_BASE:  f = freq[3][pos]; break; 
     231            default: nt_assert(0); break; 
     232        } 
     233        return f; 
     234    } 
     235}; 
     236 
     237SortedFreq::SortedFreq(const AWT_csp *csp) { 
     238    size_t len = csp->get_length(); 
     239    for (int i = 0; i<4; ++i) { // 4 best frequencies 
     240        freq[i] = new float[len]; 
     241        for (size_t p = 0; p<len; ++p) freq[i][p] = 0.0; // clear 
     242    } 
     243 
     244    for (unsigned int c = 0; c<256; ++c) { // all character stats 
     245        const float *cfreq = csp->get_frequencies((unsigned char)c); 
     246        if (cfreq) { 
     247            for (size_t p = 0; p<len; ++p) {            // all positions 
     248                if (freq[3][p] < cfreq[p]) { 
     249                    freq[3][p] = cfreq[p];          // found higher freq 
     250 
     251                    for (int i = 3; i > 0; --i) { // bubble upwards to sort  
     252                        if (freq[i-1][p] >= freq[i][p]) break; // sorted! 
     253 
     254                        float f      = freq[i][p]; 
     255                        freq[i][p]   = freq[i-1][p]; 
     256                        freq[i-1][p] = f; 
     257                    } 
     258                } 
     259            } 
     260        } 
     261    } 
     262 
     263#if defined(DEBUG) 
     264    for (size_t p = 0; p<len; ++p) {                // all positions 
     265        nt_assert(freq[0][p] >= freq[1][p]); 
     266        nt_assert(freq[1][p] >= freq[2][p]); 
     267        nt_assert(freq[2][p] >= freq[3][p]); 
     268    } 
     269#endif // DEBUG 
     270} 
     271SortedFreq::~SortedFreq() { 
     272    for (int i = 0; i<4; ++i) delete [] freq[i]; 
     273} 
     274 
     275// ---------------------------- 
     276//      AP_csp_2_gnuplot_cb 
     277 
    224278void AP_csp_2_gnuplot_cb(AW_window *aww, AW_CL cspcd, AW_CL cl_mode) { 
    225279    // cl_mode = 0 -> write file 
     
    230284    AWT_csp        *csp   = (AWT_csp *)cspcd; 
    231285    GB_ERROR        error = 0; 
    232     AP_filter       filter; 
    233286    int             mode  = int(cl_mode); 
    234287 
     
    237290        char *alignment_name   = aww->get_root()->awar(AP_AWAR_FILTER_ALIGNMENT)->read_string(); 
    238291        long  alignment_length = GBT_get_alignment_len(GLOBAL_gb_main,alignment_name); 
    239         error                  = filter.init(filterstring,"0",alignment_length); 
     292 
     293        AP_filter filter(filterstring, "0", alignment_length); 
     294 
    240295        free(alignment_name); 
    241296        free(filterstring); 
    242297 
    243         if (!error) error = csp->go(&filter); 
    244  
    245         if (!error && !csp->seq_len) error = "Please select column statistic"; 
     298        error = csp->go(&filter); 
     299 
     300        if (!error && !csp->get_length()) error = "Please select column statistic"; 
    246301    } 
    247302 
     
    276331 
    277332            if (!error) { 
    278                 char         *type     = aww->get_root()->awar(AP_AWAR_CSP_SUFFIX)->read_string(); 
    279                 long          smooth   = aww->get_root()->awar(AP_AWAR_CSP_SMOOTH)->read_int()+1; 
    280                 double        val; 
    281                 double        smoothed = 0; 
    282                 unsigned int  j; 
    283                 float        *f[4]; 
    284  
    285                 if (type[0] == 'f') { // sort frequencies 
    286                     int wf; 
    287                     int c = 0; 
    288  
    289                     for (wf = 0; wf <256 && c <4; wf++) { 
    290                         if (csp->frequency[wf]) f[c++] = csp->frequency[wf]; 
    291                     } 
    292                     int k,l; 
    293                     for (k=3;k>0;k--) { 
    294                         for (l=0;l<k;l++) { 
    295                             for (j=0;j<csp->seq_len; j++) { 
    296                                 if (f[l][j] > f[l+1][j]) { 
    297                                     float h; 
    298                                     h = f[l][j]; 
    299                                     f[l][j] = f[l+1][j]; 
    300                                     f[l+1][j] = h; 
     333                char   *type   = aww->get_root()->awar(AP_AWAR_CSP_SUFFIX)->read_string(); 
     334                long    smooth = aww->get_root()->awar(AP_AWAR_CSP_SMOOTH)->read_int()+1; 
     335                size_t  csplen = csp->get_length(); 
     336 
     337                enum { 
     338                    STAT_AMOUNT, 
     339                    STAT_SIMPLE_FLOAT, 
     340                    STAT_SIMPLE_BOOL, 
     341                    STAT_SORT, 
     342                    STAT_UNKNOWN 
     343                } stat_type = STAT_UNKNOWN; 
     344                union { 
     345                    struct { 
     346                        const float *A; 
     347                        const float *C; 
     348                        const float *G; 
     349                        const float *TU; 
     350                    } amount;                       // STAT_AMOUNT 
     351                    const float *floatVals;         // STAT_SIMPLE_FLOAT 
     352                    const bool  *boolVals;          // STAT_SIMPLE_BOOL 
     353                    SortedFreq  *sorted;            // STAT_SORT 
     354                } data; 
     355 
     356                PlotType plot_type = string2PlotType(type); 
     357                switch (plot_type) { 
     358                    case PT_GC_RATIO: 
     359                    case PT_GA_RATIO: 
     360                    case PT_BASE_A: 
     361                    case PT_BASE_C: 
     362                    case PT_BASE_G: 
     363                    case PT_BASE_TU: { 
     364                        stat_type = STAT_AMOUNT; 
     365                         
     366                        data.amount.A  = csp->get_frequencies('A'); 
     367                        data.amount.C  = csp->get_frequencies('C'); 
     368                        data.amount.G  = csp->get_frequencies('G'); 
     369                        data.amount.TU = csp->get_frequencies('U'); 
     370                        break; 
     371                    } 
     372                    case PT_RATE: 
     373                        stat_type = STAT_SIMPLE_FLOAT; 
     374                        data.floatVals = csp->get_rates(); 
     375                        break; 
     376 
     377                    case PT_TT_RATIO: 
     378                        stat_type = STAT_SIMPLE_FLOAT; 
     379                        data.floatVals = csp->get_ttratio(); 
     380                        break; 
     381 
     382                    case PT_HELIX:  { 
     383                        stat_type = STAT_SIMPLE_BOOL; 
     384                        data.boolVals  = csp->get_is_helix(); 
     385                        break; 
     386                    } 
     387                    case PT_MOST_FREQUENT_BASE: 
     388                    case PT_SECOND_FREQUENT_BASE: 
     389                    case PT_THIRD_FREQUENT_BASE: 
     390                    case PT_LEAST_FREQUENT_BASE:  { 
     391                        stat_type   = STAT_SORT; 
     392                        data.sorted = new SortedFreq(csp); 
     393                        break; 
     394                    } 
     395                    case PT_PLOT_TYPES: 
     396                    case PT_UNKNOWN: 
     397                        error = "Please select what to plot"; 
     398                        break; 
     399                } 
     400 
     401                const GB_UINT4 *weights = csp->get_weights(); 
     402 
     403                if (!error) { 
     404                    for (size_t j=0; j<csplen; ++j) { 
     405                        if (!weights[j]) continue; 
     406                        fprintf(out,"%i ",j); // print X coordinate 
     407 
     408                        double val; 
     409                        switch (stat_type) { 
     410                            case STAT_AMOUNT:  { 
     411                                float A  = data.amount.A[j]; 
     412                                float C  = data.amount.C[j]; 
     413                                float G  = data.amount.G[j]; 
     414                                float TU = data.amount.TU[j]; 
     415                             
     416                                float amount = A+C+G+TU; 
     417 
     418                                switch (plot_type) { 
     419                                    case PT_GC_RATIO: val = (G+C)/amount; break; 
     420                                    case PT_GA_RATIO: val = (G+A)/amount; break; 
     421                                    case PT_BASE_A:   val = A/amount; break; 
     422                                    case PT_BASE_C:   val = C/amount; break; 
     423                                    case PT_BASE_G:   val = G/amount; break; 
     424                                    case PT_BASE_TU:  val = TU/amount; break; 
     425                                     
     426                                    default: nt_assert(0); break; 
    301427                                } 
     428                                break; 
    302429                            } 
     430                            case STAT_SIMPLE_FLOAT: val = data.floatVals[j]; break; 
     431                            case STAT_SIMPLE_BOOL:  val = data.boolVals[j]; break; 
     432                            case STAT_SORT:         val = data.sorted->get(plot_type, j); break; 
     433                             
     434                            case STAT_UNKNOWN: nt_assert(0); break; 
    303435                        } 
    304                     } 
    305                 } 
    306  
    307                 PlotType plot_type = string2PlotType(type); 
    308                 nt_assert(plot_type != PT_UNKNOWN); // 'type' is not a PlotType 
    309  
    310                 for (j=0;j<csp->seq_len; j++) { 
    311                     if (!csp->weights[j]) continue; 
    312                     fprintf(out,"%i ",j); 
    313  
    314                     double amount = 
    315                         csp->frequency[(unsigned char)'A'][j] + csp->frequency[(unsigned char)'C'][j] + 
    316                         csp->frequency[(unsigned char)'G'][j] + csp->frequency[(unsigned char)'U'][j] ; 
    317  
    318                     switch (plot_type) { 
    319                         case PT_GC_RATIO: 
    320                             val = ( csp->frequency[(unsigned char)'G'][j] + csp->frequency[(unsigned char)'C'][j] ) / amount; 
    321                             break; 
    322                         case PT_GA_RATIO: 
    323                             val = ( csp->frequency[(unsigned char)'G'][j] + csp->frequency[(unsigned char)'A'][j] ) / amount; 
    324                             break; 
    325  
    326                         case PT_BASE_A: val  = csp->frequency[(unsigned char)'A'][j] / amount; break; 
    327                         case PT_BASE_C: val  = csp->frequency[(unsigned char)'C'][j] / amount; break; 
    328                         case PT_BASE_G: val  = csp->frequency[(unsigned char)'G'][j] / amount; break; 
    329                         case PT_BASE_TU: val = csp->frequency[(unsigned char)'U'][j] / amount; break; 
    330  
    331                         case PT_RATE:                   val = csp->rates[j]; break; 
    332                         case PT_TT_RATIO:               val = csp->ttratio[j]; break; 
    333                         case PT_HELIX:                  val = csp->is_helix[j]; break; 
    334  
    335                         case PT_MOST_FREQUENT_BASE:     val = f[3][j]; break; 
    336                         case PT_SECOND_FREQUENT_BASE:   val = f[2][j]; break; 
    337                         case PT_THIRD_FREQUENT_BASE:    val = f[1][j]; break; 
    338                         case PT_LEAST_FREQUENT_BASE:    val = f[0][j]; break; 
    339                         default:  { 
    340                             nt_assert(0); // unknown calculation requested.. 
    341                             val = 0; 
    342                         } 
    343                     } 
    344                     smoothed = val/smooth + smoothed *(smooth-1)/(smooth); 
    345                     fprintf(out,"%f\n",smoothed); 
    346                 } 
    347  
     436 
     437                        double smoothed = val/smooth + smoothed *(smooth-1)/(smooth); 
     438                        fprintf(out,"%f\n",smoothed); // print Y coordinate 
     439                    } 
     440                } 
     441 
     442                if (stat_type == STAT_SORT) delete data.sorted; 
    348443                free(type); 
    349444                fclose(out); 
    350445                out = 0; 
    351446            } 
    352              
     447 
    353448            if (!error) { 
    354449                aww->get_root()->awar(AP_AWAR_CSP_DIRECTORY)->touch(); // reload file selection box 
     
    380475 
    381476                        fprintf(out, "%s \"%s\" %s title \"%s\"\n", plot_command[int(plotted)], fname, smooth, makeTitle(fname)); 
    382                         fprintf(out, "pause -1 \"Press RETURN to close gnuplot\"\n"); 
     477                        fprintf(out, "pause mouse any \"Any key or button will terminate gnuplot\"\n"); 
    383478                        fclose(out); 
    384479                        out = 0; 
     
    499594    return (AW_window *)aws; 
    500595} 
     596 
     597 
  • trunk/NTREE/AP_pos_var_pars.cxx

    r5825 r6280  
    1 #include <stdlib.h> 
    2 #include <stdio.h> 
    3 #include <ctype.h> 
    4 #include <string.h> 
    5 // #include <malloc.h> 
    6 #include <memory.h> 
    7 #include <math.h> 
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10 #include <aw_root.hxx> 
    11 #include <aw_device.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_pos_var_pars.cxx                               // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "ap_pos_var_pars.hxx" 
     12 
     13#include <AP_pro_a_nucs.hxx> 
     14#include <awt_sel_boxes.hxx> 
    1215#include <aw_window.hxx> 
    13 #include <awt.hxx> 
    14 #include <awt_tree.hxx> 
    15 #include <awt_sel_boxes.hxx> 
    16  
    17 #include "ap_pos_var_pars.hxx" 
     16 
     17#include <cctype> 
    1818 
    1919#define ap_assert(cond) arb_assert(cond) 
  • trunk/NTREE/Makefile

    r6277 r6280  
    33.SUFFIXES: .o .cxx .depend 
    44 
    5  
     5#                         Note: NT_cb.o should be first object (needed by 'proto') 
    66CPP_OBJECTS = \ 
     7        NT_cb.o \ 
    78        AP_consensus.o \ 
    89        AP_conservProfile2Gnuplot.o \ 
     
    1011        AP_csp_2_gnuplot.o \ 
    1112        AP_pos_var_pars.o \ 
    12         NT_cb.o \ 
    1313        NT_concatenate.o \ 
    1414        NT_dbrepair.o \ 
     
    2424        NT_validNameParser.o \ 
    2525        NT_validNames.o \ 
     26        NT_tree_cmp.o \ 
    2627        ad_ali.o \ 
    2728        ad_ext.o \ 
     
    4041 
    4142proto: 
    42         ../MAKEBIN/aisc_mkpt -A -E -g -F NT_,AP_ -w nt_internal.h $(CPP_SOURCES) >nt_internal.h.tmp 
     43        ../MAKEBIN/aisc_mkpt -P -A -E -g -F NT_,AP_ -w nt_internal.h $(CPP_SOURCES) >nt_internal.h.tmp 
    4344        ../SOURCE_TOOLS/mv_if_diff nt_internal.h.tmp nt_internal.h 
    44         ../MAKEBIN/aisc_mkpt -A -E -g -w nt_cb.hxx NT_cb.cxx NT_extern.cxx >nt_cb.hxx.tmp 
     45        ../MAKEBIN/aisc_mkpt -P -A -E -g -w nt_cb.hxx NT_cb.cxx NT_extern.cxx >nt_cb.hxx.tmp 
    4546        ../SOURCE_TOOLS/mv_if_diff nt_cb.hxx.tmp nt_cb.hxx 
    4647 
     
    6364# DO NOT DELETE THIS LINE -- make depend depends on it. 
    6465 
    65 # Do not add dependencies manually - use 'make depend' in $ARBHOME 
    66 # For formatting issues see SOURCE_TOOLS/fix_depends.pl 
    67  
    68 ad_ali.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    69 ad_ali.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    70 ad_ali.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    71 ad_ali.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    72 ad_ali.o: $(ARBHOME)/INCLUDE/arb_error.h 
    73 ad_ali.o: $(ARBHOME)/INCLUDE/arbdb.h 
    74 ad_ali.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    75 ad_ali.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    76 ad_ali.o: $(ARBHOME)/INCLUDE/arbtools.h 
    77 ad_ali.o: $(ARBHOME)/INCLUDE/attributes.h 
    78 ad_ali.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    79 ad_ali.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    80 ad_ali.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    81 ad_ali.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    82 ad_ali.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    83 ad_ali.o: $(ARBHOME)/INCLUDE/awt.hxx 
    84 ad_ali.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    85 ad_ali.o: $(ARBHOME)/INCLUDE/smartptr.h 
    86  
    87 ad_ext.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    88 ad_ext.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    89 ad_ext.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    90 ad_ext.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    91 ad_ext.o: $(ARBHOME)/INCLUDE/arb_error.h 
    92 ad_ext.o: $(ARBHOME)/INCLUDE/arbdb.h 
    93 ad_ext.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    94 ad_ext.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    95 ad_ext.o: $(ARBHOME)/INCLUDE/arbtools.h 
    96 ad_ext.o: $(ARBHOME)/INCLUDE/attributes.h 
    97 ad_ext.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    98 ad_ext.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    99 ad_ext.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    100 ad_ext.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    101 ad_ext.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    102 ad_ext.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    103 ad_ext.o: $(ARBHOME)/INCLUDE/awt.hxx 
    104 ad_ext.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    105 ad_ext.o: $(ARBHOME)/INCLUDE/db_scanner.hxx 
    106 ad_ext.o: $(ARBHOME)/INCLUDE/smartptr.h 
    107  
    108 ad_spec.o: ad_spec.hxx 
     66NT_cb.o: nt_internal.h 
     67NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     68NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     69NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     70NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     71NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     72NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     73NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     74NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     75NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     76NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     77NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     78NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h nt_cb.hxx 
     79NT_cb.o: ntree.hxx 
     80NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     81NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     82NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     83NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     84NT_cb.o: ad_trees.hxx 
     85NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_canvas.hxx 
     86NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     87NT_cb.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     88 
     89AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     90AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     91AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     92AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     93AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     94AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     95AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     96AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     97AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     98AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     99AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     100AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     101AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     102AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     103AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     104AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     105AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     106AP_consensus.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     107 
     108AP_conservProfile2Gnuplot.o: nt_internal.h 
     109AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     110AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     111AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     112AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     113AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     114AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     115AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     116AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     117AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     118AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     119AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     120AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     121AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     122AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     123AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     124AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     125AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     126AP_conservProfile2Gnuplot.o: ap_conservProfile2Gnuplot.hxx 
     127AP_conservProfile2Gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
     128 
     129AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     130AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     131AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     132AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     133AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     134AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     135AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     136AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     137AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     138AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     139AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     140AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     141AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     142AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     143AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     144AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     145AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     146AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
     147AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     148AP_cprofile.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     149 
     150AP_csp_2_gnuplot.o: nt_internal.h 
     151AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     152AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     153AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     154AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     155AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     156AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     157AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     158AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     159AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     160AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     161AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     162AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     163AP_csp_2_gnuplot.o: ap_csp_2_gnuplot.hxx 
     164AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_filter.hxx 
     165AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     166AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     167AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     168AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     169AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     170AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_csp.hxx 
     171AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_filter.hxx 
     172AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
     173AP_csp_2_gnuplot.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     174 
     175AP_pos_var_pars.o: ap_pos_var_pars.hxx 
     176AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     177AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     178AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     179AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     180AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     181AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     182AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     183AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     184AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_pro_a_nucs.hxx 
     185AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     186AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     187AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     188AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     189AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     190AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     191AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     192AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     193AP_pos_var_pars.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     194 
     195NT_concatenate.o: nt_internal.h 
     196NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     197NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     198NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     199NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     200NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     201NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     202NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     203NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     204NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     205NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     206NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     207NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     208NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     209NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     210NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     211NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     212NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     213NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_item_sel_list.hxx 
     214NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     215NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AW_rename.hxx 
     216NT_concatenate.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_question.hxx 
     217 
     218NT_dbrepair.o: NT_dbrepair.hxx 
     219NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     220NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     221NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     222NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     223NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     224NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     225NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     226NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     227NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     228NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     229NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     230NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     231NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     232NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     233NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     234NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     235NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/adGene.h 
     236NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     237NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/GEN.hxx 
     238NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/EXP.hxx 
     239NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_color_groups.hxx 
     240NT_dbrepair.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/inline.h 
     241 
     242NT_edconf.o: nt_cb.hxx 
     243NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     244NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     245NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     246NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     247NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     248NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     249NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     250NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     251NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     252NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     253NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     254NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     255NT_edconf.o: nt_internal.h 
     256NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     257NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     258NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     259NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     260NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     261NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     262NT_edconf.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_config.h 
     263 
     264NT_extern.o: nt_internal.h 
     265NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     266NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     267NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     268NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     269NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     270NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     271NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     272NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     273NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     274NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     275NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     276NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     277NT_extern.o: ntree.hxx 
     278NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     279NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     280NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     281NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     282NT_extern.o: ad_spec.hxx 
     283NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     284NT_extern.o: ad_trees.hxx ap_consensus.hxx 
     285NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/seq_quality.h 
     286NT_extern.o: nt_join.hxx 
     287NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/st_window.hxx 
     288NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/GEN.hxx 
     289NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/adGene.h 
     290NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/EXP.hxx 
     291NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/TreeCallbacks.hxx 
     292NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/TreeDisplay.hxx 
     293NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_Tree.hxx 
     294NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ARB_Tree.hxx 
     295NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AliView.hxx 
     296NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_sequence.hxx 
     297NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_color_groups.hxx 
     298NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/downcast.h 
     299NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_canvas.hxx 
     300NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AW_rename.hxx 
     301NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/probe_design.hxx 
     302NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/primer_design.hxx 
     303NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/gde.hxx 
     304NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awtc_submission.hxx 
     305NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awti_export.hxx 
     306NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_preset.hxx 
     307NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_macro.hxx 
     308NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_advice.hxx 
     309NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_config_manager.hxx 
     310NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_input_mask.hxx 
     311NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     312NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_www.hxx 
     313NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_nds.hxx 
     314NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_preset.hxx 
     315NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
     316NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     317NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_version.h 
     318NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_build.h 
     319NT_extern.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/svn_revision.h 
     320 
     321NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     322NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     323NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     324NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     325NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     326NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     327NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     328NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     329NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     330NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     331NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     332NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     333NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     334NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     335NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     336NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     337NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awti_import.hxx 
     338NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_canvas.hxx 
     339NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/mg_merge.hxx 
     340NT_import.o: nt_internal.h ad_spec.hxx 
     341NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     342NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/GEN.hxx 
     343NT_import.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/adGene.h 
     344 
     345NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     346NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     347NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     348NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     349NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     350NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     351NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     352NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     353NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     354NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     355NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     356NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     357NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     358NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     359NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     360NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     361NT_ins_col.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     362 
     363NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     364NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     365NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     366NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     367NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     368NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     369NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     370NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     371NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     372NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     373NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     374NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     375NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     376NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     377NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     378NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     379NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     380NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     381NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_item_sel_list.hxx 
     382NT_join.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     383 
     384NT_main.o: nt_internal.h 
     385NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     386NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     387NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     388NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     389NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     390NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     391NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     392NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     393NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     394NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     395NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     396NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     397NT_main.o: ntree.hxx 
     398NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     399NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     400NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     401NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     402NT_main.o: nt_cb.hxx 
     403NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/mg_merge.hxx 
     404NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awti_import.hxx 
     405NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_advice.hxx 
     406NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     407NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
     408NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_question.hxx 
     409NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     410NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/adGene.h 
     411NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_version.h 
     412NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_build.h 
     413NT_main.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/svn_revision.h 
     414 
     415NT_trackAliChanges.o: NT_trackAliChanges.h 
     416NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     417NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     418NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     419NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     420NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     421NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     422NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     423NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     424NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     425NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     426NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     427NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     428NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     429NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     430NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     431NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     432NT_trackAliChanges.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     433 
     434NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     435NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     436NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     437NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     438NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     439NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     440NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     441NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     442NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     443NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     444NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     445NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     446NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     447NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     448NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     449NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     450NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     451NT_validManual.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     452 
     453NT_validNameParser.o: nt_validNameParser.hxx 
     454 
     455NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     456NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     457NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     458NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     459NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     460NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     461NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     462NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     463NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     464NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     465NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     466NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     467NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     468NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     469NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     470NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     471NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     472NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     473NT_validNames.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_www.hxx 
     474NT_validNames.o: nt_validNameParser.hxx 
     475 
     476NT_tree_cmp.o: nt_tree_cmp.hxx 
     477NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     478NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     479NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     480NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     481NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     482NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     483NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     484NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     485NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_Tree.hxx 
     486NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ARB_Tree.hxx 
     487NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AliView.hxx 
     488NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_sequence.hxx 
     489NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_color_groups.hxx 
     490NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     491NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     492NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     493NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     494NT_tree_cmp.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/downcast.h 
     495 
     496ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     497ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     498ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     499ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     500ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     501ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     502ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     503ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     504ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     505ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     506ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     507ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     508ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     509ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     510ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     511ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     512ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     513ad_ali.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     514 
     515ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     516ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     517ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     518ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     519ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     520ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     521ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     522ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     523ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     524ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     525ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     526ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     527ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     528ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     529ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     530ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     531ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     532ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     533ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     534ad_ext.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/db_scanner.hxx 
     535 
     536ad_spec.o: ad_spec.hxx /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     537ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     538ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     539ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     540ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     541ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     542ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     543ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     544ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     545ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     546ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     547ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     548ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     549ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     550ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
    109551ad_spec.o: nt_internal.h 
     552ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     553ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
    110554ad_spec.o: ntree.hxx 
    111 ad_spec.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    112 ad_spec.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    113 ad_spec.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    114 ad_spec.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    115 ad_spec.o: $(ARBHOME)/INCLUDE/arb_error.h 
    116 ad_spec.o: $(ARBHOME)/INCLUDE/arbdb.h 
    117 ad_spec.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    118 ad_spec.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    119 ad_spec.o: $(ARBHOME)/INCLUDE/arbtools.h 
    120 ad_spec.o: $(ARBHOME)/INCLUDE/attributes.h 
    121 ad_spec.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    122 ad_spec.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    123 ad_spec.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    124 ad_spec.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    125 ad_spec.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    126 ad_spec.o: $(ARBHOME)/INCLUDE/AW_rename.hxx 
    127 ad_spec.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    128 ad_spec.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    129 ad_spec.o: $(ARBHOME)/INCLUDE/awt.hxx 
    130 ad_spec.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    131 ad_spec.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    132 ad_spec.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    133 ad_spec.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    134 ad_spec.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    135 ad_spec.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    136 ad_spec.o: $(ARBHOME)/INCLUDE/awt_www.hxx 
    137 ad_spec.o: $(ARBHOME)/INCLUDE/awtc_next_neighbours.hxx 
    138 ad_spec.o: $(ARBHOME)/INCLUDE/awtlocal.hxx 
    139 ad_spec.o: $(ARBHOME)/INCLUDE/db_scanner.hxx 
    140 ad_spec.o: $(ARBHOME)/INCLUDE/probe_design.hxx 
    141 ad_spec.o: $(ARBHOME)/INCLUDE/smartptr.h 
    142  
    143 ad_transpro.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    144 ad_transpro.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    145 ad_transpro.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    146 ad_transpro.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    147 ad_transpro.o: $(ARBHOME)/INCLUDE/arb_error.h 
    148 ad_transpro.o: $(ARBHOME)/INCLUDE/arbdb.h 
    149 ad_transpro.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    150 ad_transpro.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    151 ad_transpro.o: $(ARBHOME)/INCLUDE/arbtools.h 
    152 ad_transpro.o: $(ARBHOME)/INCLUDE/attributes.h 
    153 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    154 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    155 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    156 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    157 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    158 ad_transpro.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    159 ad_transpro.o: $(ARBHOME)/INCLUDE/awt.hxx 
    160 ad_transpro.o: $(ARBHOME)/INCLUDE/awt_codon_table.hxx 
    161 ad_transpro.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    162 ad_transpro.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    163 ad_transpro.o: $(ARBHOME)/INCLUDE/awt_translate.hxx 
    164 ad_transpro.o: $(ARBHOME)/INCLUDE/smartptr.h 
     555ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awtc_next_neighbours.hxx 
     556ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AW_rename.hxx 
     557ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/db_scanner.hxx 
     558ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_item_sel_list.hxx 
     559ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awtlocal.hxx 
     560ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_www.hxx 
     561ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_canvas.hxx 
     562ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     563ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     564ad_spec.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/probe_design.hxx 
     565 
     566ad_transpro.o: nt_internal.h 
     567ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     568ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     569ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     570ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     571ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     572ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     573ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     574ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     575ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     576ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     577ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     578ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     579ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     580ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/Translate.hxx 
     581ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_codon_table.hxx 
     582ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     583ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     584ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     585ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     586ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     587ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/AP_pro_a_nucs.hxx 
     588ad_transpro.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
    165589 
    166590ad_trees.o: ad_trees.hxx 
    167 ad_trees.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    168 ad_trees.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    169 ad_trees.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    170 ad_trees.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    171 ad_trees.o: $(ARBHOME)/INCLUDE/arb_error.h 
    172 ad_trees.o: $(ARBHOME)/INCLUDE/arbdb.h 
    173 ad_trees.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    174 ad_trees.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    175 ad_trees.o: $(ARBHOME)/INCLUDE/arbtools.h 
    176 ad_trees.o: $(ARBHOME)/INCLUDE/attributes.h 
    177 ad_trees.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    178 ad_trees.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    179 ad_trees.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    180 ad_trees.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    181 ad_trees.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    182 ad_trees.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    183 ad_trees.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    184 ad_trees.o: $(ARBHOME)/INCLUDE/awt.hxx 
    185 ad_trees.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    186 ad_trees.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    187 ad_trees.o: $(ARBHOME)/INCLUDE/awt_tree_cmp.hxx 
    188 ad_trees.o: $(ARBHOME)/INCLUDE/smartptr.h 
    189 ad_trees.o: $(ARBHOME)/INCLUDE/TreeRead.h 
    190 ad_trees.o: $(ARBHOME)/INCLUDE/TreeWrite.h 
    191  
    192 AP_consensus.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    193 AP_consensus.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    194 AP_consensus.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    195 AP_consensus.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    196 AP_consensus.o: $(ARBHOME)/INCLUDE/arb_error.h 
    197 AP_consensus.o: $(ARBHOME)/INCLUDE/arbdb.h 
    198 AP_consensus.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    199 AP_consensus.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    200 AP_consensus.o: $(ARBHOME)/INCLUDE/arbtools.h 
    201 AP_consensus.o: $(ARBHOME)/INCLUDE/attributes.h 
    202 AP_consensus.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    203 AP_consensus.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    204 AP_consensus.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    205 AP_consensus.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    206 AP_consensus.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    207 AP_consensus.o: $(ARBHOME)/INCLUDE/awt.hxx 
    208 AP_consensus.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    209 AP_consensus.o: $(ARBHOME)/INCLUDE/smartptr.h 
    210  
    211 AP_conservProfile2Gnuplot.o: ap_conservProfile2Gnuplot.hxx 
    212 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    213 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    214 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    215 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    216 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arb_error.h 
    217 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arbdb.h 
    218 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    219 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    220 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/arbtools.h 
    221 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/attributes.h 
    222 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    223 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    224 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    225 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    226 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    227 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    228 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    229 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    230 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/awt.hxx 
    231 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    232 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    233 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    234 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    235 AP_conservProfile2Gnuplot.o: $(ARBHOME)/INCLUDE/smartptr.h 
    236  
    237 AP_cprofile.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    238 AP_cprofile.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    239 AP_cprofile.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    240 AP_cprofile.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    241 AP_cprofile.o: $(ARBHOME)/INCLUDE/arb_error.h 
    242 AP_cprofile.o: $(ARBHOME)/INCLUDE/arbdb.h 
    243 AP_cprofile.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    244 AP_cprofile.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    245 AP_cprofile.o: $(ARBHOME)/INCLUDE/arbtools.h 
    246 AP_cprofile.o: $(ARBHOME)/INCLUDE/attributes.h 
    247 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    248 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    249 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    250 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    251 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    252 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    253 AP_cprofile.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    254 AP_cprofile.o: $(ARBHOME)/INCLUDE/awt.hxx 
    255 AP_cprofile.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    256 AP_cprofile.o: $(ARBHOME)/INCLUDE/smartptr.h 
    257  
    258 AP_csp_2_gnuplot.o: ap_csp_2_gnuplot.hxx 
    259 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    260 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    261 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    262 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    263 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arb_error.h 
    264 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arbdb.h 
    265 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    266 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    267 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/arbtools.h 
    268 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/attributes.h 
    269 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    270 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    271 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    272 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    273 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    274 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    275 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    276 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    277 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/awt.hxx 
    278 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    279 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    280 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    281 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    282 AP_csp_2_gnuplot.o: $(ARBHOME)/INCLUDE/smartptr.h 
    283  
    284 AP_pos_var_pars.o: ap_pos_var_pars.hxx 
    285 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    286 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    287 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    288 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    289 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arb_error.h 
    290 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arbdb.h 
    291 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    292 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    293 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/arbtools.h 
    294 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/attributes.h 
    295 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    296 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    297 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    298 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    299 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    300 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    301 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/awt.hxx 
    302 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    303 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    304 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    305 AP_pos_var_pars.o: $(ARBHOME)/INCLUDE/smartptr.h 
    306  
    307 NT_cb.o: ad_trees.hxx 
    308 NT_cb.o: nt_cb.hxx 
    309 NT_cb.o: nt_internal.h 
    310 NT_cb.o: ntree.hxx 
    311 NT_cb.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    312 NT_cb.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    313 NT_cb.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    314 NT_cb.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    315 NT_cb.o: $(ARBHOME)/INCLUDE/arb_error.h 
    316 NT_cb.o: $(ARBHOME)/INCLUDE/arbdb.h 
    317 NT_cb.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    318 NT_cb.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    319 NT_cb.o: $(ARBHOME)/INCLUDE/arbtools.h 
    320 NT_cb.o: $(ARBHOME)/INCLUDE/attributes.h 
    321 NT_cb.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    322 NT_cb.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    323 NT_cb.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    324 NT_cb.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    325 NT_cb.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    326 NT_cb.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    327 NT_cb.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    328 NT_cb.o: $(ARBHOME)/INCLUDE/awt.hxx 
    329 NT_cb.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    330 NT_cb.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    331 NT_cb.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    332 NT_cb.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    333 NT_cb.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    334 NT_cb.o: $(ARBHOME)/INCLUDE/smartptr.h 
    335  
    336 NT_concatenate.o: nt_internal.h 
    337 NT_concatenate.o: nt_sort.hxx 
    338 NT_concatenate.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    339 NT_concatenate.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    340 NT_concatenate.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    341 NT_concatenate.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    342 NT_concatenate.o: $(ARBHOME)/INCLUDE/arb_error.h 
    343 NT_concatenate.o: $(ARBHOME)/INCLUDE/arbdb.h 
    344 NT_concatenate.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    345 NT_concatenate.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    346 NT_concatenate.o: $(ARBHOME)/INCLUDE/arbtools.h 
    347 NT_concatenate.o: $(ARBHOME)/INCLUDE/attributes.h 
    348 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    349 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    350 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    351 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    352 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    353 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_question.hxx 
    354 NT_concatenate.o: $(ARBHOME)/INCLUDE/AW_rename.hxx 
    355 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    356 NT_concatenate.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    357 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt.hxx 
    358 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    359 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    360 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    361 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    362 NT_concatenate.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    363 NT_concatenate.o: $(ARBHOME)/INCLUDE/awtlocal.hxx 
    364 NT_concatenate.o: $(ARBHOME)/INCLUDE/smartptr.h 
    365  
    366 NT_dbrepair.o: NT_dbrepair.hxx 
    367 NT_dbrepair.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    368 NT_dbrepair.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    369 NT_dbrepair.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    370 NT_dbrepair.o: $(ARBHOME)/INCLUDE/adGene.h 
    371 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    372 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arb_error.h 
    373 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arbdb.h 
    374 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    375 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    376 NT_dbrepair.o: $(ARBHOME)/INCLUDE/arbtools.h 
    377 NT_dbrepair.o: $(ARBHOME)/INCLUDE/attributes.h 
    378 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    379 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    380 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    381 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    382 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    383 NT_dbrepair.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    384 NT_dbrepair.o: $(ARBHOME)/INCLUDE/awt.hxx 
    385 NT_dbrepair.o: $(ARBHOME)/INCLUDE/EXP.hxx 
    386 NT_dbrepair.o: $(ARBHOME)/INCLUDE/GEN.hxx 
    387 NT_dbrepair.o: $(ARBHOME)/INCLUDE/inline.h 
    388 NT_dbrepair.o: $(ARBHOME)/INCLUDE/smartptr.h 
    389  
    390 NT_edconf.o: nt_edconf.hxx 
    391 NT_edconf.o: $(ARBHOME)/INCLUDE/ad_config.h 
    392 NT_edconf.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    393 NT_edconf.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    394 NT_edconf.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    395 NT_edconf.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    396 NT_edconf.o: $(ARBHOME)/INCLUDE/arb_error.h 
    397 NT_edconf.o: $(ARBHOME)/INCLUDE/arbdb.h 
    398 NT_edconf.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    399 NT_edconf.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    400 NT_edconf.o: $(ARBHOME)/INCLUDE/arbtools.h 
    401 NT_edconf.o: $(ARBHOME)/INCLUDE/attributes.h 
    402 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    403 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    404 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    405 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    406 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    407 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    408 NT_edconf.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    409 NT_edconf.o: $(ARBHOME)/INCLUDE/awt.hxx 
    410 NT_edconf.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    411 NT_edconf.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    412 NT_edconf.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    413 NT_edconf.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    414 NT_edconf.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    415 NT_edconf.o: $(ARBHOME)/INCLUDE/smartptr.h 
    416  
    417 NT_extern.o: ad_spec.hxx 
    418 NT_extern.o: ad_trees.hxx 
    419 NT_extern.o: ap_consensus.hxx 
    420 NT_extern.o: ap_conservProfile2Gnuplot.hxx 
    421 NT_extern.o: ap_csp_2_gnuplot.hxx 
    422 NT_extern.o: ap_pos_var_pars.hxx 
    423 NT_extern.o: nt_cb.hxx 
    424 NT_extern.o: NT_dbrepair.hxx 
    425 NT_extern.o: nt_edconf.hxx 
    426 NT_extern.o: nt_internal.h 
    427 NT_extern.o: nt_join.hxx 
    428 NT_extern.o: nt_sort.hxx 
    429 NT_extern.o: NT_trackAliChanges.h 
    430 NT_extern.o: ntree.hxx 
    431 NT_extern.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    432 NT_extern.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    433 NT_extern.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    434 NT_extern.o: $(ARBHOME)/INCLUDE/adGene.h 
    435 NT_extern.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    436 NT_extern.o: $(ARBHOME)/INCLUDE/arb_build.h 
    437 NT_extern.o: $(ARBHOME)/INCLUDE/arb_error.h 
    438 NT_extern.o: $(ARBHOME)/INCLUDE/arb_version.h 
    439 NT_extern.o: $(ARBHOME)/INCLUDE/arbdb.h 
    440 NT_extern.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    441 NT_extern.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    442 NT_extern.o: $(ARBHOME)/INCLUDE/arbtools.h 
    443 NT_extern.o: $(ARBHOME)/INCLUDE/attributes.h 
    444 NT_extern.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    445 NT_extern.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    446 NT_extern.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    447 NT_extern.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    448 NT_extern.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    449 NT_extern.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    450 NT_extern.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    451 NT_extern.o: $(ARBHOME)/INCLUDE/AW_rename.hxx 
    452 NT_extern.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    453 NT_extern.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    454 NT_extern.o: $(ARBHOME)/INCLUDE/awt.hxx 
    455 NT_extern.o: $(ARBHOME)/INCLUDE/awt_advice.hxx 
    456 NT_extern.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    457 NT_extern.o: $(ARBHOME)/INCLUDE/awt_config_manager.hxx 
    458 NT_extern.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    459 NT_extern.o: $(ARBHOME)/INCLUDE/awt_input_mask.hxx 
    460 NT_extern.o: $(ARBHOME)/INCLUDE/awt_macro.hxx 
    461 NT_extern.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    462 NT_extern.o: $(ARBHOME)/INCLUDE/awt_preset.hxx 
    463 NT_extern.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    464 NT_extern.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    465 NT_extern.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    466 NT_extern.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
    467 NT_extern.o: $(ARBHOME)/INCLUDE/awt_www.hxx 
    468 NT_extern.o: $(ARBHOME)/INCLUDE/awtc_submission.hxx 
    469 NT_extern.o: $(ARBHOME)/INCLUDE/awti_export.hxx 
    470 NT_extern.o: $(ARBHOME)/INCLUDE/EXP.hxx 
    471 NT_extern.o: $(ARBHOME)/INCLUDE/gde.hxx 
    472 NT_extern.o: $(ARBHOME)/INCLUDE/GEN.hxx 
    473 NT_extern.o: $(ARBHOME)/INCLUDE/primer_design.hxx 
    474 NT_extern.o: $(ARBHOME)/INCLUDE/probe_design.hxx 
    475 NT_extern.o: $(ARBHOME)/INCLUDE/seq_quality.h 
    476 NT_extern.o: $(ARBHOME)/INCLUDE/smartptr.h 
    477 NT_extern.o: $(ARBHOME)/INCLUDE/st_window.hxx 
    478 NT_extern.o: $(ARBHOME)/INCLUDE/svn_revision.h 
    479  
    480 NT_import.o: ad_spec.hxx 
    481 NT_import.o: nt_internal.h 
    482 NT_import.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    483 NT_import.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    484 NT_import.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    485 NT_import.o: $(ARBHOME)/INCLUDE/adGene.h 
    486 NT_import.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    487 NT_import.o: $(ARBHOME)/INCLUDE/arb_error.h 
    488 NT_import.o: $(ARBHOME)/INCLUDE/arbdb.h 
    489 NT_import.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    490 NT_import.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    491 NT_import.o: $(ARBHOME)/INCLUDE/arbtools.h 
    492 NT_import.o: $(ARBHOME)/INCLUDE/attributes.h 
    493 NT_import.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    494 NT_import.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    495 NT_import.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    496 NT_import.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    497 NT_import.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    498 NT_import.o: $(ARBHOME)/INCLUDE/awt.hxx 
    499 NT_import.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    500 NT_import.o: $(ARBHOME)/INCLUDE/awti_import.hxx 
    501 NT_import.o: $(ARBHOME)/INCLUDE/GEN.hxx 
    502 NT_import.o: $(ARBHOME)/INCLUDE/mg_merge.hxx 
    503 NT_import.o: $(ARBHOME)/INCLUDE/smartptr.h 
    504  
    505 NT_ins_col.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    506 NT_ins_col.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    507 NT_ins_col.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    508 NT_ins_col.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    509 NT_ins_col.o: $(ARBHOME)/INCLUDE/arb_error.h 
    510 NT_ins_col.o: $(ARBHOME)/INCLUDE/arbdb.h 
    511 NT_ins_col.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    512 NT_ins_col.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    513 NT_ins_col.o: $(ARBHOME)/INCLUDE/arbtools.h 
    514 NT_ins_col.o: $(ARBHOME)/INCLUDE/attributes.h 
    515 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    516 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    517 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    518 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    519 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    520 NT_ins_col.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    521 NT_ins_col.o: $(ARBHOME)/INCLUDE/smartptr.h 
    522  
    523 NT_join.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    524 NT_join.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    525 NT_join.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    526 NT_join.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    527 NT_join.o: $(ARBHOME)/INCLUDE/arb_error.h 
    528 NT_join.o: $(ARBHOME)/INCLUDE/arbdb.h 
    529 NT_join.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    530 NT_join.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    531 NT_join.o: $(ARBHOME)/INCLUDE/arbtools.h 
    532 NT_join.o: $(ARBHOME)/INCLUDE/attributes.h 
    533 NT_join.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    534 NT_join.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    535 NT_join.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    536 NT_join.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    537 NT_join.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    538 NT_join.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    539 NT_join.o: $(ARBHOME)/INCLUDE/awt.hxx 
    540 NT_join.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    541 NT_join.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    542 NT_join.o: $(ARBHOME)/INCLUDE/smartptr.h 
    543  
    544 NT_main.o: nt_cb.hxx 
    545 NT_main.o: NT_dbrepair.hxx 
    546 NT_main.o: nt_internal.h 
    547 NT_main.o: ntree.hxx 
    548 NT_main.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    549 NT_main.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    550 NT_main.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    551 NT_main.o: $(ARBHOME)/INCLUDE/adGene.h 
    552 NT_main.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    553 NT_main.o: $(ARBHOME)/INCLUDE/arb_build.h 
    554 NT_main.o: $(ARBHOME)/INCLUDE/arb_error.h 
    555 NT_main.o: $(ARBHOME)/INCLUDE/arb_version.h 
    556 NT_main.o: $(ARBHOME)/INCLUDE/arbdb.h 
    557 NT_main.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    558 NT_main.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    559 NT_main.o: $(ARBHOME)/INCLUDE/arbtools.h 
    560 NT_main.o: $(ARBHOME)/INCLUDE/attributes.h 
    561 NT_main.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    562 NT_main.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    563 NT_main.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    564 NT_main.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
    565 NT_main.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    566 NT_main.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    567 NT_main.o: $(ARBHOME)/INCLUDE/aw_question.hxx 
    568 NT_main.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    569 NT_main.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    570 NT_main.o: $(ARBHOME)/INCLUDE/awt.hxx 
    571 NT_main.o: $(ARBHOME)/INCLUDE/awt_advice.hxx 
    572 NT_main.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    573 NT_main.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    574 NT_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    575 NT_main.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    576 NT_main.o: $(ARBHOME)/INCLUDE/awti_import.hxx 
    577 NT_main.o: $(ARBHOME)/INCLUDE/mg_merge.hxx 
    578 NT_main.o: $(ARBHOME)/INCLUDE/servercntrl.h 
    579 NT_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
    580 NT_main.o: $(ARBHOME)/INCLUDE/svn_revision.h 
    581  
    582 NT_sort.o: nt_sort.hxx 
    583 NT_sort.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    584 NT_sort.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    585 NT_sort.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    586 NT_sort.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    587 NT_sort.o: $(ARBHOME)/INCLUDE/arb_error.h 
    588 NT_sort.o: $(ARBHOME)/INCLUDE/arbdb.h 
    589 NT_sort.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    590 NT_sort.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    591 NT_sort.o: $(ARBHOME)/INCLUDE/arbtools.h 
    592 NT_sort.o: $(ARBHOME)/INCLUDE/attributes.h 
    593 NT_sort.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    594 NT_sort.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    595 NT_sort.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    596 NT_sort.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    597 NT_sort.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    598 NT_sort.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    599 NT_sort.o: $(ARBHOME)/INCLUDE/awt.hxx 
    600 NT_sort.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    601 NT_sort.o: $(ARBHOME)/INCLUDE/smartptr.h 
    602  
    603 NT_trackAliChanges.o: NT_trackAliChanges.h 
    604 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    605 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    606 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    607 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    608 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arb_error.h 
    609 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arbdb.h 
    610 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    611 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    612 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/arbtools.h 
    613 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/attributes.h 
    614 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    615 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    616 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    617 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    618 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    619 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/awt.hxx 
    620 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    621 NT_trackAliChanges.o: $(ARBHOME)/INCLUDE/smartptr.h 
    622  
    623 NT_validManual.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    624 NT_validManual.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    625 NT_validManual.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    626 NT_validManual.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    627 NT_validManual.o: $(ARBHOME)/INCLUDE/arb_error.h 
    628 NT_validManual.o: $(ARBHOME)/INCLUDE/arbdb.h 
    629 NT_validManual.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    630 NT_validManual.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    631 NT_validManual.o: $(ARBHOME)/INCLUDE/arbtools.h 
    632 NT_validManual.o: $(ARBHOME)/INCLUDE/attributes.h 
    633 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    634 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    635 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    636 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    637 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    638 NT_validManual.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    639 NT_validManual.o: $(ARBHOME)/INCLUDE/awt.hxx 
    640 NT_validManual.o: $(ARBHOME)/INCLUDE/smartptr.h 
    641  
    642 NT_validNameParser.o: nt_validNameParser.hxx 
    643  
    644 NT_validNames.o: nt_validNameParser.hxx 
    645 NT_validNames.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    646 NT_validNames.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    647 NT_validNames.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    648 NT_validNames.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    649 NT_validNames.o: $(ARBHOME)/INCLUDE/arb_error.h 
    650 NT_validNames.o: $(ARBHOME)/INCLUDE/arbdb.h 
    651 NT_validNames.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    652 NT_validNames.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    653 NT_validNames.o: $(ARBHOME)/INCLUDE/arbtools.h 
    654 NT_validNames.o: $(ARBHOME)/INCLUDE/attributes.h 
    655 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    656 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    657 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    658 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    659 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    660 NT_validNames.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    661 NT_validNames.o: $(ARBHOME)/INCLUDE/awt.hxx 
    662 NT_validNames.o: $(ARBHOME)/INCLUDE/awt_www.hxx 
    663 NT_validNames.o: $(ARBHOME)/INCLUDE/smartptr.h 
     591ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_root.hxx 
     592ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_assert.h 
     593ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb_base.h 
     594ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/attributes.h 
     595ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_k_prot.h 
     596ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbtools.h 
     597ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arb_error.h 
     598ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/smartptr.h 
     599ad_trees.o: nt_tree_cmp.hxx 
     600ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdbt.h 
     601ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/arbdb.h 
     602ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_prot.h 
     603ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/ad_t_prot.h 
     604ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/TreeRead.h 
     605ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/TreeWrite.h 
     606ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_sel_boxes.hxx 
     607ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt_nds.hxx 
     608ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/awt.hxx 
     609ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_window.hxx 
     610ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_device.hxx 
     611ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_position.hxx 
     612ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_keysym.hxx 
     613ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_awars.hxx 
     614ad_trees.o: /home/ralf/ARB-saphira/ARB.quickChange/INCLUDE/aw_global.hxx 
  • trunk/NTREE/NT_cb.cxx

    r5794 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : NT_cb.cxx                                         // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    310 
    4 #include <arbdb.h> 
    5 #include <arbdbt.h> 
    6  
    7 #include <aw_root.hxx> 
    8 #include <aw_device.hxx> 
    9 #include <aw_window.hxx> 
    10 #include <aw_awars.hxx> 
    11 #include <awt_canvas.hxx> 
    12 #include <awt.hxx> 
    13  
    14 #include <awt_tree.hxx> 
    15 #include <awt_dtree.hxx> 
    16 #include <awt_sel_boxes.hxx> 
    17 #include "ad_trees.hxx" 
    18 #include "ntree.hxx" 
    1911#include "nt_internal.h" 
    2012#include "nt_cb.hxx" 
     13#include "ntree.hxx" 
     14#include "ad_trees.hxx" 
    2115 
     16#include <awt_canvas.hxx> 
     17#include <awt_sel_boxes.hxx> 
     18#include <aw_awars.hxx> 
    2219 
    23 #define AWT_TREE(ntw) ((AWT_graphic_tree *)ntw->tree_disp) 
     20/*AISC_MKPT_PROMOTE:#ifndef ARBDBT_H*/ 
     21/*AISC_MKPT_PROMOTE:#include <arbdbt.h>*/ 
     22/*AISC_MKPT_PROMOTE:#endif*/ 
     23/*AISC_MKPT_PROMOTE:#ifndef AW_ROOT_HXX*/ 
     24/*AISC_MKPT_PROMOTE:#include <aw_root.hxx>*/ 
     25/*AISC_MKPT_PROMOTE:#endif*/ 
     26/*AISC_MKPT_PROMOTE:*/ 
     27/*AISC_MKPT_PROMOTE:class AW_window;*/ 
     28/*AISC_MKPT_PROMOTE:class AWT_canvas;*/ 
     29 
     30// #define AWT_TREE(ntw) ((AWT_graphic_tree *)ntw->tree_disp) 
     31#define AWT_TREE(ntw) DOWNCAST(AWT_graphic_tree *, (ntw)->tree_disp) 
    2432 
    2533void NT_delete_mark_all_cb(void *, AWT_canvas *ntw) { 
  • trunk/NTREE/NT_concatenate.cxx

    r6141 r6280  
    1111/*=======================================================================================*/ 
    1212 
    13 #include <stdio.h> 
    14 #include <stdlib.h> 
    15 #include <unistd.h> 
    16 #include <time.h> 
    17 #include <string.h> 
    18 #include <memory.h> 
    19 #include <iostream> 
    20  
    21 #include <arbdb.h> 
    22 #include <arbdbt.h> 
    23 #include <aw_root.hxx> 
    24 #include <aw_device.hxx> 
    25 #include <aw_window.hxx> 
    26 #include <aw_awars.hxx> 
     13#include "nt_internal.h" 
     14 
    2715#include <awt.hxx> 
    28 #include <AW_rename.hxx> 
    29 #include <awt_tree.hxx> 
    30 #include <awt_canvas.hxx> 
    3116#include <awt_item_sel_list.hxx> 
    3217#include <awt_sel_boxes.hxx> 
    33 #include "awtlocal.hxx" 
     18#include <AW_rename.hxx> 
    3419#include <aw_question.hxx> 
    35 #include "nt_internal.h" 
    36 #include <nt_sort.hxx>   // for sorting database entries 
    37  
    38 #ifndef ARB_ASSERT_H 
    39 #include <arb_assert.h> 
    40 #endif 
     20 
    4121#define nt_assert(bed) arb_assert(bed) 
    4222 
  • trunk/NTREE/NT_edconf.cxx

    r6158 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4  
    5 #include <arbdb.h> 
    6 #include <arbdbt.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : NT_edconf.cxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "nt_cb.hxx" 
     12#include "nt_internal.h" 
     13 
     14#include <awt_sel_boxes.hxx> 
     15#include <aw_window.hxx> 
     16#include <aw_awars.hxx> 
    717#include <ad_config.h> 
    8 #include <aw_awars.hxx> 
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12  
    13 #include "nt_edconf.hxx" 
    14  
    15 #include <awt.hxx> 
    16 #include <awt_canvas.hxx> 
    17 #include <awt_tree.hxx> 
    18 #include <awt_dtree.hxx> 
    19 #include <awt_sel_boxes.hxx> 
    20  
    21 #ifndef ARB_ASSERT_H 
    22 #include <arb_assert.h> 
    23 #endif 
     18 
    2419#define nt_assert(bed) arb_assert(bed) 
    2520 
     
    379374} 
    380375 
    381 void NT_start_editor_on_tree(AW_window *, GBT_TREE **ptree, int use_species_aside){ 
    382     GB_ERROR error = NT_create_configuration(0,ptree,CONFNAME, use_species_aside); 
    383     if (!error) { 
    384         GBCMC_system(GLOBAL_gb_main, "arb_edit4 -c "CONFNAME" &"); 
    385     } 
     376void NT_start_editor_on_tree(AW_window *, AW_CL cl_use_species_aside, AW_CL) { 
     377    GB_ERROR error = NT_create_configuration(0, nt_get_current_tree_root(), CONFNAME, (int)cl_use_species_aside); 
     378    if (!error) GBCMC_system(GLOBAL_gb_main, "arb_edit4 -c "CONFNAME" &"); 
    386379} 
    387380 
     
    477470 
    478471 
    479 GB_ERROR NT_create_configuration(AW_window *, GBT_TREE **ptree,const char *conf_name, int use_species_aside){ 
    480     GBT_TREE *tree = *ptree; 
    481     char     *to_free = 0; 
     472GB_ERROR NT_create_configuration(AW_window *, GBT_TREE *tree, const char *conf_name, int use_species_aside) { 
     473    char *to_free = 0; 
    482474 
    483475    if (!conf_name) { 
     
    492484        { 
    493485            const char *val                    = GBS_global_string("%i", last_used_species_aside); 
    494             char       *use_species            = aw_input("Enter number of extra species to view aside marked:", val); 
     486            char       *use_species            = aw_input("How many extra species to view aside marked:", val); 
    495487            if (use_species) use_species_aside = atoi(use_species); 
    496488            free(use_species); 
     
    551543} 
    552544 
    553 void nt_store_configuration(AW_window */*aww*/, AW_CL cl_GBT_TREE_ptr) { 
    554     GBT_TREE **ptree = (GBT_TREE**)cl_GBT_TREE_ptr; 
    555     GB_ERROR   err   = NT_create_configuration(0, ptree, 0, 0); 
     545static void nt_store_configuration(AW_window *) { 
     546    GB_ERROR err = NT_create_configuration(0, nt_get_current_tree_root(), 0, 0); 
    556547    if (err) aw_message(err); 
    557548} 
     
    586577    free(old_name); 
    587578} 
    588 //  -------------------------------------------------------------------------------------- 
    589 //      AW_window *create_configuration_admin_window(AW_root *root, GBT_TREE **ptree) 
    590 //  -------------------------------------------------------------------------------------- 
    591 AW_window *create_configuration_admin_window(AW_root *root, GBT_TREE **ptree) { 
     579 
     580static AW_window *create_configuration_admin_window(AW_root *root) { 
    592581    static AW_window_simple *aws = 0; 
    593     if (aws) return aws; 
    594  
    595     init_config_awars(root); 
    596  
    597     aws = new AW_window_simple; 
    598     aws->init(root, "SPECIES_SELECTIONS", "Species Selections"); 
    599     aws->load_xfig("nt_selection.fig"); 
    600  
    601     aws->at("close"); 
    602     aws->callback( (AW_CB0)AW_POPDOWN); 
    603     aws->create_button("CLOSE","CLOSE","C"); 
    604  
    605     aws->at("help"); 
    606     aws->callback(AW_POPUP_HELP,(AW_CL)"configuration.hlp"); 
    607     aws->create_button("HELP","HELP","H"); 
    608  
    609     aws->at("list"); 
    610     awt_create_selection_list_on_configurations(GLOBAL_gb_main, aws, AWAR_CONFIGURATION); 
    611  
    612     aws->at("store"); 
    613     aws->callback(nt_store_configuration, (AW_CL)ptree); 
    614     aws->create_button("STORE","STORE","S"); 
    615  
    616     aws->at("extract"); 
    617     aws->callback(nt_extract_configuration, CONF_EXTRACT); 
    618     aws->create_button("EXTRACT","EXTRACT","E"); 
    619  
    620     aws->at("mark"); 
    621     aws->callback(nt_extract_configuration, CONF_MARK); 
    622     aws->create_button("MARK","MARK","M"); 
    623  
    624     aws->at("unmark"); 
    625     aws->callback(nt_extract_configuration, CONF_UNMARK); 
    626     aws->create_button("UNMARK","UNMARK","U"); 
    627  
    628     aws->at("invert"); 
    629     aws->callback(nt_extract_configuration, CONF_INVERT); 
    630     aws->create_button("INVERT","INVERT","I"); 
    631  
    632     aws->at("combine"); 
    633     aws->callback(nt_extract_configuration, CONF_COMBINE); 
    634     aws->create_button("COMBINE","COMBINE","C"); 
    635  
    636     aws->at("delete"); 
    637     aws->callback(nt_delete_configuration); 
    638     aws->create_button("DELETE","DELETE","D"); 
    639  
    640     aws->at("rename"); 
    641     aws->callback(nt_rename_configuration); 
    642     aws->create_button("RENAME","RENAME","R"); 
    643  
     582    if (!aws) { 
     583        init_config_awars(root); 
     584 
     585        aws = new AW_window_simple; 
     586        aws->init(root, "SPECIES_SELECTIONS", "Species Selections"); 
     587        aws->load_xfig("nt_selection.fig"); 
     588 
     589        aws->at("close"); 
     590        aws->callback( (AW_CB0)AW_POPDOWN); 
     591        aws->create_button("CLOSE","CLOSE","C"); 
     592 
     593        aws->at("help"); 
     594        aws->callback(AW_POPUP_HELP,(AW_CL)"configuration.hlp"); 
     595        aws->create_button("HELP","HELP","H"); 
     596 
     597        aws->at("list"); 
     598        awt_create_selection_list_on_configurations(GLOBAL_gb_main, aws, AWAR_CONFIGURATION); 
     599 
     600        aws->at("store"); 
     601        aws->callback(nt_store_configuration); 
     602        aws->create_button("STORE","STORE","S"); 
     603 
     604        aws->at("extract"); 
     605        aws->callback(nt_extract_configuration, CONF_EXTRACT); 
     606        aws->create_button("EXTRACT","EXTRACT","E"); 
     607 
     608        aws->at("mark"); 
     609        aws->callback(nt_extract_configuration, CONF_MARK); 
     610        aws->create_button("MARK","MARK","M"); 
     611 
     612        aws->at("unmark"); 
     613        aws->callback(nt_extract_configuration, CONF_UNMARK); 
     614        aws->create_button("UNMARK","UNMARK","U"); 
     615 
     616        aws->at("invert"); 
     617        aws->callback(nt_extract_configuration, CONF_INVERT); 
     618        aws->create_button("INVERT","INVERT","I"); 
     619 
     620        aws->at("combine"); 
     621        aws->callback(nt_extract_configuration, CONF_COMBINE); 
     622        aws->create_button("COMBINE","COMBINE","C"); 
     623 
     624        aws->at("delete"); 
     625        aws->callback(nt_delete_configuration); 
     626        aws->create_button("DELETE","DELETE","D"); 
     627 
     628        aws->at("rename"); 
     629        aws->callback(nt_rename_configuration); 
     630        aws->create_button("RENAME","RENAME","R"); 
     631    } 
    644632    return aws; 
    645633} 
    646634 
    647 void NT_popup_configuration_admin(AW_window *aw_main, AW_CL cl_GBT_TREE_ptr, AW_CL) { 
    648     GBT_TREE  **ptree   = (GBT_TREE**)cl_GBT_TREE_ptr; 
    649     AW_root    *aw_root = aw_main->get_root(); 
    650     AW_window  *aww     = create_configuration_admin_window(aw_root, ptree); 
    651  
     635void NT_popup_configuration_admin(AW_window *aw_main, AW_CL, AW_CL) { 
     636    AW_window *aww = create_configuration_admin_window(aw_main->get_root()); 
    652637    aww->activate(); 
    653638} 
  • trunk/NTREE/NT_extern.cxx

    r6200 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4  
    5 #include <arbdb.h> 
    6 #include <arbdbt.h> 
    7 #include <aw_root.hxx> 
    8 #include <aw_device.hxx> 
    9 #include <aw_window.hxx> 
    10 #include <aw_awars.hxx> 
    11  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : NT_extern.cxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "nt_internal.h" 
     12#include "ntree.hxx" 
     13#include "ad_spec.hxx" 
    1214#include "ad_trees.hxx" 
    13 #include "ad_spec.hxx" 
     15#include "ap_consensus.hxx" 
     16#include "seq_quality.h" 
     17#include "nt_join.hxx" 
     18 
     19#include <st_window.hxx> 
     20#include <GEN.hxx> 
     21#include <EXP.hxx> 
     22 
     23#include <TreeCallbacks.hxx> 
     24#include <AW_rename.hxx> 
     25#include <probe_design.hxx> 
     26#include <primer_design.hxx> 
     27#include <gde.hxx> 
     28#include <awtc_submission.hxx> 
     29 
     30#include <awti_export.hxx> 
     31 
     32#include <awt_preset.hxx> 
     33#include <awt_macro.hxx> 
     34#include <awt_advice.hxx> 
     35#include <awt_config_manager.hxx> 
     36#include <awt_input_mask.hxx> 
     37#include <awt_sel_boxes.hxx> 
     38#include <awt_www.hxx> 
    1439#include <awt_nds.hxx> 
    15 #include <awt_canvas.hxx> 
     40 
    1641#include <aw_preset.hxx> 
    1742#include <aw_global.hxx> 
    18 #include <awt_preset.hxx> 
    19 #include <awt_advice.hxx> 
    20 #include <awt_config_manager.hxx> 
    21 #include <awt_sel_boxes.hxx> 
    22 #include <awt_macro.hxx> 
    23  
    24 #include <AW_rename.hxx> 
    25 #include <awtc_submission.hxx> 
    26 #include <gde.hxx> 
    27  
    28 #include <awt_www.hxx> 
    29 #include <awt_tree.hxx> 
    30 #include <awt_dtree.hxx> 
    31 #include <awt_tree_cb.hxx> 
    32 #include "ntree.hxx" 
    33 #include "nt_cb.hxx" 
    34 #include "nt_sort.hxx" 
    35 #include "ap_consensus.hxx" 
    36 #include "ap_csp_2_gnuplot.hxx" 
    37 #include "ap_conservProfile2Gnuplot.hxx" 
    38 #include <awti_export.hxx> 
    39 #include "nt_join.hxx" 
    40 #include "nt_edconf.hxx" 
    41 #include "ap_pos_var_pars.hxx" 
     43#include <aw_awars.hxx> 
     44 
    4245#include <arb_version.h> 
    43 #include "nt_internal.h" 
    44 #include <st_window.hxx> 
    45 #include <probe_design.hxx> 
    46 #include <primer_design.hxx> 
    47 #include <GEN.hxx> 
    48 #include <EXP.hxx> 
    49 #include <awt_input_mask.hxx> 
    50  
    51 #include "seq_quality.h" 
    52 #include "NT_trackAliChanges.h" 
    53 #include "NT_dbrepair.hxx" 
    54  
    55 #ifndef ARB_ASSERT_H 
    56 #include <arb_assert.h> 
    57 #endif 
     46 
    5847#define nt_assert(bed) arb_assert(bed) 
    5948 
     
    813802        AWT_canvas     *ntw = (AWT_canvas *)ntwcl; 
    814803        GB_transaction  dummy(ntw->gb_main); 
    815          
     804 
    816805        NT_mark_all_cb(aww,(AW_CL)ntw, (AW_CL)0); 
    817         AWT_TREE(ntw)->tree_root->mark_degenerated_branches(ntw->gb_main,atof(val)); 
    818         AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     806        AP_tree *tree_root = AWT_TREE(ntw)->get_root_node(); 
     807        tree_root->mark_degenerated_branches(ntw->gb_main,atof(val)); 
     808        tree_root->compute_tree(ntw->gb_main); 
    819809        free(val); 
    820810        ntw->refresh(); 
     
    829819         
    830820        NT_mark_all_cb(aww,(AW_CL)ntw, (AW_CL)0); 
    831         AWT_TREE(ntw)->tree_root->mark_deep_branches(ntw->gb_main,atoi(val)); 
    832         AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     821        AP_tree *tree_root = AWT_TREE(ntw)->get_root_node(); 
     822        tree_root->mark_deep_branches(ntw->gb_main,atoi(val)); 
     823        tree_root->compute_tree(ntw->gb_main); 
    833824        free(val); 
    834825        ntw->refresh(); 
     
    851842 
    852843            NT_mark_all_cb(aww,(AW_CL)ntw, (AW_CL)0); 
    853             AWT_TREE(ntw)->tree_root->mark_long_branches(ntw->gb_main, min_rel_diff, min_abs_diff); 
    854             AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     844            AP_tree *tree_root = AWT_TREE(ntw)->get_root_node(); 
     845            tree_root->mark_long_branches(ntw->gb_main, min_rel_diff, min_abs_diff); 
     846            tree_root->compute_tree(ntw->gb_main); 
    855847            ntw->refresh(); 
    856848        } 
     
    864856    GB_transaction dummy(ntw->gb_main); 
    865857    NT_mark_all_cb(aww,(AW_CL)ntw, (AW_CL)0); 
    866     AWT_TREE(ntw)->tree_root->mark_duplicates(ntw->gb_main); 
    867     AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     858    AP_tree *tree_root = AWT_TREE(ntw)->get_root_node(); 
     859    tree_root->mark_duplicates(ntw->gb_main); 
     860    tree_root->compute_tree(ntw->gb_main); 
    868861    ntw->refresh(); 
    869862} 
    870863 
    871864void NT_justify_branch_lenghs(AW_window *, AW_CL cl_ntw, AW_CL){ 
    872     AWT_canvas *ntw = (AWT_canvas *)cl_ntw; 
    873     GB_transaction dummy(ntw->gb_main); 
    874     if (AWT_TREE(ntw)->tree_root){ 
    875         AWT_TREE(ntw)->tree_root->justify_branch_lenghs(ntw->gb_main); 
    876         AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     865    AWT_canvas     *ntw       = (AWT_canvas *)cl_ntw; 
     866    GB_transaction  dummy(ntw->gb_main); 
     867    AP_tree        *tree_root = AWT_TREE(ntw)->get_root_node(); 
     868     
     869    if (tree_root){ 
     870        tree_root->justify_branch_lenghs(ntw->gb_main); 
     871        tree_root->compute_tree(ntw->gb_main); 
    877872        GB_ERROR error = AWT_TREE(ntw)->save(ntw->gb_main,0,0,0); 
    878873        if (error) aw_message(error); 
     
    905900 
    906901void NT_pseudo_species_to_organism(AW_window *, AW_CL ntwcl){ 
    907     AWT_canvas     *ntw = (AWT_canvas *)ntwcl; 
     902    AWT_canvas     *ntw       = (AWT_canvas *)ntwcl; 
    908903    GB_transaction  dummy(ntw->gb_main); 
    909     if (AWT_TREE(ntw)->tree_root){ 
     904    AP_tree        *tree_root = AWT_TREE(ntw)->get_root_node(); 
     905 
     906    if (tree_root){ 
    910907        GB_HASH *organism_hash = GBT_create_organism_hash(ntw->gb_main); 
    911         AWT_TREE(ntw)->tree_root->relink_tree(ntw->gb_main, relink_pseudo_species_to_organisms, organism_hash); 
    912         AWT_TREE(ntw)->tree_root->compute_tree(ntw->gb_main); 
     908        tree_root->relink_tree(ntw->gb_main, relink_pseudo_species_to_organisms, organism_hash); 
     909        tree_root->compute_tree(ntw->gb_main); 
    913910        GB_ERROR error = AWT_TREE(ntw)->save(ntw->gb_main,0,0,0); 
    914911        if (error) aw_message(error); 
     
    10561053} 
    10571054 
     1055GBT_TREE *nt_get_current_tree_root() { 
     1056    if (GLOBAL_NT.tree) { 
     1057        AP_tree *root = GLOBAL_NT.tree->get_root_node(); 
     1058        if (root) { 
     1059            return (GBT_TREE*)root; 
     1060        } 
     1061    } 
     1062    return NULL; 
     1063} 
     1064 
    10581065//-------------------------------------------------------------------------------------------------- 
    10591066 
     
    10901097    if (!clone) AW_init_color_group_defaults("arb_ntree"); 
    10911098 
    1092     GLOBAL_NT.tree = NT_generate_tree(awr,GLOBAL_gb_main); 
     1099    GLOBAL_NT.tree = NT_generate_tree(awr, GLOBAL_gb_main); 
    10931100 
    10941101    AWT_canvas *ntw; 
     
    11081115        if (existing_tree_name) { 
    11091116            awr->awar(awar_tree)->write_string(existing_tree_name); 
    1110             NT_reload_tree_event(awr,ntw,GB_FALSE); // load first tree !!!!!!! 
    1111         }else{ 
     1117            NT_reload_tree_event(awr, ntw); // load first tree 
     1118        } 
     1119        else { 
    11121120            AWT_advice("Your database contains no tree.", AWT_ADVICE_TOGGLE|AWT_ADVICE_HELP, 0, "no_tree.hlp"); 
    1113         } 
    1114  
    1115         awr->awar( awar_tree)->add_callback( (AW_RCB)NT_reload_tree_event, (AW_CL)ntw,(AW_CL)GB_FALSE); 
     1121            GLOBAL_NT.tree->set_tree_type(AP_LIST_NDS); // no tree -> show NDS list  
     1122        } 
     1123 
     1124        awr->awar( awar_tree)->add_callback( (AW_RCB)NT_reload_tree_event, (AW_CL)ntw, 0); 
    11161125 
    11171126        free(existing_tree_name); 
     
    12171226 
    12181227            NT_insert_mark_submenus(awm, ntw, 1); 
    1219             AWMIMT("species_colors",  "Set Colors",     "l", "mark_colors.hlp",   AWM_ALL, AW_POPUP,               (AW_CL)NT_create_species_colorize_window, 0); 
    1220             AWMIMT("selection_admin", "Configurations", "o", "configuration.hlp", AWM_ALL, NT_popup_configuration_admin, (AW_CL)&(GLOBAL_NT.tree->tree_root),      (AW_CL)0); 
     1228            AWMIMT("species_colors",  "Set Colors",     "l", "mark_colors.hlp",   AWM_ALL, AW_POPUP,                     (AW_CL)NT_create_species_colorize_window, 0); 
     1229            AWMIMT("selection_admin", "Configurations", "o", "configuration.hlp", AWM_ALL, NT_popup_configuration_admin, 0,                                        0); 
    12211230 
    12221231            SEP________________________SEP(); 
     
    12331242            awm->insert_sub_menu("Sort Species",         "r"); 
    12341243            { 
    1235                 AWMIMT("sort_by_field", "According to Database Entries", "D", "sp_sort_fld.hlp",  AWM_ALL, AW_POPUP,                           (AW_CL)NT_build_resort_window,      0); 
    1236                 AWMIMT("sort_by_tree",  "According to Phylogeny",        "P", "sp_sort_phyl.hlp", AWM_ALL, (AW_CB)NT_resort_data_by_phylogeny, (AW_CL)&(GLOBAL_NT.tree->tree_root), 0); 
     1244                AWMIMT("sort_by_field", "According to Database Entries", "D", "sp_sort_fld.hlp",  AWM_ALL, AW_POPUP,                    (AW_CL)NT_build_resort_window, 0); 
     1245                AWMIMT("sort_by_tree",  "According to Phylogeny",        "P", "sp_sort_phyl.hlp", AWM_ALL, NT_resort_data_by_phylogeny, 0,                            0); 
    12371246            } 
    12381247            awm->close_sub_menu(); 
     
    12791288            awm->insert_sub_menu("Edit Sequences","E"); 
    12801289            { 
    1281                 AWMIMT("new_arb_edit4",  "Using marked species and tree", "m", "arb_edit4.hlp", AWM_ALL, (AW_CB)NT_start_editor_on_tree, (AW_CL)&(GLOBAL_NT.tree->tree_root),        0); 
    1282                 AWMIMT("new2_arb_edit4", "... plus relatives",            "r", "arb_edit4.hlp", AWM_ALL, (AW_CB)NT_start_editor_on_tree, (AW_CL)&(GLOBAL_NT.tree->tree_root),         -1); 
     1290                AWMIMT("new_arb_edit4",  "Using marked species and tree", "m", "arb_edit4.hlp", AWM_ALL, NT_start_editor_on_tree, 0, 0); 
     1291                AWMIMT("new2_arb_edit4", "... plus relatives",            "r", "arb_edit4.hlp", AWM_ALL, NT_start_editor_on_tree, -1, 0); 
    12831292                AWMIMT("old_arb_edit4",  "Using earlier configuration",   "c", "arb_edit4.hlp", AWM_ALL, AW_POPUP,                       (AW_CL)NT_start_editor_on_old_configuration, 0); 
    12841293            } 
     
    15521561    awm->create_mode("pzoom.bitmap",    "mode_pzoom.hlp",  AWM_ALL, (AW_CB)nt_mode_event, (AW_CL)ntw, (AW_CL)AWT_MODE_ZOOM); 
    15531562    awm->create_mode("lzoom.bitmap",    "mode_lzoom.hlp",  AWM_ALL, (AW_CB)nt_mode_event, (AW_CL)ntw, (AW_CL)AWT_MODE_LZOOM); 
    1554     awm->create_mode("modify.bitmap",   "mode_info.hlp",   AWM_ALL, (AW_CB)NT_modify_cb,  (AW_CL)ntw, (AW_CL)AWT_MODE_MOD); 
     1563    awm->create_mode("modify.bitmap",   "mode_info.hlp",   AWM_ALL, (AW_CB)NT_modify_cb,  (AW_CL)ntw, (AW_CL)AWT_MODE_EDIT); 
    15551564    awm->create_mode("www_mode.bitmap", "mode_www.hlp",    AWM_ALL, (AW_CB)nt_mode_event, (AW_CL)ntw, (AW_CL)AWT_MODE_WWW); 
    15561565 
     
    17081717     
    17091718    awm->at_set_to(false, false, ((2-is_genome_db)*EDIT_XSIZE), EDIT_YSIZE); 
    1710     awm->callback((AW_CB)NT_start_editor_on_tree, (AW_CL)&(GLOBAL_NT.tree->tree_root), 0); 
     1719    awm->callback(NT_start_editor_on_tree, 0, 0); 
    17111720    awm->help_text("arb_edit4.hlp"); 
    17121721    awm->create_button("EDIT_SEQUENCES", "#edit.xpm"); 
     
    17651774    awm->button_length(13); 
    17661775    awm->help_text("marked_species.hlp"); 
    1767     awm->callback(NT_popup_configuration_admin, (AW_CL)&(GLOBAL_NT.tree->tree_root), 0); 
     1776    awm->callback(NT_popup_configuration_admin, 0, 0); 
    17681777    awm->create_button(0, AWAR_MARKED_SPECIES_COUNTER); 
    17691778    { 
  • trunk/NTREE/NT_main.cxx

    r6206 r6280  
    1 #include <string.h> 
    2 #include <stdio.h> 
    3 #include <stdlib.h> 
    4 #include <arbdb.h> 
    5 #include <arbdbt.h> 
    6 #include <adGene.h> 
    7  
    8 #include <servercntrl.h> 
    9 #include <aw_root.hxx> 
    10 #include <aw_device.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <aw_awars.hxx> 
    13 #include <aw_question.hxx> 
    14 #include <aw_global.hxx> 
    15 #include <awt_canvas.hxx> 
    16 #include <awt_advice.hxx> 
    17  
    18 #include <awt_tree.hxx> 
    19 #include <awt_dtree.hxx> 
    20 #include <awt.hxx> 
    21 #include <awti_import.hxx> 
    22  
    23 #include <mg_merge.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : NT_main.cxx                                       // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    2410 
    2511#include "nt_internal.h" 
    2612#include "ntree.hxx" 
    2713#include "nt_cb.hxx" 
    28 #include "NT_dbrepair.hxx" 
    29  
     14 
     15#include <mg_merge.hxx> 
     16#include <awti_import.hxx> 
     17#include <awt_advice.hxx> 
     18#include <awt.hxx> 
     19#include <aw_global.hxx> 
     20#include <aw_question.hxx> 
     21#include <aw_awars.hxx> 
     22#include <adGene.h> 
    3023#include <arb_version.h> 
    3124 
  • trunk/NTREE/NT_trackAliChanges.cxx

    r5851 r6280  
    1010// =============================================================== // 
    1111 
    12 #include <cstdlib> 
    13 #include <cstring> 
     12#include "NT_trackAliChanges.h" 
     13 
     14#include <awt_sel_boxes.hxx> 
     15#include <aw_window.hxx> 
    1416#include <ctime> 
    15  
    16  
    17 #include <awt.hxx> 
    18 #include <awt_sel_boxes.hxx> 
    19 #include <arbdbt.h> 
    20  
    21 #include "NT_trackAliChanges.h" 
    2217 
    2318extern GBDATA *GLOBAL_gb_main; 
  • trunk/NTREE/NT_trackAliChanges.h

    r5675 r6280  
    1313#define NT_TRACKALICHANGES_H 
    1414 
     15#ifndef AW_ROOT_HXX 
     16#include <aw_root.hxx> 
     17#endif 
     18 
     19class AW_window; 
     20 
    1521void       NT_create_trackAliChanges_Awars(AW_root *root, AW_default aw_def); 
    1622AW_window *NT_create_trackAliChanges_window(AW_root *root); 
  • trunk/NTREE/ad_spec.cxx

    r6188 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : ad_spec.cxx                                       // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11 
    112#include "ad_spec.hxx" 
    2  
    3 #include <stdio.h> 
    4 #include <stdlib.h> 
    5 #include <string.h> 
    6 #include <arbdbt.h> 
    7 #include <aw_awars.hxx> 
    8 #include <awt_www.hxx> 
    9 #include <awt_tree.hxx> 
    10 #include <awt_canvas.hxx> 
    11 #include <awt_dtree.hxx> 
    12 #include <awtlocal.hxx> 
    13 #include <awt_item_sel_list.hxx> 
    14 #include <awt_sel_boxes.hxx> 
    15 #include <db_scanner.hxx> 
     13#include "nt_internal.h" 
     14#include "ntree.hxx" 
     15 
    1616#include <awtc_next_neighbours.hxx> 
    1717#include <AW_rename.hxx> 
    18 #include <ntree.hxx> 
    19 #include <nt_internal.h> 
    20  
    21 #ifndef ARB_ASSERT_H 
    22 #include <arb_assert.h> 
    23 #endif 
     18#include <db_scanner.hxx> 
     19#include <awt_item_sel_list.hxx> 
     20#include <awtlocal.hxx> 
     21#include <awt_www.hxx> 
     22#include <awt_canvas.hxx> 
     23#include <awt_sel_boxes.hxx> 
     24#include <aw_awars.hxx> 
     25 
    2426#define nt_assert(bed) arb_assert(bed) 
    2527 
  • trunk/NTREE/ad_transpro.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 #include <ctype.h> 
    5  
    6 #include <arbdb.h> 
    7 #include <arbdbt.h> 
    8 #include <aw_root.hxx> 
    9 #include <aw_device.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : ad_transpro.cxx                                   // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "nt_internal.h" 
     12 
     13#include <awt_sel_boxes.hxx> 
     14#include <Translate.hxx> 
     15#include <AP_codon_table.hxx> 
     16#include <AP_pro_a_nucs.hxx> 
    1017#include <aw_awars.hxx> 
    11 #include <aw_window.hxx> 
    12 #include <awt.hxx> 
    13 #include <awt_codon_table.hxx> 
    14 #include <awt_sel_boxes.hxx> 
    15 #include <awt_pro_a_nucs.hxx> 
    16 #include <awt_translate.hxx> 
    17  
    18 #ifndef ARB_ASSERT_H 
    19 #include <arb_assert.h> 
    20 #endif 
     18#include <cctype> 
     19 
    2120#define nt_assert(bed) arb_assert(bed) 
    2221 
     
    343342GB_ERROR arb_transdna(GBDATA *gb_main, char *ali_source, char *ali_dest, long *neededLength) 
    344343{ 
    345     AWT_initialize_codon_tables(); 
     344    AP_initialize_codon_tables(); 
    346345 
    347346    GBDATA *gb_source = GBT_get_alignment(gb_main,ali_source); if (!gb_source) return "Please select a valid source alignment"; 
  • trunk/NTREE/ad_trees.cxx

    r6200 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <memory.h> 
    4 // #include <malloc.h> 
    5 #include <string.h> 
    6 #include <unistd.h> 
    7  
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10 #include <aw_root.hxx> 
    11 #include <aw_device.hxx> 
    12 #include <aw_window.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : ad_trees.cxx                                      // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "ad_trees.hxx" 
     12#include "nt_tree_cmp.hxx" 
     13 
     14#include <TreeRead.h> 
     15#include <TreeWrite.h> 
     16#include <awt_sel_boxes.hxx> 
     17#include <awt_nds.hxx> 
     18#include <awt.hxx> 
    1319#include <aw_awars.hxx> 
    1420#include <aw_global.hxx> 
    15 #include <awt.hxx> 
    16 #include <TreeRead.h> 
    17 #include <TreeWrite.h> 
    18 #include <awt_tree_cmp.hxx> 
    19 #include <awt_sel_boxes.hxx> 
    20 #include <awt_nds.hxx> 
    21  
    22 #include "ad_trees.hxx" 
    23  
    24 #ifndef ARB_ASSERT_H 
    25 #include <arb_assert.h> 
    26 #endif 
     21 
    2722#define nt_assert(bed) arb_assert(bed) 
    2823 
     
    184179 
    185180void tree_rename_cb(AW_window *aww) { 
    186     char     *source = aww->get_root()->awar(AWAR_TREE_NAME)->read_string(); 
    187     char     *dest   = aww->get_root()->awar(AWAR_TREE_DEST)->read_string(); 
    188     GB_ERROR  error  = GBT_check_tree_name(dest); 
     181    AW_root  *aw_root   = aww->get_root(); 
     182    AW_awar  *awar_tree = aw_root->awar(AWAR_TREE_NAME); 
     183    char     *source    = awar_tree->read_string(); 
     184    char     *dest      = aw_root->awar(AWAR_TREE_DEST)->read_string(); 
     185    GB_ERROR  error     = GBT_check_tree_name(dest); 
    189186 
    190187    if (!error) { 
     
    211208            } 
    212209        } 
     210         
     211        if (!error) awar_tree->write_string(dest); 
    213212        error = GB_end_transaction(GLOBAL_gb_main, error); 
    214213    } 
    215214 
    216215    aww->hide_or_notify(error); 
    217      
     216 
    218217    free(dest); 
    219218    free(source); 
     
    679678} 
    680679void ad_tr_delete_cb(AW_window *aww){ 
    681     GB_ERROR  error  = 0; 
    682     char     *source = aww->get_root()->awar(AWAR_TREE_NAME)->read_string(); 
    683  
    684     GB_begin_transaction(GLOBAL_gb_main); 
    685  
    686     GBDATA *gb_tree = GBT_get_tree(GLOBAL_gb_main,source); 
    687     if (gb_tree) { 
    688         char *newname = GBT_get_next_tree_name(GLOBAL_gb_main,source); 
    689         error = GB_delete(gb_tree); 
    690         if (!error && newname) { 
    691             aww->get_root()->awar(AWAR_TREE_NAME)->write_string(strcmp(newname, source) == 0 ? "" : newname); 
    692         } 
     680    AW_awar  *awar_tree = aww->get_root()->awar(AWAR_TREE_NAME); 
     681    char     *source    = awar_tree->read_string(); 
     682 
     683    // 1. switch to next tree 
     684    { 
     685        GB_transaction ta(GLOBAL_gb_main); 
     686        char *newname = GBT_get_next_tree_name(GLOBAL_gb_main, source); 
     687 
     688        awar_tree->write_string(!newname || (strcmp(newname, source) == 0) ? "" : newname); 
    693689        free(newname); 
    694690    } 
    695     else { 
    696         error = "Please select a tree first"; 
    697     } 
    698  
    699     if (!error) GB_commit_transaction(GLOBAL_gb_main); 
    700     else    GB_abort_transaction(GLOBAL_gb_main); 
    701  
    702     if (error) aw_message(error); 
     691 
     692    // 2. delete old tree 
     693    { 
     694        GB_ERROR  error   = GB_begin_transaction(GLOBAL_gb_main); 
     695        GBDATA   *gb_tree = GBT_get_tree(GLOBAL_gb_main,source); 
     696        if (gb_tree) { 
     697            char *newname = GBT_get_next_tree_name(GLOBAL_gb_main,source); 
     698            error = GB_delete(gb_tree); 
     699            if (!error && newname) { 
     700                awar_tree->write_string(strcmp(newname, source) == 0 ? "" : newname); 
     701            } 
     702            free(newname); 
     703        } 
     704        else { 
     705            error = "Please select a tree first"; 
     706        } 
     707 
     708        error = GB_end_transaction(GLOBAL_gb_main, error); 
     709        if (error) { 
     710            aw_message(error); 
     711            awar_tree->write_string(source); // switch back to failed tree 
     712        } 
     713    } 
     714 
    703715    free(source); 
    704716} 
  • trunk/NTREE/ad_trees.hxx

    r6033 r6280  
    1212#define AD_TREES_HXX 
    1313 
     14#ifndef AW_ROOT_HXX 
     15#include <aw_root.hxx> 
     16#endif 
     17 
    1418#define AWAR_TREE_NAME "tmp/ad_tree/tree_name" 
    1519 
  • trunk/NTREE/ap_csp_2_gnuplot.hxx

    r5390 r6280  
     1// ================================================================ // 
     2//                                                                  // 
     3//   File      : ap_csp_2_gnuplot.hxx                               // 
     4//   Purpose   :                                                    // 
     5//                                                                  // 
     6//   Institute of Microbiology (Technical University Munich)        // 
     7//   http://www.arb-home.de/                                        // 
     8//                                                                  // 
     9// ================================================================ // 
     10 
     11#ifndef AP_CSP_2_GNUPLOT_HXX 
     12#define AP_CSP_2_GNUPLOT_HXX 
     13 
    114#define AP_AWAR_CSP                         "tmp/ntree/csp_2_gnuplot" 
    215#define AP_AWAR_CSP_NAME                    AP_AWAR_CSP "/name" 
     
    1528 
    1629AW_window *AP_open_csp_2_gnuplot_window( AW_root *root ); 
     30 
     31#else 
     32#error ap_csp_2_gnuplot.hxx included twice 
     33#endif // AP_CSP_2_GNUPLOT_HXX 
  • trunk/NTREE/ap_pos_var_pars.hxx

    r6141 r6280  
    1 #define AWAR_PVP_SAI "tmp/pos_var_pars/sai" 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : ap_pos_var_pars.hxx                               // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef AP_POS_VAR_PARS_HXX 
     12#define AP_POS_VAR_PARS_HXX 
     13 
     14#ifndef ARBDBT_H 
     15#include <arbdbt.h> 
     16#endif 
     17 
     18class AW_window; 
     19class AW_root; 
     20 
     21#define AWAR_PVP_SAI  "tmp/pos_var_pars/sai" 
    222#define AWAR_PVP_TREE "tmp/pos_var_pars/tree" 
    323 
     
    3252    GB_ERROR save_sai(const char *sai_name); 
    3353}; 
     54 
     55#else 
     56#error ap_pos_var_pars.hxx included twice 
     57#endif // AP_POS_VAR_PARS_HXX 
  • trunk/NTREE/nt_cb.hxx

    r5968 r6280  
    1717 
    1818/* NT_cb.cxx */ 
     19 
     20#ifndef ARBDBT_H 
     21#include <arbdbt.h> 
     22#endif 
     23#ifndef AW_ROOT_HXX 
     24#include <aw_root.hxx> 
     25#endif 
     26 
     27class AW_window; 
     28class AWT_canvas; 
     29 
    1930void NT_delete_mark_all_cb(void *, AWT_canvas *ntw); 
    2031AW_window *NT_open_select_tree_window(AW_root *awr, char *awar_tree); 
     
    5970void NT_popup_species_window(AW_window *aww, AW_CL dummy_1x, AW_CL dummy_2x); 
    6071void NT_alltree_remove_leafs(AW_window *, AW_CL cl_mode, AW_CL cl_gb_main); 
     72GBT_TREE *nt_get_current_tree_root(void); 
    6173AW_window *create_nt_main_window(AW_root *awr, AW_CL clone); 
    6274 
  • trunk/NTREE/nt_internal.h

    r6019 r6280  
    1515#endif 
    1616 
     17 
     18/* NT_cb.cxx */ 
     19 
     20#ifndef ARBDBT_H 
     21#include <arbdbt.h> 
     22#endif 
     23#ifndef AW_ROOT_HXX 
     24#include <aw_root.hxx> 
     25#endif 
     26 
     27class AW_window; 
     28class AWT_canvas; 
     29 
     30void NT_delete_mark_all_cb(void *, AWT_canvas *ntw); 
     31AW_window *NT_open_select_tree_window(AW_root *awr, char *awar_tree); 
     32void NT_select_last_tree(AW_window *aww, char *awar_tree); 
     33AW_window *NT_open_select_alignment_window(AW_root *awr); 
     34void NT_system_cb(AW_window *aww, AW_CL command, AW_CL auto_help_file); 
     35void NT_system_cb2(AW_window *aww, AW_CL command, AW_CL auto_help_file); 
    1736 
    1837/* AP_consensus.cxx */ 
     
    3655AW_window *AP_open_pos_var_pars_window(AW_root *root); 
    3756 
    38 /* NT_cb.cxx */ 
    39 void NT_delete_mark_all_cb(void *, AWT_canvas *ntw); 
    40 AW_window *NT_open_select_tree_window(AW_root *awr, char *awar_tree); 
    41 void NT_select_last_tree(AW_window *aww, char *awar_tree); 
    42 AW_window *NT_open_select_alignment_window(AW_root *awr); 
    43 void NT_system_cb(AW_window *aww, AW_CL command, AW_CL auto_help_file); 
    44 void NT_system_cb2(AW_window *aww, AW_CL command, AW_CL auto_help_file); 
    45  
    4657/* NT_concatenate.cxx */ 
    4758void NT_createConcatenationAwars(AW_root *aw_root, AW_default aw_def); 
     
    5667/* NT_edconf.cxx */ 
    5768AW_window *NT_start_editor_on_old_configuration(AW_root *awr); 
    58 void NT_start_editor_on_tree(AW_window *, GBT_TREE **ptree, int use_species_aside); 
    59 GB_ERROR NT_create_configuration(AW_window *, GBT_TREE **ptree, const char *conf_name, int use_species_aside); 
    60 void NT_popup_configuration_admin(AW_window *aw_main, AW_CL cl_GBT_TREE_ptr, AW_CL dummy_1x); 
     69void NT_start_editor_on_tree(AW_window *, AW_CL cl_use_species_aside, AW_CL dummy_1x); 
     70GB_ERROR NT_create_configuration(AW_window *, GBT_TREE *tree, const char *conf_name, int use_species_aside); 
     71void NT_popup_configuration_admin(AW_window *aw_main, AW_CL dummy_1x, AW_CL dummy_2x); 
    6172 
    6273/* NT_extern.cxx */ 
     
    97108/* NT_sort.cxx */ 
    98109GB_ERROR NT_resort_data_base(GBT_TREE *tree, const char *key1, const char *key2, const char *key3); 
    99 void NT_resort_data_by_phylogeny(AW_window *dummy, GBT_TREE **ptree); 
     110void NT_resort_data_by_phylogeny(AW_window *, AW_CL dummy_1x, AW_CL dummy_2x); 
    100111void NT_resort_data_by_user_criteria(AW_window *aw); 
    101112void NT_build_resort_awars(AW_root *awr, AW_default aw_def); 
  • trunk/NTREE/nt_sort.hxx

    r5646 r6280  
     1#error "bad header" 
     2 
    13extern GBDATA *GLOBAL_gb_main; 
    2 #define NT_RESORT_FILTER (1<<GB_STRING)|(1<<GB_INT)|(1<<GB_FLOAT) 
    34 
    45AW_window *NT_build_resort_window(AW_root *awr); 
  • trunk/NTREE/ntree.hxx

    r5968 r6280  
    1111#ifndef NTREE_HXX 
    1212#define NTREE_HXX 
     13 
     14#ifndef AW_WINDOW_HXX 
     15#include <aw_window.hxx> 
     16#endif 
    1317 
    1418#define NT_AW_TRUE  1 
  • trunk/PARSIMONY/AP_buffer.cxx

    r6141 r6280  
    1 #include <cstdio> 
    2 #include <memory.h> 
    3 #include <iostream> 
    4  
    5 #include <arbdb.h> 
    6 #include <arbdbt.h> 
    7 #include <awt_tree.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_buffer.cxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    810 
    911#include "AP_buffer.hxx" 
    1012#include "AP_error.hxx" 
     13 
     14#include <iostream> 
    1115 
    1216using namespace std; 
  • trunk/PARSIMONY/AP_buffer.hxx

    r5390 r6280  
    1 #ifndef _AP_BUFFER_INC 
    2 #define _AP_BUFFER_INC 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_buffer.hxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef AP_BUFFER_HXX 
     12#define AP_BUFFER_HXX 
     13 
     14#ifndef AP_SEQUENCE_HXX 
     15#include <AP_sequence.hxx> 
     16#endif 
     17#ifndef AP_TREE_HXX 
     18#include <AP_Tree.hxx> 
     19#endif 
     20 
    321 
    422/******************* 
     
    96114 
    97115struct AP_tree_buffer { 
    98     unsigned long  controll;    // used for internal buffer check 
    99     unsigned int   count;       // counts how often the entry is buffered 
     116    unsigned long  controll;                        // used for internal buffer check 
     117    unsigned int   count;                           // counts how often the entry is buffered 
    100118    AP_STACK_MODE  mode; 
    101119    AP_sequence   *sequence; 
     
    105123    AP_tree       *leftson; 
    106124    AP_tree       *rightson; 
     125    AP_tree_root  *root; 
    107126    GBDATA        *gb_node; 
    108127 
     
    128147}; 
    129148 
    130  
     149class AP_tree_nlen; 
    131150 
    132151class AP_main_stack : public AP_STACK { 
     
    135154public: 
    136155    friend class AP_main; 
    137     void push(AP_tree *value) { AP_STACK::push((void *)value); } 
    138     AP_tree * pop() { return (AP_tree *) AP_STACK::pop(); } 
    139     AP_tree * get() { return (AP_tree *) AP_STACK::get(); } 
    140     AP_tree * get_first() { return (AP_tree *) AP_STACK::get_first(); } 
     156    void push(AP_tree_nlen *value) { AP_STACK::push((void *)value); } 
     157    AP_tree_nlen *pop() { return (AP_tree_nlen*)AP_STACK::pop(); } 
     158    AP_tree_nlen *get() { return (AP_tree_nlen*)AP_STACK::get(); } 
     159    AP_tree_nlen *get_first() { return (AP_tree_nlen*)AP_STACK::get_first(); } 
    141160    void print(); 
    142161}; 
     
    151170}; 
    152171 
    153 #endif 
     172#else 
     173#error AP_buffer.hxx included twice 
     174#endif // AP_BUFFER_HXX 
  • trunk/PARSIMONY/AP_main.cxx

    r6141 r6280  
    1 #include <cstdio> 
    2 #include <cmath> 
    3 #include <cstring> 
    4 #include <memory.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_main.cxx                                       // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "AP_error.hxx" 
     12#include "ap_main.hxx" 
     13#include "ap_tree_nlen.hxx" 
     14 
     15#include <TreeDisplay.hxx> 
     16 
    517#include <iostream> 
    6  
    7 #include <arbdb.h> 
    8 #include <arbdbt.h> 
    9 #include <awt_tree.hxx> 
    10  
    11 #include "AP_buffer.hxx" 
    12 #include "parsimony.hxx" 
    13 #include "AP_error.hxx" 
    1418 
    1519using namespace std; 
     
    7983***************/ 
    8084 
    81 AP_main::AP_main(void) { 
     85AP_main::AP_main() { 
    8286    memset((char *)this,0,sizeof(AP_main)); 
    8387} 
    8488 
    85 AP_main::~AP_main(void) { 
    86     if (use) delete use; 
     89AP_main::~AP_main() { 
    8790    if (stack) delete stack; 
    8891} 
     
    9598} 
    9699 
    97 void AP_main::user_push(void) { 
     100void AP_main::user_push() { 
    98101    this->user_push_counter = stack_level + 1; 
    99102    this->push(); 
    100103} 
    101104 
    102 void AP_main::user_pop(void) { 
     105void AP_main::user_pop() { 
    103106    // checks if user_pop possible 
    104107    if (user_push_counter == stack_level) { 
     
    110113} 
    111114 
    112 void AP_main::push(void) { 
     115void AP_main::push() { 
    113116    // if count > 1 the nodes are buffered more than once 
    114117    // WARNING:: node only has to be buffered once in the stack 
     
    121124} 
    122125 
    123 void AP_main::pop(void) { 
    124     AP_tree *knoten; 
     126void AP_main::pop() { 
     127    AP_tree_nlen *knoten; 
    125128    if (!stack) { 
    126129        new AP_ERR("AP_main::pop()","Stack underflow !"); 
     
    147150} 
    148151 
    149 void AP_main::clear(void) { 
     152void AP_main::clear() { 
    150153    // removes count elements from the list 
    151154    // because the current tree is used 
     
    155158    // previous stack 
    156159 
    157     AP_tree * knoten; 
    158     AP_main_stack * new_stack; 
     160    AP_tree_nlen  *knoten; 
     161    AP_main_stack *new_stack; 
     162 
    159163    if (!stack) { 
    160164        new AP_ERR("AP_main::clear","Stack underflow !"); 
     
    166170                while (stack->size() > 0) { 
    167171                    knoten = stack->pop(); 
    168                     //if (buffer_cout == AP_TRUE) knoten->printl(); 
    169172                    knoten->clear(stack_level,user_push_counter); 
    170173                } 
     
    195198} 
    196199 
    197 void AP_main::push_node(AP_tree * node,AP_STACK_MODE mode) { 
     200void AP_main::push_node(AP_tree_nlen *node, AP_STACK_MODE mode) { 
    198201    // 
    199202    //  stores node 
     
    212215} 
    213216 
    214  
    215 void AP_main::set_tree_root(AP_tree *new_root) { 
    216     // removes old root and sets it 
    217     // to the father of the new_root 
    218     *ap_main->tree_root = new_root; 
    219 } 
     217AP_tree_nlen *AP_main::get_root_node() { 
     218    return DOWNCAST(AP_tree_nlen*, agt->get_root_node()); 
     219} 
     220 
     221void AP_main::set_tree_root(AWT_graphic_tree *agt_) { 
     222    ap_assert(agt == 0 && agt_ != 0);               // do only once 
     223    agt = agt_; 
     224} 
     225 
     226const char *AP_main::get_aliname() const { 
     227    return agt->tree_static->get_aliview()->get_aliname(); 
     228} 
     229 
  • trunk/PARSIMONY/AP_tree_edge.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <math.h> 
    4 #include <iostream> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_tree_edge.cxx                                  // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Coded by Ralf Westram (coder@reallysoft.de) in Summer 1995    // 
     7//   Institute of Microbiology (Technical University Munich)       // 
     8//   http://www.arb-home.de/                                       // 
     9//                                                                 // 
     10// =============================================================== // 
     11 
     12#include "ap_tree_nlen.hxx" 
     13 
     14#include <AP_filter.hxx> 
     15 
     16#include <cmath> 
    517#include <iomanip> 
    6 #include <memory.h> 
    7 #include <arbdb.h> 
    8 #include <arbdbt.h> 
    9 #include <string.h> 
    10 #include <awt_tree.hxx> 
    11  
    12 #include "AP_buffer.hxx" 
    13 #include "parsimony.hxx" 
    14 #include "ap_tree_nlen.hxx" 
    15  
    16 // #include <aw_root.hxx> 
    1718 
    1819using namespace std; 
     
    444445} 
    445446 
    446 int AP_tree_edge::dumpChain(void) const 
     447int AP_tree_edge::dumpChain() const 
    447448{ 
    448449    //    cout << this << '\n'; 
     
    479480} 
    480481 
    481 long AP_tree_edge::sizeofChain(void){ 
     482long AP_tree_edge::sizeofChain(){ 
    482483    AP_tree_edge *f; 
    483484    long c= 0; 
     
    553554    tree optimization 
    554555**************************/ 
    555 void ap_init_bootstrap_remark(AP_tree_nlen *son_node){ 
    556     int seq_len = son_node->sequence->root->filter->real_len; 
    557     AP_sequence::static_mutation_per_site[0] = (char *)GB_calloc(sizeof(char),seq_len); 
    558     AP_sequence::static_mutation_per_site[1] = (char *)GB_calloc(sizeof(char),seq_len); 
    559     AP_sequence::static_mutation_per_site[2] = (char *)GB_calloc(sizeof(char),seq_len); 
    560 } 
    561  
    562 double fak(int n,int m){ 
    563     double res = 1.0; 
    564     while (n>m){ 
    565         res *= n; 
    566         n--; 
    567     } 
    568     return res; 
    569 } 
    570  
    571  
    572 double ap_calc_bootstrap_remark_sub(int seq_len, char *old, char *ne){ 
     556 
     557class MutationsPerSite { 
     558    char   *Data; 
     559    size_t  length; 
     560 
     561public: 
     562    MutationsPerSite(size_t len) 
     563        : Data((char*)GB_calloc(sizeof(char), len*3)) 
     564        , length(len) 
     565    { } 
     566    ~MutationsPerSite() { 
     567        free(Data); 
     568    } 
     569 
     570    char *data(int block) { 
     571        ap_assert(block >= 0 && block<3); 
     572        return Data+block*length; 
     573    } 
     574    const char *data(int block) const { 
     575        return const_cast<MutationsPerSite*>(this)->data(block); 
     576    } 
     577}; 
     578 
     579double ap_calc_bootstrap_remark_sub(int seq_len, const char *old, const char *ne){ 
    573580    int i; 
    574581    int sum[3]; 
     
    653660} 
    654661 
    655 void ap_calc_bootstrap_remark(AP_tree_nlen *son_node,AP_BL_MODE mode){ 
     662static void ap_calc_bootstrap_remark(AP_tree_nlen *son_node, AP_BL_MODE mode, const MutationsPerSite& mps) { 
    656663    if (!son_node->is_leaf){ 
    657         int seq_len = son_node->sequence->root->filter->real_len; 
    658         float one = ap_calc_bootstrap_remark_sub(seq_len, 
    659                                                  &AP_sequence::static_mutation_per_site[0][0], 
    660                                                  &AP_sequence::static_mutation_per_site[1][0]); 
    661         float two = ap_calc_bootstrap_remark_sub(seq_len, 
    662                                                  &AP_sequence::static_mutation_per_site[0][0], 
    663                                                  &AP_sequence::static_mutation_per_site[2][0]); 
     664        size_t seq_len = son_node->get_seq()->get_sequence_length(); 
     665        float  one     = ap_calc_bootstrap_remark_sub(seq_len, mps.data(0), mps.data(1)); 
     666        float  two     = ap_calc_bootstrap_remark_sub(seq_len, mps.data(0), mps.data(2)); 
     667         
    664668        if ((mode & AP_BL_BOOTSTRAP_ESTIMATE) == AP_BL_BOOTSTRAP_ESTIMATE){ 
    665669            one = one * two;    // assume independent bootstrap values for both nnis 
    666         }else{ 
     670        } 
     671        else { 
    667672            if (two<one) one = two; // dependent bootstrap values, take minimum (safe) 
    668673        } 
     
    677682        freedup(son_node->Brother()->remark_branch, text); 
    678683    } 
    679      
    680     freeset(AP_sequence::static_mutation_per_site[0], NULL); 
    681     freeset(AP_sequence::static_mutation_per_site[1], NULL); 
    682     freeset(AP_sequence::static_mutation_per_site[2], NULL); 
    683684} 
    684685 
    685686 
    686687void ap_calc_leaf_branch_length(AP_tree_nlen *leaf){ 
    687     AP_FLOAT Seq_len = leaf->sequence->real_len(); 
     688    AP_FLOAT Seq_len = leaf->get_seq()->weighted_base_count(); 
    688689    if (Seq_len <=1.0) Seq_len = 1.0; 
    689690 
     
    719720    static double s_old = 0.0; 
    720721 
    721     AP_FLOAT seq_len = son->sequence->real_len(); 
     722    AP_FLOAT seq_len = son->get_seq()->weighted_base_count(); 
    722723    if (seq_len <=1.0) seq_len = 1.0; 
    723724    blen *= 0.5 / seq_len * 2.0;        // doubled counted sum * corr 
     
    819820            } 
    820821        } 
    821         if (mode & AP_BL_BOOTSTRAP_LIMIT){ 
     822        if (mode & AP_BL_BOOTSTRAP_LIMIT) { 
    822823            if (fath->father){ 
    823824                son->set_root(); 
    824825                new_parsimony = rootNode()->costs(); 
    825826            } 
    826             ap_init_bootstrap_remark(son); 
    827         } 
    828         new_parsimony = follow->nni(new_parsimony, mode); 
    829         if (mode & AP_BL_BOOTSTRAP_LIMIT){ 
    830             ap_calc_bootstrap_remark(son,mode); 
    831         } 
     827 
     828            MutationsPerSite mps(son->get_seq()->get_sequence_length()); 
     829            new_parsimony = follow->nni_mutPerSite(new_parsimony, mode, &mps); 
     830            ap_calc_bootstrap_remark(son, mode, mps); 
     831        } 
     832        else { 
     833            new_parsimony = follow->nni(new_parsimony, mode); 
     834        } 
     835         
    832836        if (useStatus ? aw_status(++count/(double)cs) : aw_status()) { Abort = 1; break; } 
    833837    } 
     
    857861int AP_tree_edge::nodesInTree; 
    858862 
    859 AP_FLOAT AP_tree_edge::nni(AP_FLOAT pars_one, AP_BL_MODE mode) 
    860 { 
    861     AP_tree_nlen *root = (AP_tree_nlen *) (*ap_main->tree_root); 
     863AP_FLOAT AP_tree_edge::nni_mutPerSite(AP_FLOAT pars_one, AP_BL_MODE mode, MutationsPerSite *mps) 
     864{ 
     865    AP_tree_nlen *root = rootNode(); 
    862866 
    863867    if (node[0]->is_leaf || node[1]->is_leaf) { // a son at root 
     
    890894    int     betterValueFound = 0; 
    891895    {               // ******** original tree 
    892         if ( (mode & AP_BL_BOOTSTRAP_LIMIT)){ 
     896        if ((mode & AP_BL_BOOTSTRAP_LIMIT)) { 
    893897            root->costs(); 
    894             char *ms = AP_sequence::static_mutation_per_site[0]; 
    895             AP_sequence::mutation_per_site = ms; 
    896898            son->unhash_sequence(); 
    897             son->father->unhash_sequence(); 
     899            son->Father()->unhash_sequence(); 
    898900            ap_assert(!son->father->father); 
    899901            AP_tree_nlen *brother = son->Brother(); 
    900902            brother->unhash_sequence(); 
    901             pars_one = 0.0; 
    902         } 
    903         if (pars_one==0.0) pars_one = root->costs(); 
     903 
     904            ap_assert(mps); 
     905            pars_one = root->costs(mps->data(0)); 
     906        } 
     907        else if (pars_one==0.0) { 
     908            pars_one = root->costs(); 
     909        } 
    904910    } 
    905911    {               // ********* first nni 
    906912        ap_main->push(); 
    907913        son->swap_assymetric(AP_LEFT); 
    908         char *ms = AP_sequence::static_mutation_per_site[1]; 
    909         AP_sequence::mutation_per_site = ms; 
    910         pars_two = root->costs(); 
     914        pars_two = root->costs(mps ? mps->data(1) : NULL); 
    911915 
    912916        if (pars_two <= parsbest){ 
    913             if ((mode & AP_BL_NNI_ONLY)==0) ap_main->pop(); 
    914             else                ap_main->clear(); 
    915             parsbest = pars_two; 
     917            if ((mode & AP_BL_NNI_ONLY) == 0) ap_main->pop(); 
     918            else                              ap_main->clear(); 
     919             
     920            parsbest         = pars_two; 
    916921            betterValueFound = (int)(pars_one-pars_two); 
    917         }else{ 
     922        } 
     923        else { 
    918924            ap_main->pop(); 
    919925        } 
     
    922928        ap_main->push(); 
    923929        son->swap_assymetric(AP_RIGHT); 
    924         char *ms = AP_sequence::static_mutation_per_site[2]; 
    925         AP_sequence::mutation_per_site = ms; 
    926         pars_three = root->costs(); 
     930        pars_three = root->costs(mps ? mps->data(2) : NULL); 
    927931 
    928932        if (pars_three <= parsbest){ 
    929             if ((mode & AP_BL_NNI_ONLY)==0) ap_main->pop(); 
    930             else                ap_main->clear(); 
    931             parsbest = pars_three; 
     933            if ((mode & AP_BL_NNI_ONLY) == 0) ap_main->pop(); 
     934            else                              ap_main->clear(); 
     935             
     936            parsbest         = pars_three; 
    932937            betterValueFound = (int)(pars_one-pars_three); 
    933         }else{ 
     938        } 
     939        else { 
    934940            ap_main->pop(); 
    935941        } 
    936         AP_sequence::mutation_per_site = 0; 
    937942    } 
    938943 
     
    10291034    } 
    10301035} 
     1036 
  • trunk/PARSIMONY/AP_tree_nlen.cxx

    r6234 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 // #include <malloc.h> 
    4 #include <string.h> 
    5 #include <iostream> 
    6 #include <math.h> 
    7 #include <arbdb.h> 
    8 #include <arbdbt.h> 
    9 // 
    10 #include <awt_tree.hxx> 
    11 #include <awt_seq_dna.hxx> 
    12 #include "AP_buffer.hxx" 
    13 #include "parsimony.hxx" 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : AP_tree_nlen.cxx                                  // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Coded by Ralf Westram (coder@reallysoft.de) in Summer 1995    // 
     7//   Institute of Microbiology (Technical University Munich)       // 
     8//   http://www.arb-home.de/                                       // 
     9//                                                                 // 
     10// =============================================================== // 
     11 
     12#include "ap_tree_nlen.hxx" 
    1413#include "pars_debug.hxx" 
    15 #include "ap_tree_nlen.hxx" 
    16 // #include <aw_root.hxx> 
     14 
     15#include <AP_seq_dna.hxx> 
    1716 
    1817using namespace std; 
    1918 
    20 #define ap_assert(x) arb_assert(x) 
     19// #define ap_assert(x) arb_assert(x) 
    2120 
    2221// --------------------------------- 
     
    3231AP_tree_nlen::AP_tree_nlen(AP_tree_root *Tree_root) 
    3332    : AP_tree(Tree_root) 
     33    , kernighan(AP_NONE) 
     34    , distance(INT_MAX) 
     35    , mutation_rate(0) 
    3436{ 
    35     //    this->init(); 
    36     kernighan = AP_NONE; 
    37     sequence  = NULL; 
    38  
    39     edge[0]  = edge[1] = edge[2] = NULL; 
     37    edge[0]  = edge[1]  = edge[2]  = NULL; 
    4038    index[0] = index[1] = index[2] = 0; 
    41     distance = INT_MAX; 
    42  
    43     //    cout << "AP_tree_nlen-constructor\n"; 
    44 } 
    45  
    46 AP_tree *AP_tree_nlen::dup(void) 
    47 { 
    48     return (AP_tree *) new AP_tree_nlen(this->tree_root); 
    49 } 
    50  
    51 AP_UPDATE_FLAGS AP_tree_nlen::check_update(void) 
    52 { 
    53     AP_UPDATE_FLAGS res = this->AP_tree::check_update(); 
    54  
    55     if (res == AP_UPDATE_RELOADED) { 
    56         return AP_UPDATE_OK; 
    57     } 
    58  
    59     return res; 
     39} 
     40 
     41AP_tree_nlen *AP_tree_nlen::dup() const { 
     42    return new AP_tree_nlen(get_tree_root()); 
     43} 
     44 
     45AP_UPDATE_FLAGS AP_tree_nlen::check_update() { 
     46    AP_UPDATE_FLAGS res = AP_tree::check_update(); 
     47 
     48    return res == AP_UPDATE_RELOADED ? AP_UPDATE_OK : res; 
    6049} 
    6150 
     
    7867 
    7968    if (is_leaf == GB_TRUE) { 
    80         if (tree->sequence) { 
    81             this->sequence = tree->sequence; 
    82         } 
    83         else { 
    84             cout << "empty sequence at leaf"; 
    85             this->sequence = 0; 
    86         } 
     69        ap_assert(tree->get_seq()); /* oops - AP_tree_nlen expects to have sequences at leafs! 
     70                                     * did you forget to remove_leafs() ? */ 
     71 
     72        set_seq(tree->get_seq()); 
     73        // dangerous - no copy, just moves pointer 
     74        // will result in undefined behavior 
     75         
     76        ap_assert(0); //  this will not work, but is only used in GA_genetic. 
     77                      //  Use some kind of SmartPtr there! 
     78 
     79        // if (tree->sequence) { 
     80        // this->sequence = tree->sequence; 
     81        // } 
     82        // else { 
     83        // cout << "empty sequence at leaf"; 
     84        // this->sequence = 0; 
     85        // } 
    8786    } 
    8887} 
     
    149148    for (e=0; e<3; e++) if (edge[e]==NULL) return e; 
    150149 
    151     cout << "No unused edge found at" << *this << '\n'; 
     150    // cout << "No unused edge found at" << *this << '\n'; 
    152151    return -1; 
    153152} 
     
    162161        } 
    163162    } 
    164     cout << "AP_tree_nlen::edgeTo: " << *this << "\nhas no edge to " << *neighbour << '\n'; 
     163    // cout << "AP_tree_nlen::edgeTo: " << *this << "\nhas no edge to " << *neighbour << '\n'; 
    165164    ap_assert(0); 
    166165    return NULL; 
     
    211210********************************************/ 
    212211 
     212#if defined(CHECK_TREE_STRUCTURE) 
     213 
     214void AP_tree_nlen::assert_edges_valid() const { 
     215    if (!is_root()) {                               // root has no edges 
     216        if (Father()->is_root()) {                  // sons of root have one edge between them 
     217            ap_assert(edgeTo(Brother()) == Brother()->edgeTo(this)); 
     218        } 
     219        else { 
     220            ap_assert(edgeTo(Father()) == Father()->edgeTo(this)); 
     221            if (!is_leaf) { 
     222                ap_assert(edgeTo(Leftson()) == Leftson()->edgeTo(this)); 
     223                ap_assert(edgeTo(Rightson()) == Rightson()->edgeTo(this)); 
     224            } 
     225        } 
     226    } 
     227 
     228    if (!is_leaf) { 
     229        Leftson()->assert_edges_valid(); 
     230        Rightson()->assert_edges_valid(); 
     231    } 
     232} 
     233 
     234void AP_tree_nlen::assert_valid() const { 
     235    assert_edges_valid(); 
     236    AP_tree::assert_valid(); 
     237} 
     238 
     239#endif 
     240 
    213241void AP_tree_nlen::insert(AP_tree *new_brother) { 
    214242    //  inserts a node at the father-edge of new_brother 
    215243 
    216     AP_tree      *pntr; 
     244    AP_tree_nlen *pntr; 
    217245    AP_tree_nlen *newBrother = dynamic_cast<AP_tree_nlen*>(new_brother); 
    218246    ap_assert(new_brother); 
     
    220248    AP_tree_edge *oldEdge; 
    221249 
    222     ap_main->push_node(new_brother, STRUCTURE); 
     250    ap_main->push_node(newBrother, STRUCTURE); 
    223251 
    224252    if (new_brother->father) { 
    225         ap_main->push_node(new_brother->father, BOTH); 
    226         for (pntr = new_brother->father->father; pntr; pntr = pntr->father) { 
     253        ap_main->push_node(newBrother->Father(), BOTH); 
     254        AP_tree_nlen *newGrandpa = newBrother->Father()->Father(); 
     255        for (pntr = newGrandpa; pntr; pntr = pntr->Father()) { 
    227256            ap_main->push_node(pntr, SEQUENCE); 
    228257        } 
    229258 
    230         if (new_brother->father->father) { 
     259        if (newGrandpa) { 
    231260            oldEdge = newBrother->edgeTo(newBrother->Father())->unlink(); 
    232261            AP_tree::insert(new_brother); 
     
    242271        new AP_tree_edge(Father(),newBrother); 
    243272    } 
    244     else { // insert at root 
    245         AP_tree_nlen *lson = newBrother->Leftson(); 
    246         AP_tree_nlen *rson = newBrother->Rightson(); 
    247  
    248         ap_main->push_node(lson, STRUCTURE); 
    249         ap_main->push_node(rson, STRUCTURE); 
    250  
    251         oldEdge = lson->edgeTo(rson)->unlink(); 
     273    else {                                          // insert at root 
     274        if (newBrother->is_leaf) {                  // tree contains exactly one species (only legal during insert) 
     275            AP_tree::insert(new_brother); 
     276            new AP_tree_edge(newBrother, this);    // build the root edge 
     277        } 
     278        else { 
     279            AP_tree_nlen *lson = newBrother->Leftson(); 
     280            AP_tree_nlen *rson = newBrother->Rightson(); 
     281 
     282            ap_main->push_node(lson, STRUCTURE); 
     283            ap_main->push_node(rson, STRUCTURE); 
     284 
     285            oldEdge = lson->edgeTo(rson)->unlink(); 
    252286#if defined(DEBUG) 
    253         cout << "old Edge = " << oldEdge << '\n'; 
     287            cout << "old Edge = " << oldEdge << '\n'; 
    254288#endif // DEBUG 
    255289 
    256         AP_tree::insert(new_brother); 
    257  
    258         oldEdge->relink(this,newBrother); 
    259         new AP_tree_edge(newBrother,rson); 
    260         new AP_tree_edge(newBrother,lson); 
    261     } 
    262 } 
    263  
    264 void AP_tree_nlen::remove(void) { 
     290            AP_tree::insert(new_brother); 
     291 
     292            oldEdge->relink(this,newBrother); 
     293            new AP_tree_edge(newBrother,rson); 
     294            new AP_tree_edge(newBrother,lson); 
     295        } 
     296    } 
     297} 
     298 
     299void AP_tree_nlen::remove() { 
    265300    // Removes the node and its father from the tree: 
    266301    // 
     
    280315    // memory location was stored in the tree-stack. 
    281316 
    282     AP_tree      *pntr; 
     317    AP_tree_nlen *oldBrother = Brother(); 
     318 
     319    ASSERT_VALID_TREE(this); 
     320 
     321    ap_assert(father); // can't remove complete tree,  
     322 
     323    ap_main->push_node(this, STRUCTURE); 
     324    ap_main->push_node(oldBrother, STRUCTURE); 
     325 
     326    AP_tree_nlen *grandPa = Father()->Father(); 
     327    for (AP_tree_nlen *pntr = grandPa; pntr; pntr = pntr->Father()) { 
     328        ap_main->push_node(pntr, SEQUENCE); 
     329    } 
     330 
    283331    AP_tree_edge *oldEdge; 
    284     AP_tree_nlen *oldBrother = Brother(); 
    285  
    286     ap_assert(father); 
    287  
    288     ap_main->push_node(this, STRUCTURE); 
    289     ap_main->push_node(brother(), STRUCTURE); 
    290  
    291     for (pntr = father->father; pntr; pntr = pntr->father) { 
    292         ap_main->push_node(pntr, SEQUENCE); 
    293     } 
    294  
    295     if (father->father) { 
    296         AP_tree_nlen *grandPa = Father()->Father(); 
    297  
    298         ap_main->push_node(father, BOTH); 
     332    if (grandPa) { 
     333        ASSERT_VALID_TREE(grandPa); 
     334 
     335        ap_main->push_node(Father(), BOTH); 
    299336        ap_main->push_node(grandPa, STRUCTURE); 
    300337 
    301         edgeTo(Father())->unlink(); 
    302         Father()->edgeTo(oldBrother)->unlink(); 
     338        edgeTo(Father())->unlink();                 // LOST_EDGE 
     339        Father()->edgeTo(oldBrother)->unlink();     // LOST_EDGE 
    303340 
    304341        if (grandPa->father) { 
     
    315352            oldEdge->relink(oldBrother,uncle); 
    316353        } 
    317     } 
    318     else { // remove son of root 
    319         AP_tree_nlen *lson = Brother()->Leftson(); 
    320         AP_tree_nlen *rson = Brother()->Rightson(); 
    321  
    322         ap_assert(lson && rson); 
    323          
    324         ap_main->push_node(lson,STRUCTURE); 
    325         ap_main->push_node(rson,STRUCTURE); 
    326         ap_main->push_node(father, ROOT); 
    327  
    328         ap_main->set_tree_root(oldBrother); 
    329  
    330         //  delete edgeTo(oldBrother); 
    331         oldBrother->edgeTo(lson)->unlink(); 
    332         //  delete oldBrother->edgeTo(lson); 
    333         oldEdge = oldBrother->edgeTo(rson)->unlink(); 
    334         AP_tree::remove(); 
    335         oldEdge->relink(lson,rson); 
    336     } 
     354        ASSERT_VALID_TREE(grandPa); 
     355    } 
     356    else {                                          // remove son of root 
     357        AP_tree_nlen *oldRoot = Father(); 
     358        ASSERT_VALID_TREE(oldRoot); 
     359 
     360        if (oldBrother->is_leaf) { 
     361            //           root                                                                     
     362            //            oo 
     363            //           o  o 
     364            //          o    o 
     365            // oldBrother --- this         ----->   NULL 
     366            // 
     367            ap_main->push_node(oldRoot, ROOT); 
     368 
     369            edgeTo(oldBrother)->unlink();           // LOST_EDGE 
     370 
     371#if defined(DEBUG) 
     372            AP_tree_root *troot = get_tree_root(); 
     373#endif // DEBUG 
     374            AP_tree::remove(); 
     375            ap_assert(!troot->get_root_node()); // tree should have been removed 
     376        } 
     377        else { 
     378            // 
     379            //           root 
     380            //            oo                                                              .  
     381            //           o  o                                     root (=oldBrother) 
     382            //          o    o                                     oo                      . 
     383            // oldBrother --- this          ----->                o  o                     . 
     384            //       /\                                          o    o                    . 
     385            //      /  \                                     lson ----- rson                               
     386            //     /    \                                                                . 
     387            //    lson  rson 
     388            //  
     389            AP_tree_nlen *lson = oldBrother->Leftson(); 
     390            AP_tree_nlen *rson = oldBrother->Rightson(); 
     391 
     392            ap_assert(lson && rson); 
     393 
     394            ap_main->push_node(lson,STRUCTURE); 
     395            ap_main->push_node(rson,STRUCTURE); 
     396            ap_main->push_node(oldRoot, ROOT); 
     397 
     398            // get_tree_root()->change_root(get_father(), oldBrother); 
     399            // don't do this here (already done in AP_tree::remove()) 
     400 
     401            edgeTo(oldBrother)->unlink();           // LOST_EDGE 
     402            oldBrother->edgeTo(lson)->unlink();     // LOST_EDGE 
     403             
     404            oldEdge = oldBrother->edgeTo(rson)->unlink(); 
     405            AP_tree::remove(); 
     406            oldEdge->relink(lson,rson); 
     407 
     408            ap_assert(lson->get_tree_root()->get_root_node() == oldBrother); 
     409            ASSERT_VALID_TREE(oldBrother); 
     410        } 
     411    } 
     412 
    337413} 
    338414 
     
    357433            ap_main->push_node(this, BOTH); 
    358434            ap_main->push_node(movedSon,STRUCTURE); 
    359             ap_main->push_node(father, SEQUENCE); 
     435            ap_main->push_node(Father(), SEQUENCE); 
    360436            ap_main->push_node(nephew, STRUCTURE); 
    361437            ap_main->push_node(oldBrother, BOTH); 
     
    372448    else { 
    373449        ap_main->push_node(this, BOTH); 
    374         ap_main->push_node(father, BOTH); 
     450        ap_main->push_node(Father(), BOTH); 
    375451        ap_main->push_node(oldBrother, STRUCTURE); 
    376452        ap_main->push_node(movedSon,STRUCTURE); 
     
    378454        // from father to root buffer all sequences 
    379455 
    380         for (AP_tree *pntr = father->father; pntr ; pntr = pntr->father) { 
     456        for (AP_tree_nlen *pntr = Father()->Father(); pntr ; pntr = pntr->Father()) { 
    381457            ap_main->push_node(pntr, SEQUENCE); 
    382458        } 
     
    401477    // from this to root buffer the nodes 
    402478    ap_main->push_node(this , STRUCTURE); 
    403      
    404     AP_tree *old_brother = 0; 
    405     AP_tree *old_root; 
     479 
     480    AP_tree_nlen *old_brother = 0; 
     481    AP_tree_nlen *old_root    = 0; 
    406482    { 
    407         AP_tree *pntr; 
    408         for (pntr = father; pntr->father; pntr = pntr->father) { 
     483        AP_tree_nlen *pntr; 
     484        for (pntr = Father(); pntr->father; pntr = pntr->Father()) { 
    409485            ap_main->push_node(pntr, BOTH); 
    410486            old_brother = pntr; 
     
    414490 
    415491    if (old_brother) { 
    416         old_brother = old_brother->brother(); 
     492        old_brother = old_brother->Brother(); 
    417493        ap_main->push_node(old_brother , STRUCTURE); 
    418494    } 
     
    443519    ap_assert(new_brother->father); 
    444520 
    445     AP_tree *pntr; 
     521    AP_tree_nlen *pntr; 
    446522 
    447523    ap_main->push_node(this , STRUCTURE); 
    448     ap_main->push_node(brother(), STRUCTURE); 
     524    ap_main->push_node(Brother(), STRUCTURE); 
    449525 
    450526    if (father->father) { 
    451         AP_tree *grandpa = father->father; 
    452  
    453         ap_main->push_node(father , BOTH); 
     527        AP_tree_nlen *grandpa = Father()->Father(); 
     528 
     529        ap_main->push_node(Father(), BOTH); 
    454530 
    455531        if (grandpa->father) { 
    456532            ap_main->push_node(grandpa, BOTH); 
    457             for  (pntr = grandpa->father; pntr; pntr = pntr->father) { 
     533            for  (pntr = grandpa->Father(); pntr; pntr = pntr->Father()) { 
    458534                ap_main->push_node( pntr, SEQUENCE); 
    459535            } 
     
    461537        else { // grandson of root 
    462538            ap_main->push_node(grandpa, ROOT); 
    463             ap_main->push_node(father->brother(), STRUCTURE); 
     539            ap_main->push_node(Father()->Brother(), STRUCTURE); 
    464540        } 
    465541    } 
    466542    else { // son of root 
    467         ap_main->push_node(father , ROOT); 
    468  
    469         if (!brother()->is_leaf) { 
    470             ap_main->push_node(brother()->leftson, STRUCTURE); 
    471             ap_main->push_node(brother()->rightson, STRUCTURE); 
    472         } 
    473     } 
    474  
    475     ap_main->push_node(new_brother , STRUCTURE); 
     543        ap_main->push_node(Father(), ROOT); 
     544 
     545        if (!get_brother()->is_leaf) { 
     546            ap_main->push_node(Brother()->Leftson(), STRUCTURE); 
     547            ap_main->push_node(Brother()->Rightson(), STRUCTURE); 
     548        } 
     549    } 
     550 
     551    AP_tree_nlen *newBrother = AP_TREE_NLEN_CAST(new_brother); 
     552     
     553    ap_main->push_node(newBrother , STRUCTURE); 
    476554    if (new_brother->father) { 
    477555        if (new_brother->father->father) { 
    478             ap_main->push_node(new_brother->father , BOTH); 
     556            ap_main->push_node(newBrother->Father(), BOTH); 
    479557        } 
    480558        else { // move to son of root 
    481             ap_main->push_node(new_brother->father , BOTH); 
    482             ap_main->push_node(new_brother->brother(), STRUCTURE); 
    483         } 
    484  
    485         for  (pntr = new_brother->father->father; pntr; pntr = pntr->father) { 
    486             ap_main->push_node( pntr, SEQUENCE); 
     559            ap_main->push_node(newBrother->Father(), BOTH); 
     560            ap_main->push_node(newBrother->Brother(), STRUCTURE); 
     561        } 
     562 
     563        for (pntr = newBrother->Father()->Father(); pntr; pntr = pntr->Father()) { 
     564            ap_main->push_node(pntr, SEQUENCE); 
    487565        } 
    488566    } 
    489567 
    490568    AP_tree_nlen *thisFather        = Father(); 
    491     AP_tree_nlen *newBrother        = (AP_tree_nlen*)new_brother; 
    492569    AP_tree_nlen *grandFather       = thisFather->Father(); 
    493570    AP_tree_nlen *oldBrother        = Brother(); 
     
    616693} 
    617694 
    618 /*----------------------- 
    619   costs 
    620   -----------------------*/ 
    621  
    622 AP_FLOAT AP_tree_nlen::costs(void) { /* cost of a tree (number of changes ..) */ 
    623     if (! this->tree_root->sequence_template) return 0.0; 
    624     this->parsimony_rek(); 
    625     return (AP_FLOAT)this->mutation_rate; 
    626 } 
    627  
    628695/******************************************* 
    629696 
     
    638705 
    639706void AP_tree_nlen::unhash_sequence() { 
    640     //removes the current sequence 
    641     //(not leaf) 
    642  
    643     if (sequence != 0) { 
    644         if (!is_leaf) { 
    645             sequence->is_set_flag = AP_FALSE; 
    646         } 
    647     } 
    648  
    649     return; 
     707    // removes the sequence from inner node (not for leafs!) 
     708    AP_sequence *sequence = get_seq(); 
     709    if (sequence && !is_leaf) sequence->forget_sequence(); 
    650710} 
    651711 
     
    655715    // according if user_buffer is greater than datum 
    656716 
    657     //    cout << "clear\n"; 
    658  
    659717    AP_tree_buffer * buff; 
    660718    AP_BOOL         result; 
     
    698756    if (this->stack_level == datum) { 
    699757        AP_tree_buffer *last_buffer = stack.get_first(); 
    700         if (sequence &&(mode & SEQUENCE)) sequence->is_set_flag = AP_FALSE; 
     758        AP_sequence    *sequence    = get_seq(); 
     759 
     760        if (sequence && (mode & SEQUENCE)) sequence->forget_sequence(); 
    701761        if (0 == (mode & ~last_buffer->mode)) { // already buffered 
    702762            return AP_FALSE; 
     
    717777 
    718778    if ( (mode & STRUCTURE) && !(new_buff->mode & STRUCTURE) ) { 
    719         //  cout << "push structure " << *this << '\n'; 
    720         new_buff->father   = father; 
    721         new_buff->leftson  = leftson; 
    722         new_buff->rightson = rightson; 
     779        new_buff->father   = get_father(); 
     780        new_buff->leftson  = get_leftson(); 
     781        new_buff->rightson = get_rightson(); 
    723782        new_buff->leftlen  = leftlen; 
    724783        new_buff->rightlen = rightlen; 
     784        new_buff->root     = get_tree_root(); 
    725785        new_buff->gb_node  = gb_node; 
    726786        new_buff->distance = distance; 
     
    736796 
    737797    if ( (mode & SEQUENCE) && !(new_buff->mode & SEQUENCE) ) { 
    738         if (sequence) { 
    739             new_buff->sequence      = sequence; 
    740             new_buff->mutation_rate = mutation_rate; 
    741             mutation_rate           = 0.0; 
    742             sequence                = 0; 
    743         } 
    744         else { 
    745             new_buff->sequence = 0; 
    746             AW_ERROR("Sequence not found %s",this->name); 
    747         } 
     798        AP_sequence *sequence   = take_seq(); 
     799        new_buff->sequence      = sequence; 
     800        new_buff->mutation_rate = mutation_rate; 
     801        mutation_rate           = 0.0; 
    748802    } 
    749803 
     
    765819 
    766820    if (mode&STRUCTURE) { 
    767         //  cout << "pop structure " << this << '\n'; 
    768  
    769821        father   = buff->father; 
    770822        leftson  = buff->leftson; 
     
    772824        leftlen  = buff->leftlen; 
    773825        rightlen = buff->rightlen; 
     826        set_tree_root(buff->root); 
    774827        gb_node  = buff->gb_node; 
    775828        distance = buff->distance; 
     
    789842 
    790843    if (mode&SEQUENCE) { 
    791         if (sequence) delete sequence; 
    792  
    793         sequence      = buff->sequence; 
     844        replace_seq(buff->sequence); 
    794845        mutation_rate = buff->mutation_rate; 
    795846    } 
    796847 
    797848    if (ROOT==mode) { 
    798         //  cout << "root popped:" << this << "\n"; 
    799         ap_main->set_tree_root(this); 
     849        buff->root->change_root(buff->root->get_root_node(), this); 
    800850    } 
    801851 
     
    808858********************************************************/ 
    809859 
    810 void AP_tree_nlen::parsimony_rek(void) 
    811 { 
    812     if (sequence && sequence->is_set_flag) return; 
     860void AP_tree_nlen::parsimony_rek(char *mutPerSite) { 
     861    AP_sequence *sequence = get_seq(); 
    813862 
    814863    if (is_leaf) { 
    815         sequence->is_set_flag = AP_TRUE; 
    816         return; 
    817     } 
    818  
    819     if (!Leftson()->sequence || !Leftson()->sequence->is_set_flag  ) Leftson()->parsimony_rek(); 
    820     if (!Rightson()->sequence|| !Rightson()->sequence->is_set_flag ) Rightson()->parsimony_rek(); 
    821  
    822     if (!Leftson()->sequence->is_set_flag || !Rightson()->sequence->is_set_flag) { 
    823         AW_ERROR("AP_tree_nlen::parsimony_rek:  Cannot set sequence"); 
    824         return; 
    825     } 
    826  
    827     if (sequence == 0) sequence = tree_root->sequence_template->dup(); 
    828  
    829     AP_FLOAT mutations_for_combine = sequence->combine(Leftson()->sequence, Rightson()->sequence); 
    830     mutation_rate                  = Leftson()->mutation_rate + Rightson()->mutation_rate + mutations_for_combine; 
    831  
    832 #if defined(DEBUG) && 0 
    833     printf("mutation-rates: left=%f right=%f combine=%f overall=%f %s\n", 
    834            Leftson()->mutation_rate, Rightson()->mutation_rate, mutations_for_combine, mutation_rate, 
    835            fullname()); 
    836 #endif // DEBUG 
    837  
    838     sequence->is_set_flag = AP_TRUE; 
     864        ap_assert(sequence); // tree w/o aliview? 
     865        sequence->ensure_sequence_loaded(); 
     866    } 
     867    else { 
     868        if (!sequence) { 
     869            sequence = set_seq(get_tree_root()->get_seqTemplate()->dup()); 
     870            ap_assert(sequence); 
     871        } 
     872 
     873        if (!sequence->got_sequence()) { 
     874            AP_tree_nlen *lson = Leftson(); 
     875            AP_tree_nlen *rson = Rightson(); 
     876 
     877            ap_assert(lson); 
     878            ap_assert(rson); 
     879 
     880            lson->parsimony_rek(mutPerSite); 
     881            rson->parsimony_rek(mutPerSite); 
     882 
     883            AP_sequence *lseq = lson->get_seq(); 
     884            AP_sequence *rseq = rson->get_seq(); 
     885 
     886            ap_assert(lseq); 
     887            ap_assert(rseq); 
     888 
     889            AP_FLOAT mutations_for_combine = sequence->combine(lseq, rseq, mutPerSite); 
     890            mutation_rate                  = lson->mutation_rate + rson->mutation_rate + mutations_for_combine; 
     891        } 
     892    } 
     893} 
     894 
     895AP_FLOAT AP_tree_nlen::costs(char *mutPerSite) { 
     896    // returns costs of a tree ( = number of mutations) 
     897     
     898    ap_assert(get_tree_root()->get_seqTemplate());  // forgot to set_seqTemplate() ?  (previously returned 0.0 in this case) 
     899    parsimony_rek(mutPerSite); 
     900    return mutation_rate; 
    839901} 
    840902 
     
    910972    // zwei swapmoeglichkeiten initialisieren 
    911973    // 
    912     AP_tree *this_brother = this->brother(); 
     974    AP_tree *this_brother = this->get_brother(); 
    913975    if (rek_deep == 0) { 
    914976        for (i = 0; i < 8; i+=2) { 
     
    930992        } else { 
    931993            //an der Wurzel nehme linken und rechten Sohns des Bruders 
    932             if (this->brother()->is_leaf == GB_FALSE) { 
     994            if (this->get_brother()->is_leaf == GB_FALSE) { 
    933995                pars_refpntr[4] = pars_refpntr[5] = static_cast<AP_tree_nlen *>(this_brother->leftson); 
    934996                pars_refpntr[6] = pars_refpntr[7] = static_cast<AP_tree_nlen *>(this_brother->rightson); 
     
    9511013    ap_main->push(); 
    9521014    this->set_root(); 
    953     (*ap_main->tree_root)->costs(); 
     1015    rootNode()->costs(); 
    9541016 
    9551017    int             visited_subtrees = 0; 
     
    9631025        if (!pars_refpntr[i]->kernighan == AP_NONE) continue; 
    9641026        if (pars_refpntr[i]->gr.hidden) continue; 
    965         if (pars_refpntr[i]->father->gr.hidden) continue; 
     1027        if (pars_refpntr[i]->get_father()->gr.hidden) continue; 
    9661028 
    9671029        //nur wenn kein Blatt ist 
    9681030        ap_main->push(); 
    9691031        pars_refpntr[i]->swap_assymetric(pars_side_ref[i]); 
    970         pars[i] = (*ap_main->tree_root)->costs(); 
     1032        pars[i] = rootNode()->costs(); 
    9711033        if (pars[i] < pars_best) { 
    9721034            better_subtrees++; 
     
    10491111        pars_refpntr[pars_ref[i]]->swap_assymetric(pars_side_ref[pars_ref[i]]); 
    10501112        //vertausche seite 
    1051         (*ap_main->tree_root)->parsimony_rek(); 
     1113        rootNode()->parsimony_rek(); 
    10521114        switch (rek_width_type) { 
    10531115            case AP_BETTER:{ 
     
    12431305} 
    12441306 
    1245 int AP_tree_nlen::test(void) const 
    1246 { 
    1247     int edges = 0; 
    1248  
    1249     for (int e=0; e<3; e++) if (edge[e]!=NULL) edges++; 
    1250  
    1251     if (!sequence) cout << "Node" << *this << "has no sequence\n"; 
    1252  
    1253     if (father) { 
    1254         if (father->father == (AP_tree *)this) { 
    1255             cout << "Ooops! I am my own grandfather! How is this possible?\n" << 
    1256                 *this << '\n' << 
    1257                 *Father() << '\n'; 
    1258         } 
    1259  
    1260         if (is_leaf) { 
    1261             if (edges!=1) cout << "Leaf-Node" << *this << "has" << edges << " edges\n"; 
    1262         } 
    1263         else { 
    1264             if (edges!=3) cout << "Inner-Node" << *this << "has" << edges << " edges\n"; 
    1265         } 
    1266  
    1267         int e; 
    1268  
    1269         for (e=0; e<3; e++) { 
    1270             if (edge[e]) { 
    1271                 if (edge[e]->isConnectedTo(this)) { 
    1272                     AP_tree_nlen *neighbour = edge[e]->otherNode(this); 
    1273  
    1274                     if ( ! (neighbour==father || neighbour==leftson || neighbour==rightson)) { 
    1275                         if (father->father==NULL) { 
    1276                             if (!(father->leftson==neighbour || father->rightson==neighbour)) { 
    1277                                 cout << "Neighbour is not brother (at root)\n"; 
    1278                             } 
    1279                         } 
    1280                         else { 
    1281                             cout << "Edge " << edge[e] << " connects the nodes" 
    1282                                  << *this << "and" << *(edge[e]->otherNode(this)) 
    1283                                  << "(they are not neighbours)\n"; 
    1284                         } 
    1285                     } 
    1286                 } 
    1287                 else { 
    1288                     cout << "Node" << *this 
    1289                          << "is connected to wrong edge" 
    1290                          << edge[e] << '\n'; 
    1291                 } 
    1292             } 
    1293         } 
    1294     } 
    1295     else { 
    1296         if (edges) { 
    1297             cout << "Root" << *this << "has edges!\n"; 
    1298         } 
    1299     } 
    1300  
    1301     test_tree();    // AP_tree:: 
    1302  
    1303     return 0; 
    1304 } 
    1305  
    13061307const char *AP_tree_nlen::fullname() const 
    13071308{ 
     
    13321333 
    13331334 
    1334 char* AP_tree_nlen::getSequence() 
    1335 { 
    1336     char *s; 
    1337  
     1335char* AP_tree_nlen::getSequenceCopy() { 
    13381336    costs(); 
    1339     AP_sequence_parsimony *pseq = (AP_sequence_parsimony*)sequence; 
    1340     ap_assert(pseq->is_set_flag); 
    1341     s = new char[pseq->sequence_len]; 
    1342     memcpy(s,pseq->sequence,(unsigned int)pseq->sequence_len); 
     1337 
     1338    AP_sequence_parsimony *pseq = DOWNCAST(AP_sequence_parsimony*, get_seq()); 
     1339    ap_assert(pseq->got_sequence()); 
     1340 
     1341    size_t  len = pseq->get_sequence_length(); 
     1342    char   *s   = new char[len]; 
     1343    memcpy(s, pseq->get_sequence(), len); 
    13431344 
    13441345    return s; 
  • trunk/PARSIMONY/GA_genetic.cxx

    r6141 r6280  
    88#include <iostream.h> 
    99#include "AP_buffer.hxx" 
    10 #include "parsimony.hxx" 
     10#include "ap_main.hxx" 
    1111#include "ap_tree_nlen.hxx" 
    1212#include "GA_genetic.hxx" 
     
    1616 
    1717 
    18 GA_genetic::GA_genetic(void) { 
     18GA_genetic::GA_genetic() { 
    1919    gb_tree_start = 0; 
    2020    gb_tree_opt   = 0; 
     
    2727} 
    2828 
    29 GA_genetic::~GA_genetic(void) { 
     29GA_genetic::~GA_genetic() { 
    3030    if (fout) { 
    3131        if (fclose(fout) != 0) { 
  • trunk/PARSIMONY/GA_main.cxx

    r6141 r6280  
    88#include <iostream.h> 
    99#include "AP_buffer.hxx" 
    10 #include "parsimony.hxx" 
     10#include "ap_main.hxx" 
    1111#include "ap_tree_nlen.hxx" 
    1212#include "GA_genetic.hxx" 
  • trunk/PARSIMONY/GA_window.cxx

    r5390 r6280  
    1515// #include <malloc.h> 
    1616#include "AP_buffer.hxx" 
    17 #include "parsimony.hxx" 
     17#include "ap_main.hxx" 
    1818#include "ap_tree_nlen.hxx" 
    1919#include "GA_genetic.hxx" 
     
    2727extern GA_genetic *GAgenetic; 
    2828 
    29 void start_genetic_cb(AW_window *aww,AW_CL cld1) { 
    30     AWUSE(cld1); 
    31     AW_root *aw_root = aww->get_root(); 
    32     //aw_root->awar("kh/costs")->write_string((long)ap_main->combineCount); 
     29void start_genetic_cb(AW_window *,AW_CL ) { 
    3330    start_genetic(ap_main->gb_main); 
    3431} 
  • trunk/PARSIMONY/Makefile

    r6277 r6280  
    3434AP_buffer.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3535AP_buffer.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     36AP_buffer.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     37AP_buffer.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     38AP_buffer.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    3639AP_buffer.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    3740AP_buffer.o: $(ARBHOME)/INCLUDE/arb_error.h 
     41AP_buffer.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    3842AP_buffer.o: $(ARBHOME)/INCLUDE/arbdb.h 
    3943AP_buffer.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    4347AP_buffer.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    4448AP_buffer.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    45 AP_buffer.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    46 AP_buffer.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     49AP_buffer.o: $(ARBHOME)/INCLUDE/downcast.h 
    4750AP_buffer.o: $(ARBHOME)/INCLUDE/smartptr.h 
    4851 
    4952AP_main.o: AP_buffer.hxx 
    5053AP_main.o: AP_error.hxx 
    51 AP_main.o: parsimony.hxx 
     54AP_main.o: ap_main.hxx 
     55AP_main.o: ap_tree_nlen.hxx 
    5256AP_main.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    5357AP_main.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    5458AP_main.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     59AP_main.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     60AP_main.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     61AP_main.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    5562AP_main.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    5663AP_main.o: $(ARBHOME)/INCLUDE/arb_error.h 
     64AP_main.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    5765AP_main.o: $(ARBHOME)/INCLUDE/arbdb.h 
    5866AP_main.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    6169AP_main.o: $(ARBHOME)/INCLUDE/attributes.h 
    6270AP_main.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
     71AP_main.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
     72AP_main.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     73AP_main.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    6374AP_main.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    64 AP_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    65 AP_main.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     75AP_main.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
     76AP_main.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
     77AP_main.o: $(ARBHOME)/INCLUDE/downcast.h 
    6678AP_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
     79AP_main.o: $(ARBHOME)/INCLUDE/TreeDisplay.hxx 
    6780 
    6881AP_tree_edge.o: AP_buffer.hxx 
     82AP_tree_edge.o: ap_main.hxx 
    6983AP_tree_edge.o: ap_tree_nlen.hxx 
    70 AP_tree_edge.o: parsimony.hxx 
    7184AP_tree_edge.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    7285AP_tree_edge.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    7386AP_tree_edge.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     87AP_tree_edge.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     88AP_tree_edge.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     89AP_tree_edge.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     90AP_tree_edge.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    7491AP_tree_edge.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    7592AP_tree_edge.o: $(ARBHOME)/INCLUDE/arb_error.h 
     93AP_tree_edge.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    7694AP_tree_edge.o: $(ARBHOME)/INCLUDE/arbdb.h 
    7795AP_tree_edge.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    8199AP_tree_edge.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    82100AP_tree_edge.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    83 AP_tree_edge.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    84 AP_tree_edge.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     101AP_tree_edge.o: $(ARBHOME)/INCLUDE/downcast.h 
    85102AP_tree_edge.o: $(ARBHOME)/INCLUDE/smartptr.h 
    86103 
    87104AP_tree_nlen.o: AP_buffer.hxx 
     105AP_tree_nlen.o: ap_main.hxx 
    88106AP_tree_nlen.o: ap_tree_nlen.hxx 
    89107AP_tree_nlen.o: pars_debug.hxx 
    90 AP_tree_nlen.o: parsimony.hxx 
    91108AP_tree_nlen.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    92109AP_tree_nlen.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    93110AP_tree_nlen.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     111AP_tree_nlen.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     112AP_tree_nlen.o: $(ARBHOME)/INCLUDE/AP_seq_dna.hxx 
     113AP_tree_nlen.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     114AP_tree_nlen.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    94115AP_tree_nlen.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    95116AP_tree_nlen.o: $(ARBHOME)/INCLUDE/arb_error.h 
     117AP_tree_nlen.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    96118AP_tree_nlen.o: $(ARBHOME)/INCLUDE/arbdb.h 
    97119AP_tree_nlen.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    101123AP_tree_nlen.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    102124AP_tree_nlen.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    103 AP_tree_nlen.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    104 AP_tree_nlen.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    105 AP_tree_nlen.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     125AP_tree_nlen.o: $(ARBHOME)/INCLUDE/downcast.h 
    106126AP_tree_nlen.o: $(ARBHOME)/INCLUDE/smartptr.h 
    107127 
     
    123143 
    124144PARS_dtree.o: AP_buffer.hxx 
     145PARS_dtree.o: ap_main.hxx 
    125146PARS_dtree.o: ap_tree_nlen.hxx 
    126147PARS_dtree.o: pars_debug.hxx 
    127148PARS_dtree.o: pars_dtree.hxx 
    128149PARS_dtree.o: pars_main.hxx 
    129 PARS_dtree.o: parsimony.hxx 
    130150PARS_dtree.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    131151PARS_dtree.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    132152PARS_dtree.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     153PARS_dtree.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     154PARS_dtree.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     155PARS_dtree.o: $(ARBHOME)/INCLUDE/AP_seq_dna.hxx 
     156PARS_dtree.o: $(ARBHOME)/INCLUDE/AP_seq_protein.hxx 
     157PARS_dtree.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     158PARS_dtree.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    133159PARS_dtree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    134160PARS_dtree.o: $(ARBHOME)/INCLUDE/arb_error.h 
     161PARS_dtree.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    135162PARS_dtree.o: $(ARBHOME)/INCLUDE/arbdb.h 
    136163PARS_dtree.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    145172PARS_dtree.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    146173PARS_dtree.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    147 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt.hxx 
    148174PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    149175PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    150 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    151 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
     176PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    152177PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    153 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_seq_dna.hxx 
    154 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_seq_protein.hxx 
    155 PARS_dtree.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     178PARS_dtree.o: $(ARBHOME)/INCLUDE/downcast.h 
     179PARS_dtree.o: $(ARBHOME)/INCLUDE/gui_aliview.hxx 
    156180PARS_dtree.o: $(ARBHOME)/INCLUDE/smartptr.h 
    157  
    158 PARS_klprops.o: AP_buffer.hxx 
    159 PARS_klprops.o: ap_tree_nlen.hxx 
    160 PARS_klprops.o: pars_dtree.hxx 
    161 PARS_klprops.o: pars_main.hxx 
    162 PARS_klprops.o: parsimony.hxx 
     181PARS_dtree.o: $(ARBHOME)/INCLUDE/TreeDisplay.hxx 
     182 
     183PARS_klprops.o: pars_klprops.hxx 
    163184PARS_klprops.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    164 PARS_klprops.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    165 PARS_klprops.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    166185PARS_klprops.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    167186PARS_klprops.o: $(ARBHOME)/INCLUDE/arb_error.h 
    168 PARS_klprops.o: $(ARBHOME)/INCLUDE/arbdb.h 
    169187PARS_klprops.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
    170 PARS_klprops.o: $(ARBHOME)/INCLUDE/arbdbt.h 
    171188PARS_klprops.o: $(ARBHOME)/INCLUDE/arbtools.h 
    172189PARS_klprops.o: $(ARBHOME)/INCLUDE/attributes.h 
    173 PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    174 PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    175190PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    176191PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
    177192PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    178 PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_preset.hxx 
    179193PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    180194PARS_klprops.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    181 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt.hxx 
    182 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    183 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    184 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    185 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    186 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    187 PARS_klprops.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
    188195PARS_klprops.o: $(ARBHOME)/INCLUDE/smartptr.h 
    189196 
    190197PARS_main.o: AP_buffer.hxx 
     198PARS_main.o: ap_main.hxx 
    191199PARS_main.o: ap_tree_nlen.hxx 
    192200PARS_main.o: pars_dtree.hxx 
     201PARS_main.o: pars_klprops.hxx 
    193202PARS_main.o: pars_main.hxx 
    194 PARS_main.o: parsimony.hxx 
    195203PARS_main.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    196204PARS_main.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    197205PARS_main.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     206PARS_main.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     207PARS_main.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     208PARS_main.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    198209PARS_main.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    199210PARS_main.o: $(ARBHOME)/INCLUDE/arb_error.h 
     211PARS_main.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    200212PARS_main.o: $(ARBHOME)/INCLUDE/arbdb.h 
    201213PARS_main.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    214226PARS_main.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    215227PARS_main.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    216 PARS_main.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
     228PARS_main.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    217229PARS_main.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    218 PARS_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    219230PARS_main.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    220 PARS_main.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    221 PARS_main.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
     231PARS_main.o: $(ARBHOME)/INCLUDE/downcast.h 
     232PARS_main.o: $(ARBHOME)/INCLUDE/gui_aliview.hxx 
    222233PARS_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
     234PARS_main.o: $(ARBHOME)/INCLUDE/TreeCallbacks.hxx 
     235PARS_main.o: $(ARBHOME)/INCLUDE/TreeDisplay.hxx 
  • trunk/PARSIMONY/PARS_dtree.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4  
    5 #include <arbdb.h> 
    6 #include <arbdbt.h> 
    7 #include <aw_root.hxx> 
    8 #include <aw_device.hxx> 
    9 #include <aw_window.hxx> 
    10 #include <aw_preset.hxx> 
    11 #include <awt_canvas.hxx> 
    12 #include <awt_tree.hxx> 
    13 #include <awt_seq_dna.hxx> 
    14 #include <awt_seq_protein.hxx> 
    15  
    16 #include <awt_csp.hxx> 
    17 #include <awt.hxx> 
    18 #include <awt_dtree.hxx> 
    19 #include <awt_sel_boxes.hxx> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : PARS_dtree.cxx                                    // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "ap_main.hxx" 
    2012#include "pars_dtree.hxx" 
    21  
    22 #include "AP_buffer.hxx" 
    23 #include "parsimony.hxx" 
    24 #include "ap_tree_nlen.hxx" 
    2513#include "pars_main.hxx" 
    2614#include "pars_debug.hxx" 
    27  
    28 extern AWT_csp *awt_csp; 
    29  
    30 char *AWT_graphic_parsimony_root_changed(void *cd, AP_tree *old, AP_tree *newroot) 
    31 { 
     15#include "ap_tree_nlen.hxx" 
     16 
     17#include <AP_seq_dna.hxx> 
     18#include <AP_seq_protein.hxx> 
     19#include <AP_filter.hxx> 
     20 
     21#include <awt_csp.hxx> 
     22#include <awt_sel_boxes.hxx> 
     23#include <awt_filter.hxx> 
     24 
     25#include <gui_aliview.hxx> 
     26 
     27#include <aw_preset.hxx> 
     28 
     29static void AWT_graphic_parsimony_root_changed(void *cd, AP_tree *old, AP_tree *newroot) { 
    3230    AWT_graphic_tree *agt = (AWT_graphic_tree*)cd; 
     31 
    3332    if (old == agt->tree_root_display) agt->tree_root_display = newroot; 
    34     if (old == agt->tree_root) agt->tree_root = newroot; 
    35     if (old == GLOBAL_NT->tree->tree_root) GLOBAL_NT->tree->tree_root = newroot; 
    36     return 0; 
    37 } 
    38  
     33} 
     34 
     35static AliView *pars_generate_aliview(WeightedFilter *pars_weighted_filter) { 
     36    GBDATA *gb_main = pars_weighted_filter->get_gb_main(); 
     37    char *ali_name; 
     38    { 
     39        GB_transaction ta(gb_main); 
     40        ali_name = GBT_read_string(gb_main,AWAR_ALIGNMENT); 
     41    } 
     42    AliView *aliview = pars_weighted_filter->create_aliview(ali_name); 
     43    if (!aliview) aw_popup_exit(GB_await_error()); 
     44    free(ali_name); 
     45    return aliview; 
     46} 
    3947 
    4048/************************** 
     
    4755 
    4856**************************/ 
    49 void NT_tree_init(AWT_graphic_tree *agt, adfiltercbstruct *pars_global_filter) { 
    50  
    51     AP_tree *tree = agt->tree_root; 
     57 
     58void PARS_tree_init(AWT_graphic_tree *agt) { 
     59    ap_assert(agt->get_root_node()); 
     60    ap_assert(agt == ap_main->get_tree_root()); 
     61 
    5262    GB_transaction dummy(GLOBAL_gb_main); 
    53  
    54     if (!tree) { 
    55         return; 
    56     } 
    57     char *use = GBT_read_string(GLOBAL_gb_main,AWAR_ALIGNMENT); 
    58  
    59     long ali_len = GBT_get_alignment_len(GLOBAL_gb_main,use); 
     63     
     64    const char *use     = ap_main->get_aliname(); 
     65    long        ali_len = GBT_get_alignment_len(GLOBAL_gb_main, use); 
    6066    if (ali_len <=1) { 
    6167        aw_popup_exit("No valid alignment selected! Try again"); 
    6268    } 
    6369 
    64  
    65     GB_BOOL is_aa = GBT_is_alignment_protein(GLOBAL_gb_main,use); 
    66     // 
    67     // filter & weights setup 
    68     // 
    69     if (!tree->tree_root->sequence_template) { 
    70         AP_tree_root *tr = tree->tree_root; 
    71         AP_sequence *sproto; 
    72         if (is_aa) { 
    73             sproto = (AP_sequence *)new AP_sequence_protein(tr); 
    74         }else{ 
    75             sproto = (AP_sequence *)new AP_sequence_parsimony(tr); 
    76         } 
    77  
    78         tr->sequence_template = sproto; 
    79         tr->filter = awt_get_filter(agt->aw_root, pars_global_filter); 
    80         tr->weights = new AP_weights(); 
    81  
    82         awt_csp->go(0); 
    83         int i; 
    84         if (awt_csp->rates){ 
    85             for (i=0;i<ali_len;i++){ 
    86                 if (awt_csp->rates[i]>0.0000001){ 
    87                     awt_csp->weights[i] *= (int)(2.0/ awt_csp->rates[i]); 
    88                 } 
    89             } 
    90             tr->weights->init(awt_csp->weights , tr->filter); 
    91         }else{ 
    92             tr->weights->init(tr->filter); 
    93         } 
    94         tree->load_sequences_rek(use,GB_FALSE,GB_TRUE);         // load with sequences 
    95     } 
    96     tree->tree_root->root_changed_cd = (void*)agt; 
    97     tree->tree_root->root_changed = AWT_graphic_parsimony_root_changed; 
    98  
    99     ap_main->use = use; 
     70    agt->tree_static->set_root_changed_callback(AWT_graphic_parsimony_root_changed, agt); 
    10071} 
    10172 
     
    11586 
    11687void PARS_kernighan_cb(AP_tree *tree) { 
    117  
    11888    GB_push_transaction(GLOBAL_gb_main); 
    11989 
    120     AP_sequence::global_combineCount = 0; 
     90    long prevCombineCount = AP_sequence::combine_count(); 
    12191 
    12292    AP_FLOAT pars_start, pars_prev; 
    123     pars_prev  = pars_start = GLOBAL_NT->tree->tree_root->costs(); 
     93    pars_prev  = pars_start = AP_TREE_NLEN_CAST(GLOBAL_PARS->tree->get_root_node())->costs(); 
    12494 
    12595    int rek_deep_max = *GBT_read_int(GLOBAL_gb_main,"genetic/kh/maxdepth"); 
     
    195165 
    196166        if (tree_elem->gr.hidden || 
    197             (tree_elem->father && tree_elem->father->gr.hidden)){ 
     167            (tree_elem->father && tree_elem->get_father()->gr.hidden)){ 
    198168            continue;   // within a folded group 
    199169        } 
     
    211181            if (better_tree_found) { 
    212182                ap_main->clear(); 
    213                 pars_start =  GLOBAL_NT->tree->tree_root->costs(); 
     183                pars_start =  AP_TREE_NLEN_CAST(GLOBAL_PARS->tree->get_root_node())->costs(); 
    214184                char buffer[100]; 
    215185                sprintf(buffer,"New Parsimony: %f",pars_start); 
     
    223193    delete list; 
    224194    ap_global_abort_flag |= abort_flag; 
    225     printf("Combines: %li\n", AP_sequence::global_combineCount); 
    226     return; 
     195    printf("Combines: %li\n", AP_sequence::combine_count()-prevCombineCount); 
    227196} 
    228197 
    229198void PARS_optimizer_cb(AP_tree *tree) { 
    230     AP_tree *oldrootleft  = GLOBAL_NT->tree->tree_root->leftson; 
    231     AP_tree *oldrootright = GLOBAL_NT->tree->tree_root->rightson; 
     199    AWT_graphic_tree *agt          = GLOBAL_PARS->tree; 
     200    AP_tree          *oldrootleft  = agt->get_root_node()->get_leftson(); 
     201    AP_tree          *oldrootright = agt->get_root_node()->get_rightson(); 
    232202 
    233203    for (ap_global_abort_flag = 0;!ap_global_abort_flag;){ 
    234         AP_FLOAT old_pars = GLOBAL_NT->tree->tree_root->costs(); 
    235          
    236         ((AP_tree_nlen *)tree)->nn_interchange_rek(AP_TRUE,ap_global_abort_flag,-1,AP_BL_NNI_ONLY, GB_TRUE); // only not hidden 
     204        AP_FLOAT old_pars = AP_TREE_NLEN_CAST(agt->get_root_node())->costs(); 
     205 
     206        ((AP_tree_nlen *)tree)->nn_interchange_rek(AP_TRUE, ap_global_abort_flag, -1);  
    237207        if (ap_global_abort_flag) break; 
     208 
     209        if (old_pars != AP_TREE_NLEN_CAST(agt->get_root_node())->costs()) { // NNI found better tree 
     210            continue; 
     211        } 
     212 
    238213        PARS_kernighan_cb(tree); 
    239         if (old_pars == GLOBAL_NT->tree->tree_root->costs()) { 
     214        if (old_pars == AP_TREE_NLEN_CAST(agt->get_root_node())->costs()) { 
    240215            ap_global_abort_flag = 1; 
    241216        } 
     
    243218    if (oldrootleft->father == oldrootright) oldrootleft->set_root(); 
    244219    else oldrootright->set_root(); 
    245     GLOBAL_NT->tree->tree_root->costs(); 
     220    AP_TREE_NLEN_CAST(agt->get_root_node())->costs(); 
    246221    aw_closestatus(); 
    247222} 
    248223 
    249 AWT_graphic_parsimony::AWT_graphic_parsimony(AW_root *root, GBDATA *gb_maini):AWT_graphic_tree(root,gb_maini) 
    250 {;} 
    251  
    252 AWT_graphic_tree *PARS_generate_tree(AW_root *root) { 
    253     AWT_graphic_parsimony *apdt  = new AWT_graphic_parsimony(root,GLOBAL_gb_main); 
    254     AP_tree_nlen          *aptnl = new AP_tree_nlen(0); 
    255  
    256     apdt->init((AP_tree *)aptnl); 
    257     ap_main->tree_root = &apdt->tree_root; 
    258      
    259     delete aptnl; 
     224AWT_graphic_parsimony::AWT_graphic_parsimony(AW_root *root, GBDATA *gb_maini) 
     225    : AWT_graphic_tree(root,gb_maini) 
     226{} 
     227 
     228AWT_graphic_tree *PARS_generate_tree(AW_root *root, WeightedFilter *pars_weighted_filter) { 
     229    AliView     *aliview   = pars_generate_aliview(pars_weighted_filter); 
     230    AP_sequence *seq_templ = 0; 
     231 
     232    GBDATA *gb_main = aliview->get_gb_main(); 
     233    { 
     234        GB_transaction ta(gb_main); 
     235        GB_BOOL        is_aa = GBT_is_alignment_protein(gb_main, aliview->get_aliname()); 
     236 
     237        if (is_aa) seq_templ = new AP_sequence_protein(aliview); 
     238        else seq_templ       = new AP_sequence_parsimony(aliview); 
     239    } 
     240 
     241    AWT_graphic_parsimony *apdt = new AWT_graphic_parsimony(root, aliview->get_gb_main()); 
     242 
     243    apdt->init(AP_tree_nlen(0), aliview, seq_templ, true, false); 
     244 
     245    ap_main->set_tree_root(apdt); 
    260246    return apdt; 
    261247} 
     
    297283void AWT_graphic_parsimony::show(AW_device *device) 
    298284{ 
    299     long parsval = 0; 
    300     if (GLOBAL_NT->tree->tree_root) parsval = (long)GLOBAL_NT->tree->tree_root->costs(); 
    301     GLOBAL_NT->awr->awar(AWAR_PARSIMONY)->write_int( parsval); 
    302     long best = GLOBAL_NT->awr->awar(AWAR_BEST_PARSIMONY)->read_int(); 
     285    long          parsval   = 0; 
     286    AP_tree_nlen *root_node = AP_TREE_NLEN_CAST(GLOBAL_PARS->tree->get_root_node()); 
     287    if (root_node) parsval  = root_node->costs(); 
     288 
     289    GLOBAL_PARS->awr->awar(AWAR_PARSIMONY)->write_int(parsval); 
     290    long best = GLOBAL_PARS->awr->awar(AWAR_BEST_PARSIMONY)->read_int(); 
    303291    if (parsval < best || 0==best) { 
    304         GLOBAL_NT->awr->awar(AWAR_BEST_PARSIMONY)->write_int( parsval); 
     292        GLOBAL_PARS->awr->awar(AWAR_BEST_PARSIMONY)->write_int( parsval); 
    305293    } 
    306294    this->AWT_graphic_tree::show(device); 
     
    368356                            break; 
    369357                        } 
    370                         //                         if ( dest->is_son(source)) { 
     358                        //                         if ( dest->is_inside(source)) { 
    371359                        //                             aw_message("This operation is only allowed with two independent subtrees"); 
    372360                        //                             break; 
     
    388376                                error = source->move_group_info(dest); 
    389377                                break; 
    390                             default: 
    391                                 error = "????? 45338"; 
    392378                        } 
    393379 
     
    398384                        if (error) aw_message(error); 
    399385                        this->exports.refresh = 1; 
    400                         this->exports.save = 1; 
    401                         this->exports.resize = 1; 
    402                         this->tree_root->test_tree(); 
     386                        this->exports.save    = 1; 
     387                        this->exports.resize  = 1; 
     388                        ASSERT_VALID_TREE(get_root_node()); 
    403389                        //this->tree_root->compute_tree(gb_main); 
    404390                        compute_tree = true; 
     
    415401                GB_pop_transaction(gb_main); 
    416402                switch(button){ 
    417                     case AWT_M_LEFT: 
    418                         if (!cl->exists) break; 
    419                         at = (AP_tree *)cl->client_data1; 
    420                         ap_global_abort_flag = AP_FALSE; 
    421                         ((AP_tree_nlen *)at)->nn_interchange_rek(AP_TRUE,ap_global_abort_flag,-1); 
    422                         this->exports.refresh = 1; 
    423                         this->exports.save = 1; 
    424                         this->tree_root->test_tree(); 
     403                    case AWT_M_LEFT: { 
     404                        if (cl->exists) { 
     405                            at                   = (AP_tree *)cl->client_data1; 
     406                            ap_global_abort_flag = AP_FALSE; 
     407                            AP_tree_nlen *atn = DOWNCAST(AP_tree_nlen*, at); 
     408                            atn->nn_interchange_rek(AP_TRUE,ap_global_abort_flag,-1); 
     409                            exports.refresh = 1; 
     410                            exports.save    = 1; 
     411                            ASSERT_VALID_TREE(get_root_node()); 
     412                            recalc_branch_lengths = true; 
     413                        } 
     414                        break; 
     415                    } 
     416                    case AWT_M_RIGHT: { 
     417                        long          prevCombineCount = AP_sequence::combine_count(); 
     418                        ap_global_abort_flag           = AP_FALSE; 
     419                        AP_tree_nlen *atn              = DOWNCAST(AP_tree_nlen*, get_root_node()); 
     420 
     421                        atn->nn_interchange_rek(AP_TRUE,ap_global_abort_flag,-1); 
     422                        printf("Combines: %li\n", AP_sequence::combine_count()-prevCombineCount); 
     423 
     424                        exports.refresh       = 1; 
     425                        exports.save          = 1; 
     426                        ASSERT_VALID_TREE(get_root_node()); 
    425427                        recalc_branch_lengths = true; 
    426428                        break; 
    427                     case AWT_M_RIGHT: 
    428                         AP_sequence::global_combineCount = 0; 
    429                         ap_global_abort_flag = AP_FALSE; 
    430                         ((AP_tree_nlen *)this->tree_root)->nn_interchange_rek(AP_TRUE,ap_global_abort_flag,-1); 
    431                         printf("Combines: %li\n", AP_sequence::global_combineCount); 
    432                         this->exports.refresh = 1; 
    433                         this->exports.save = 1; 
    434                         this->tree_root->test_tree(); 
    435                         recalc_branch_lengths = true; 
    436                         break; 
     429                    } 
    437430                } 
    438431                GB_begin_transaction(gb_main); 
     
    449442                        this->exports.refresh = 1; 
    450443                        this->exports.save = 1; 
    451                         this->tree_root->test_tree(); 
     444                        ASSERT_VALID_TREE(get_root_node()); 
    452445                        recalc_branch_lengths = true; 
    453446                        break; 
    454447                    case AWT_M_RIGHT: 
    455                         PARS_kernighan_cb(this->tree_root); 
     448                        PARS_kernighan_cb(get_root_node()); 
    456449                        this->exports.refresh = 1; 
    457450                        this->exports.save = 1; 
    458                         this->tree_root->test_tree(); 
     451                        ASSERT_VALID_TREE(get_root_node()); 
    459452                        recalc_branch_lengths = true; 
    460453                        break; 
     
    473466                        this->exports.refresh = 1; 
    474467                        this->exports.save = 1; 
    475                         this->tree_root->test_tree(); 
     468                        ASSERT_VALID_TREE(get_root_node()); 
    476469                        recalc_branch_lengths = true; 
    477470                        break; 
    478471                    case AWT_M_RIGHT: 
    479                         PARS_optimizer_cb(this->tree_root); 
     472                        PARS_optimizer_cb(get_root_node()); 
    480473                        this->exports.refresh = 1; 
    481474                        this->exports.save = 1; 
    482                         this->tree_root->test_tree(); 
     475                        ASSERT_VALID_TREE(get_root_node()); 
    483476                        recalc_branch_lengths = true; 
    484477                        break; 
     
    509502 
    510503    if (compute_tree) { 
    511         this->tree_root->compute_tree(gb_main); 
    512         this->exports.refresh = 1; 
    513     } 
    514 } 
     504        get_root_node()->compute_tree(gb_main); 
     505        exports.refresh = 1; 
     506    } 
     507} 
  • trunk/PARSIMONY/PARS_klprops.cxx

    r6089 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 // #include <malloc.h> 
    4 #include <arbdb.h> 
    5 #include <arbdbt.h> 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : PARS_klprops.cxx                                  // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    610 
    7 #include <aw_root.hxx> 
    8 #include <aw_device.hxx> 
     11#include "pars_klprops.hxx" 
     12 
    913#include <aw_window.hxx> 
    10 #include <aw_preset.hxx> 
    11 #include <aw_awars.hxx> 
    12 #include <awt_canvas.hxx> 
    13 #include <awt.hxx> 
    14 #include <awt_nds.hxx> 
    1514 
    16 #include <awt_tree.hxx> 
    17 #include <awt_dtree.hxx> 
    18 #include <awt_tree_cb.hxx> 
    19  
    20 #include "AP_buffer.hxx" 
    21 #include "parsimony.hxx" 
    22 #include "ap_tree_nlen.hxx" 
    23 #include "pars_main.hxx" 
    24 #include "pars_dtree.hxx" 
    25  
    26 extern AW_window *preset_window( AW_root *root ); 
    27 extern AW_window *genetic_window(AW_root *root); 
    2815 
    2916AW_window *create_kernighan_window(AW_root *aw_root) { 
  • trunk/PARSIMONY/PARS_main.cxx

    r6236 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 // #include <malloc.h> 
    5 #include <iostream> 
    6 #include <limits.h> 
    7 #include <arbdb.h> 
    8 #include <arbdbt.h> 
    9  
    10 #include <aw_root.hxx> 
    11 #include <aw_device.hxx> 
    12 #include <aw_window.hxx> 
    13 #include <aw_preset.hxx> 
    14 #include <aw_awars.hxx> 
    15 #include <awt_canvas.hxx> 
    16 #include <awt.hxx> 
    17 #include <awt_nds.hxx> 
    18  
    19 #include <awt_tree.hxx> 
    20 #include <awt_dtree.hxx> 
    21 #include <awt_tree_cb.hxx> 
    22 #include <awt_sel_boxes.hxx> 
    23  
    24 #include <awt_csp.hxx> 
    25  
    26 #include "AP_buffer.hxx" 
    27 #include "parsimony.hxx" 
    28 #include "ap_tree_nlen.hxx" 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : PARS_main.cxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#include "ap_main.hxx" 
    2912#include "pars_main.hxx" 
    3013#include "pars_dtree.hxx" 
     14#include "pars_klprops.hxx" 
     15#include "ap_tree_nlen.hxx" 
     16 
     17#include <aw_awars.hxx> 
     18#include <aw_preset.hxx> 
     19 
     20#include <awt.hxx> 
     21#include <awt_csp.hxx> 
     22#include <awt_nds.hxx> 
     23#include <awt_sel_boxes.hxx> 
     24#include <awt_filter.hxx> 
     25#include <gui_aliview.hxx> 
     26 
     27#include <TreeCallbacks.hxx> 
    3128 
    3229#include <list> 
     
    3633#endif // DEBUG 
    3734 
    38  
    3935using namespace std; 
    4036 
    4137AW_HEADER_MAIN 
    4238 
    43 GBDATA    *GLOBAL_gb_main;                          // global gb_main for arb_pars 
    44 NT_global *GLOBAL_NT; 
     39#define AWAR_CSP_NAME "tmp/pars/csp/name" 
     40 
     41GBDATA *GLOBAL_gb_main;                             // global gb_main for arb_pars 
     42 
     43 
     44 
     45#if defined(DEVEL_RALF) 
     46#warning make GLOBAL_PARS static! 
     47#endif // DEVEL_RALF 
     48PARS_global *GLOBAL_PARS; 
    4549 
    4650// waaah more globals :( 
    4751AP_main *ap_main; 
    48 AWT_csp *awt_csp = 0; 
    49  
    50 AW_window *create_kernighan_window(AW_root *aw_root); 
    51  
    52 static void pars_export_tree(void){ 
    53     // GB_ERROR error = GLOBAL_NT->tree->tree_root->AP_tree::saveTree(); 
    54     GB_ERROR error = GLOBAL_NT->tree->save(0, 0, 0, 0); 
     52 
     53static void pars_saveNrefresh_changed_tree(AWT_canvas *ntw) { 
     54    ap_assert((AWT_TREE(ntw) == GLOBAL_PARS->tree)); 
     55 
     56    GB_ERROR error = GLOBAL_PARS->tree->save(ntw->gb_main,0,0,0); 
     57    if (error) aw_message(error); 
     58     
     59    ntw->zoom_reset(); 
     60    ntw->refresh(); 
     61} 
     62 
     63static void pars_export_tree(){ 
     64    GB_ERROR error = GLOBAL_PARS->tree->save(0, 0, 0, 0); 
    5565    if (error) aw_message(error); 
    5666} 
     
    7888{ 
    7989    ap_main->user_push(); 
    80     aww->get_root()->awar(AWAR_STACKPOINTER)->write_int(ap_main->user_push_counter); 
     90    aww->get_root()->awar(AWAR_STACKPOINTER)->write_int(ap_main->get_user_push_counter()); 
    8191} 
    8292 
    8393void AP_user_pop_cb(AW_window *aww,AWT_canvas *ntw) 
    8494{ 
    85     if (ap_main->user_push_counter<=0) { 
     95    if (ap_main->get_user_push_counter()<=0) { 
    8696        aw_message("No tree on stack."); 
    8797        return; 
    8898    } 
    8999    ap_main->user_pop(); 
    90     (*ap_main->tree_root)->compute_tree(GLOBAL_gb_main); 
    91     ntw->zoom_reset(); 
    92     ntw->refresh(); 
    93     (*ap_main->tree_root)->test_tree(); 
    94     aww->get_root()->awar(AWAR_STACKPOINTER)->write_int(ap_main->user_push_counter); 
    95     pars_export_tree(); 
    96  
    97     if (ap_main->user_push_counter <= 0) { // last tree was popped => push again 
     100    rootNode()->compute_tree(GLOBAL_gb_main); 
     101    ASSERT_VALID_TREE(rootNode()); 
     102    aww->get_root()->awar(AWAR_STACKPOINTER)->write_int(ap_main->get_user_push_counter()); 
     103 
     104    pars_saveNrefresh_changed_tree(ntw); 
     105 
     106    if (ap_main->get_user_push_counter() <= 0) { // last tree was popped => push again 
    98107        AP_user_push_cb(aww, ntw); 
    99108    } 
     
    123132    if (isits->abort_flag) return val; 
    124133 
    125     AP_tree *tree = (*ap_main->tree_root); 
    126     GBDATA *gb_node = (GBDATA *)val; 
    127  
    128     GB_begin_transaction(GLOBAL_gb_main); 
    129  
    130     GBDATA *gb_data = GBT_read_sequence(gb_node,ap_main->use); 
    131     if (!gb_data) 
    132     { 
    133         sprintf(AW_ERROR_BUFFER,"Warning Species '%s' has no sequence '%s'", 
    134                 key,ap_main->use); 
    135         aw_message(); 
    136         GB_commit_transaction(GLOBAL_gb_main); 
    137         return val; 
    138     } 
    139  
     134    GBDATA  *gb_node = (GBDATA *)val; 
     135 
     136#if defined(DEVEL_RALF) 
     137#warning following code could be a method .. 
     138    // ARB_tree *ARB_tree_root::create_linked_leaf(GBDATA *gb_species, const char *name) 
     139#endif // DEVEL_RALF 
     140 
     141    AP_tree *tree = rootNode(); 
    140142    AP_tree *leaf = tree->dup(); 
    141143    leaf->gb_node = gb_node; 
    142     leaf->name = strdup(key); 
     144    leaf->name    = strdup(key); 
    143145    leaf->is_leaf = GB_TRUE; 
    144146 
    145     leaf->sequence = leaf->tree_root->sequence_template->dup(); 
    146     leaf->sequence->set(GB_read_char_pntr(gb_data)); 
    147     GB_commit_transaction (GLOBAL_gb_main); 
    148  
    149     if (leaf->sequence->real_len() < MIN_SEQUENCE_LENGTH) 
    150     { 
     147    leaf->set_seq(leaf->get_tree_root()->get_seqTemplate()->dup()); 
     148    GB_ERROR error = leaf->get_seq()->bind_to_species(gb_node); 
     149 
     150    if (error) { 
     151        aw_message(error); 
     152        return val; 
     153    } 
     154 
     155    if (leaf->get_seq()->weighted_base_count() < MIN_SEQUENCE_LENGTH) { 
    151156        sprintf(AW_ERROR_BUFFER, 
    152                 "Species %s has too short sequence (%i, minimum is %i)", 
     157                "Species %s has too short sequence (%f, minimum is %i)", 
    153158                key, 
    154                 (int)leaf->sequence->real_len(), 
     159                leaf->get_seq()->weighted_base_count(), 
    155160                MIN_SEQUENCE_LENGTH); 
    156161        aw_message(); 
     
    206211 
    207212    tree->buildBranchList(blist,bsum,AP_TRUE,-1);   // get all branches 
    208     AP_sequence::global_combineCount = 0; 
    209  
    210     AP_tree *bestposl = tree->leftson; 
    211     AP_tree *bestposr = tree->rightson; 
     213 
     214#if defined(DEBUG) 
     215    long prevCombineCount = AP_sequence::combine_count(); 
     216#endif // DEBUG 
     217 
     218    AP_tree *bestposl = tree->get_leftson(); 
     219    AP_tree *bestposr = tree->get_rightson(); 
    212220    leaf->insert(bestposl); 
    213221    AP_FLOAT best_parsimony,akt_parsimony; 
    214     best_parsimony = akt_parsimony = (*ap_main->tree_root)->costs(); 
     222    best_parsimony = akt_parsimony = rootNode()->costs(); 
    215223 
    216224    for (counter = 0; !isits->abort_flag && blist[counter]; counter += 2) 
     
    238246 
    239247        leaf->moveTo(bl,0.5); 
    240         akt_parsimony = (*ap_main->tree_root)->costs(); 
     248        akt_parsimony = rootNode()->costs(); 
    241249 
    242250        if (akt_parsimony<best_parsimony) 
     
    258266    { 
    259267        AP_tree_nlen *fath = ((AP_tree_nlen*)bestposl)->Father()->Father(); 
     268 
    260269        char *seq_with_leaf; 
    261270        char *seq_without_leaf; 
    262         long len_with_leaf; 
    263         long len_without_leaf; 
    264         long i; 
    265  
    266         seq_with_leaf = fath->getSequence(); 
    267         len_with_leaf = fath->sequence->sequence_len; 
    268  
     271        long  i; 
     272 
     273        // Note: removed sequence length code here, 
     274        // cause "sequence_len" is always filter-length (i.e. constant until filter changes) 
     275        // ralf 10/2009 
     276 
     277        seq_with_leaf = fath->getSequenceCopy(); 
    269278 
    270279        ap_main->push(); 
     280 
    271281        leaf->remove(); 
    272  
    273         seq_without_leaf = fath->getSequence(); 
    274         len_without_leaf = fath->sequence->sequence_len; 
    275  
     282        seq_without_leaf = fath->getSequenceCopy(); 
    276283 
    277284        ap_main->pop(); 
    278285 
    279  
    280         if (len_with_leaf==len_without_leaf) { 
    281             for (i=0; i<len_with_leaf; i++) { 
    282                 if (seq_with_leaf[i]!=seq_without_leaf[i]) { 
    283                     baseDiff++; 
    284                 } 
     286        for (i=0; seq_with_leaf[i]; i++) { 
     287            if (seq_with_leaf[i]!=seq_without_leaf[i]) { 
     288                baseDiff++; 
    285289            } 
    286         } 
    287         else { 
    288             cout << "Laenge der Sequenz hat sich geaendert!!!"; 
     290             
    289291        } 
    290292 
     
    295297    rootEdge()->countSpecies(); 
    296298 
    297     //    printf("Combines: %i\n",global_combineCount); 
     299#if defined(DEBUG) 
     300    printf("Combines: %li\n", AP_sequence::combine_count()-prevCombineCount); 
     301#endif // DEBUG 
    298302 
    299303    if (!isits->quick_add_flag ) { 
     
    319323    AP_tree *leaf1 = (AP_tree*)leaf1_ptr; 
    320324 
    321     AP_FLOAT len0 = leaf0->sequence->real_len(); 
    322     AP_FLOAT len1 = leaf1->sequence->real_len(); 
     325    AP_FLOAT len0 = leaf0->get_seq()->weighted_base_count(); 
     326    AP_FLOAT len1 = leaf1->get_seq()->weighted_base_count(); 
    323327 
    324328    return len0<len1 ? 1 : (len0>len1 ? -1 : 0); // longest sequence first 
    325329} 
    326330 
    327 static long transform_gbd_to_leaf(const char *key,long val, void *) { 
     331static long transform_gbd_to_leaf(const char *key, long val, void *) { 
    328332    if (!val) return val; 
    329333 
    330     AP_tree *tree    = (*ap_main->tree_root); 
    331     GBDATA  *gb_node = (GBDATA *)val; 
    332     GBDATA  *gb_data = GBT_read_sequence(gb_node,ap_main->use); 
    333      
    334     if (!gb_data) { 
    335         sprintf(AW_ERROR_BUFFER,"Warning Species '%s' has no sequence '%s'", 
    336                 key,ap_main->use); 
    337         aw_message(); 
    338         return 0; 
    339     } 
    340     AP_tree *leaf = tree->dup(); 
     334#if defined(DEVEL_RALF) 
     335#warning use create_linked_leaf() when impl 
     336#endif // DEVEL_RALF 
     337 
     338    GBDATA       *gb_node = (GBDATA *)val; 
     339    AP_tree_root *troot   = ap_main->get_tree_root()->tree_static; 
     340 
     341    AP_tree *leaf = DOWNCAST(const AP_tree*, troot->get_nodeTemplate())->dup(); 
    341342    leaf->gb_node = gb_node; 
    342     leaf->name = strdup(key); 
     343    leaf->name    = strdup(key); 
    343344    leaf->is_leaf = GB_TRUE; 
    344     leaf->sequence = leaf->tree_root->sequence_template->dup(); 
    345     leaf->sequence->set(GB_read_char_pntr(gb_data)); 
     345 
     346    leaf->set_seq(troot->get_seqTemplate()->dup()); 
     347    GB_ERROR error = leaf->get_seq()->bind_to_species(gb_node); 
     348    if (error) { 
     349        aw_message(error); 
     350        delete leaf; leaf = 0; 
     351    } 
    346352    return (long)leaf; 
    347353} 
     
    354360    if (isits->abort_flag) return leaf; 
    355361 
    356     AP_tree *tree = (*ap_main->tree_root); 
    357  
    358  
    359     if (leaf->sequence->real_len() < MIN_SEQUENCE_LENGTH) { 
    360         sprintf(AW_ERROR_BUFFER,"Species %s has too short sequence (%i, minimum is %i)", 
    361                 key,    (int)leaf->sequence->real_len(),    MIN_SEQUENCE_LENGTH); 
     362    AP_tree *tree = rootNode(); 
     363 
     364    if (leaf->get_seq()->weighted_base_count() < MIN_SEQUENCE_LENGTH) { 
     365        sprintf(AW_ERROR_BUFFER, 
     366                "Species %s has too short sequence (%f, minimum is %i)", 
     367                key, 
     368                leaf->get_seq()->weighted_base_count(), 
     369                MIN_SEQUENCE_LENGTH); 
     370         
    362371        aw_message(); 
    363372        delete leaf; 
     
    371380        aw_openstatus(AW_ERROR_BUFFER); 
    372381    } 
    373     aw_status("Searching best position"); 
    374  
    375     AP_tree      **blist; 
    376     AP_tree_nlen  *bl,*blf; 
    377     long           bsum    = 0; 
    378     long           counter = 0; 
    379  
    380     tree->buildBranchList(blist,bsum,AP_TRUE,-1);       // get all branches 
    381     AP_sequence::global_combineCount = 0; 
    382  
    383     AP_tree *bestposl = tree->leftson; 
    384     AP_tree *bestposr = tree->rightson; 
    385     leaf->insert(bestposl); 
    386     AP_FLOAT best_parsimony,akt_parsimony; 
    387     best_parsimony = akt_parsimony = (*ap_main->tree_root)->costs(); 
    388  
    389     for (counter = 0;!isits->abort_flag && blist[counter];counter += 2) { 
    390         if (isits->singlestatus && (counter & 0xf) == 0) { 
    391             isits->abort_flag = (AP_BOOL)aw_status(counter/(bsum*2.0)); 
    392         } 
    393         bl = (AP_tree_nlen *)blist[counter]; 
    394         blf = (AP_tree_nlen *)blist[counter+1]; 
    395         if (blf->father == bl ) { 
    396             bl = (AP_tree_nlen *)blist[counter+1]; 
    397             blf = (AP_tree_nlen *)blist[counter]; 
    398         } 
    399  
    400         if (bl->father) {   //->father 
    401             bl->set_root(); 
    402         } 
    403  
    404         leaf->moveTo(bl,0.5); 
    405         akt_parsimony = (*ap_main->tree_root)->costs(); 
    406         if (akt_parsimony < best_parsimony) { 
    407             best_parsimony = akt_parsimony; 
    408             bestposl = bl; 
    409             bestposr = blf; 
    410         } 
    411  
    412     } 
    413     delete blist;blist = 0; 
    414     if (bestposl->father != bestposr){ 
    415         bestposl = bestposr; 
    416     } 
    417     leaf->moveTo(bestposl,0.5); 
    418  
    419     if (!isits->quick_add_flag) { 
    420         int deep = 5; 
    421         if ( (isits->currentspecies & 0xf ) == 0)  deep = -1; 
    422         aw_status("optimization"); 
    423         ((AP_tree_nlen *)bestposl->father)-> 
    424             nn_interchange_rek(AP_FALSE, isits->abort_flag, deep, AP_BL_NNI_ONLY, GB_TRUE); 
    425     } 
    426     AP_tree *brother = leaf->brother(); 
    427     if (    brother->is_leaf &&     // brother is a short sequence 
    428             brother->sequence->real_len() *2  < leaf->sequence->real_len() && 
    429             leaf->father->father){      // There are more than two species 
    430         brother->remove(); 
    431         leaf->remove(); 
    432         isits->currentspecies--; 
    433         char *label = GBS_global_string_copy("2:%s",leaf->name); 
    434         insert_species_in_tree(label, leaf, cd_isits); // reinsert species 
    435         delete label; 
    436         isits->currentspecies--; 
    437         label = GBS_global_string_copy("shortseq:%s",brother->name); 
    438         insert_species_in_tree(label, brother, cd_isits);  // reinsert short sequence 
    439         delete label; 
    440     } 
    441  
    442     if (!isits->singlestatus) { 
    443         isits->abort_flag |= aw_status(isits->currentspecies/(double)isits->maxspecies); 
     382 
     383    if (!tree) {                                    // no tree yet 
     384        static AP_tree *last_inserted = NULL; 
     385 
     386        if (!last_inserted) {                       // store 1st leaf 
     387            last_inserted = leaf; 
     388        } 
     389        else {                                      // 2nd leaf -> create initial tree 
     390            AP_tree_root *troot = ap_main->get_tree_root()->tree_static; 
     391            leaf->insert(last_inserted); 
     392            last_inserted       = NULL; 
     393 
     394            AP_tree *initial_tree = leaf->get_father(); 
     395            troot->change_root(NULL, initial_tree); 
     396 
     397            ASSERT_VALID_TREE(troot->get_root_node()); 
     398        } 
     399    } 
     400    else { 
     401        aw_status("Searching best position"); 
     402 
     403        ASSERT_VALID_TREE(tree); 
     404 
     405        AP_tree      **blist; 
     406        AP_tree_nlen  *bl,*blf; 
     407        long           bsum    = 0; 
     408        long           counter = 0; 
     409 
     410        tree->buildBranchList(blist,bsum,AP_TRUE,-1);   // get all branches 
     411 
     412        AP_tree *bestposl = tree->get_leftson(); 
     413        AP_tree *bestposr = tree->get_rightson(); 
     414        leaf->insert(bestposl); 
     415 
     416        ASSERT_VALID_TREE(rootNode()); 
     417         
     418        AP_FLOAT best_parsimony,akt_parsimony; 
     419        best_parsimony = akt_parsimony = rootNode()->costs(); 
     420 
     421        for (counter = 0;!isits->abort_flag && blist[counter];counter += 2) { 
     422            if (isits->singlestatus && (counter & 0xf) == 0) { 
     423                isits->abort_flag = (AP_BOOL)aw_status(counter/(bsum*2.0)); 
     424            } 
     425            bl = (AP_tree_nlen *)blist[counter]; 
     426            blf = (AP_tree_nlen *)blist[counter+1]; 
     427            if (blf->father == bl ) { 
     428                bl = (AP_tree_nlen *)blist[counter+1]; 
     429                blf = (AP_tree_nlen *)blist[counter]; 
     430            } 
     431 
     432            if (bl->father) {   //->father 
     433                bl->set_root(); 
     434            } 
     435 
     436            leaf->moveTo(bl,0.5); 
     437            akt_parsimony = rootNode()->costs(); 
     438            if (akt_parsimony < best_parsimony) { 
     439                best_parsimony = akt_parsimony; 
     440                bestposl = bl; 
     441                bestposr = blf; 
     442            } 
     443 
     444        } 
     445        delete blist;blist = 0; 
     446        if (bestposl->father != bestposr){ 
     447            bestposl = bestposr; 
     448        } 
     449        leaf->moveTo(bestposl,0.5); 
     450 
     451        if (!isits->quick_add_flag) { 
     452            int deep = 5; 
     453            if ( (isits->currentspecies & 0xf ) == 0)  deep = -1; 
     454            aw_status("optimization"); 
     455            ((AP_tree_nlen *)bestposl->father)-> 
     456                nn_interchange_rek(AP_FALSE, isits->abort_flag, deep, AP_BL_NNI_ONLY, GB_TRUE); 
     457        } 
     458        AP_tree *brother = leaf->get_brother(); 
     459        if (brother->is_leaf &&     // brother is a short sequence 
     460            2 * brother->get_seq()->weighted_base_count() < leaf->get_seq()->weighted_base_count() && 
     461            leaf->father->father) // There are more than two species 
     462        {       
     463            brother->remove(); 
     464            leaf->remove(); 
     465            isits->currentspecies--; 
     466            char *label = GBS_global_string_copy("2:%s",leaf->name); 
     467            insert_species_in_tree(label, leaf, cd_isits); // reinsert species 
     468            delete label; 
     469            isits->currentspecies--; 
     470            label = GBS_global_string_copy("shortseq:%s",brother->name); 
     471            insert_species_in_tree(label, brother, cd_isits);  // reinsert short sequence 
     472            delete label; 
     473        } 
     474 
     475        if (!isits->singlestatus) { 
     476            isits->abort_flag |= aw_status(isits->currentspecies/(double)isits->maxspecies); 
     477        } 
    444478    } 
    445479 
     
    459493} 
    460494 
    461 static void nt_add(AW_window *, AWT_canvas *ntw, int what, AP_BOOL quick, int test) 
     495enum AddWhat { 
     496    NT_ADD_MARKED,  
     497    NT_ADD_SELECTED, 
     498}; 
     499 
     500static void nt_add(AW_window *, AWT_canvas *ntw, AddWhat what, AP_BOOL quick, int test) 
    462501{ 
    463     GB_begin_transaction(GLOBAL_gb_main); 
     502    GB_ERROR  error = 0; 
     503 
     504    AP_tree *oldrootleft  = NULL; 
     505    AP_tree *oldrootright = NULL; 
     506    { 
     507        AP_tree *root = rootNode(); 
     508        if (root) { 
     509            oldrootleft  = root->get_leftson(); 
     510            oldrootright = root->get_rightson(); 
     511        } 
     512    } 
     513 
     514    aw_openstatus("Search selected species"); 
     515 
    464516    GB_HASH *hash = 0; 
    465     GB_ERROR error = 0; 
    466     AP_tree *oldrootleft = (*ap_main->tree_root)->leftson; 
    467     AP_tree *oldrootright = (*ap_main->tree_root)->rightson; 
    468     aw_openstatus("Search selected species"); 
    469  
    470     if (what) 
    471     { 
    472         char *name = GBT_readOrCreate_string(GLOBAL_gb_main, AWAR_SPECIES_NAME, ""); 
    473         if (name && strlen(name)) { 
    474             GBDATA *gb_species = GBT_find_species(GLOBAL_gb_main,name); 
    475             if (gb_species) { 
    476                 hash = GBS_create_hash(10, GB_MIND_CASE); 
    477                 GBS_write_hash(hash,name,(long)gb_species); 
     517    { 
     518        GB_transaction ta(GLOBAL_gb_main); 
     519        switch (what) { 
     520            case NT_ADD_SELECTED:  { 
     521                char *name = GBT_readOrCreate_string(GLOBAL_gb_main, AWAR_SPECIES_NAME, ""); 
     522                if (name && strlen(name)) { 
     523                    GBDATA *gb_species = GBT_find_species(GLOBAL_gb_main, name); 
     524                    if (gb_species) { 
     525                        hash = GBS_create_hash(10, GB_MIND_CASE); 
     526                        GBS_write_hash(hash, name, (long)gb_species); 
     527                    } 
     528                    else error = GBS_global_string("Selected Species (%s) not found", name); 
     529                } 
     530                else error = "Please select a species"; 
     531                free(name); 
     532                break; 
    478533            } 
    479             else { 
    480                 error = "Error: Selected Species not found"; 
     534            case NT_ADD_MARKED:  { 
     535                hash = GBT_create_marked_species_hash(GLOBAL_gb_main); 
     536                break; 
    481537            } 
    482538        } 
    483         else { 
    484             error= "Please select an species" 
    485                 "   to select an species:   1. arb_edit: enable global cursor and select sequence" 
    486                 "               2. arb_ntree: species/search and select species"; 
    487         } 
    488         free(name); 
    489     } 
    490     else { 
    491         hash = GBT_create_marked_species_hash(GLOBAL_gb_main); 
    492     } 
    493     GB_commit_transaction(GLOBAL_gb_main); 
    494  
     539    } 
     540 
     541    ap_assert(hash); 
    495542    if (!error) { 
    496         NT_remove_species_in_tree_from_hash(*ap_main->tree_root,hash); 
     543        NT_remove_species_in_tree_from_hash(rootNode(), hash); 
    497544 
    498545        InsertData isits(quick); 
    499  
    500546        GBS_hash_do_loop(hash, count_hash_elements, &isits); 
    501  
    502547        aw_openstatus(GBS_global_string("Adding %li species", isits.maxspecies)); 
    503548 
     
    520565        rootEdge()->nni_rek(AP_FALSE,isits.abort_flag,-1, GB_FALSE ,AP_BL_BL_ONLY); 
    521566 
    522         rootNode()->test_tree(); 
     567        ASSERT_VALID_TREE(rootNode()); 
    523568        rootNode()->compute_tree(GLOBAL_gb_main); 
    524569 
    525         if (oldrootleft->father == oldrootright) oldrootleft->set_root(); 
    526         else                     oldrootright->set_root(); 
     570        if (oldrootleft) { 
     571            if (oldrootleft->father == oldrootright) oldrootleft->set_root(); 
     572            else                                     oldrootright->set_root(); 
     573        } 
     574        else { 
     575            ARB_edge innermost = rootNode()->get_tree_root()->find_innermost_edge(); 
     576            AP_TREE_CAST(innermost.son())->set_root(); 
     577        } 
    527578 
    528579        aw_closestatus(); 
     
    533584 
    534585    AWT_TREE(ntw)->resort_tree(0); 
    535     ntw->zoom_reset(); 
    536     if (!error) pars_export_tree(); 
     586    pars_saveNrefresh_changed_tree(ntw); 
    537587} 
    538588 
     
    606656    long curr_penalty; 
    607657 
    608     leaf_full->sequence->partial_match(get_self()->sequence, &curr_overlap, &curr_penalty); 
     658    leaf_full->get_seq()->partial_match(get_self()->get_seq(), &curr_overlap, &curr_penalty); 
    609659 
    610660    bool better = false; 
     
    661711        } 
    662712        else { 
    663             error             = nt_best_partial_match_rek(partial, tree->leftson); 
    664             if (!error) error = nt_best_partial_match_rek(partial, tree->rightson); 
     713            error             = nt_best_partial_match_rek(partial, tree->get_leftson()); 
     714            if (!error) error = nt_best_partial_match_rek(partial, tree->get_rightson()); 
    665715        } 
    666716    } 
     
    680730    } 
    681731    else { 
    682         count_partial_and_full(at->leftson,  partial, full, zombies, default_value, define_if_undef); 
    683         count_partial_and_full(at->rightson, partial, full, zombies, default_value, define_if_undef); 
     732        count_partial_and_full(at->get_leftson(),  partial, full, zombies, default_value, define_if_undef); 
     733        count_partial_and_full(at->get_rightson(), partial, full, zombies, default_value, define_if_undef); 
    684734    } 
    685735} 
     
    698748    } 
    699749 
    700     AP_tree *left  = find_least_deep_leaf(at->leftson, depth+1, min_depth); 
    701     AP_tree *right = find_least_deep_leaf(at->rightson, depth+1, min_depth); 
     750    AP_tree *left  = find_least_deep_leaf(at->get_leftson(), depth+1, min_depth); 
     751    AP_tree *right = find_least_deep_leaf(at->get_rightson(), depth+1, min_depth); 
    702752 
    703753    return right ? right : left; 
     
    731781                ++marked_found; 
    732782 
    733                 if (GBT_read_sequence(gb_marked,ap_main->use)) { // species has sequence in alignment 
     783                if (GBT_read_sequence(gb_marked,ap_main->get_aliname())) { // species has sequence in alignment 
    734784                    const char *name = GBT_read_name(gb_marked); 
    735785 
     
    760810 
    761811            if (!error) { 
    762                 NT_remove_species_in_tree_from_hash(*ap_main->tree_root,partial_hash); // skip all species which are in tree 
     812                NT_remove_species_in_tree_from_hash(rootNode(), partial_hash); // skip all species which are in tree 
    763813                GBS_hash_do_loop(partial_hash, push_partial, &partial); // build partial list from hash 
    764814 
    765815                int partials_already_in_tree = partial_marked_sequences - partial.size(); 
    766816 
    767                 if (no_data>0) aw_message(GBS_global_string("%i marked species have no data in '%s'", no_data, ap_main->use)); 
     817                if (no_data>0) aw_message(GBS_global_string("%i marked species have no data in '%s'", no_data, ap_main->get_aliname())); 
    768818                if (full_marked_sequences>0) aw_message(GBS_global_string("%i marked species are declared full sequences", full_marked_sequences)); 
    769819                if (partials_already_in_tree>0) aw_message(GBS_global_string("%i marked species are already in tree", partials_already_in_tree)); 
     
    775825        if (!error) { 
    776826            // find best matching full sequence for each partial sequence 
    777             error = nt_best_partial_match_rek(partial, *ap_main->tree_root); 
     827            error = nt_best_partial_match_rek(partial, rootNode()); 
    778828 
    779829            list<PartialSequence>::iterator i = partial.begin(); 
     
    797847                AP_tree *part_leaf  = i->release(); 
    798848                AP_tree *full_seq   = const_cast<AP_tree*>(i->get_best_match()); 
    799                 AP_tree *brother    = full_seq->brother(); 
     849                AP_tree *brother    = full_seq->get_brother(); 
    800850                int      is_partial = 0; 
    801851                AP_tree *target     = 0; 
     
    847897                     
    848898                    // we need to create the sequence of the father node! 
    849                     AP_tree *father = part_leaf->father; 
     899                    AP_tree_nlen *father = AP_TREE_NLEN_CAST(part_leaf->get_father()); 
    850900                    father->costs(); 
    851901 
     
    893943    } 
    894944 
    895 //     AWT_TREE(ntw)->resort_tree(0); 
    896     ntw->zoom_reset(); 
    897     if (!error) pars_export_tree(); 
     945    //     AWT_TREE(ntw)->resort_tree(0); 
     946    pars_saveNrefresh_changed_tree(ntw); 
    898947} 
    899948 
     
    904953// normal versions : 
    905954 
    906 static void NT_add(AW_window * aww, AWT_canvas *ntw, int what) { 
    907     // what == 0 marked  ==1 selected 
    908     nt_add(aww,ntw,what,AP_FALSE,0); 
    909 } 
    910  
    911 static void NT_quick_add(AW_window * aww, AWT_canvas *ntw, int what) { 
    912     // what == 0 marked  ==1 selected 
    913     nt_add(aww,ntw,what,AP_TRUE,0); 
    914 } 
     955static void NT_add      (AW_window * aww, AWT_canvas *ntw, AddWhat what){ nt_add(aww, ntw, what, AP_FALSE, 0); } 
     956static void NT_quick_add(AW_window * aww, AWT_canvas *ntw, AddWhat what){ nt_add(aww, ntw, what, AP_TRUE,  0); } 
    915957 
    916958// test versions : 
    917959 
    918960#if defined(TEST_FUNCTIONS) 
    919 static void NT_add_test(AW_window * aww, AWT_canvas *ntw, int what) { 
    920     // what == 0 marked  ==1 selected 
    921     nt_add(aww,ntw,what,AP_FALSE,1); 
    922 } 
    923  
    924 static void NT_quick_add_test(AW_window * aww, AWT_canvas *ntw, int what) { 
    925     // what == 0 marked  ==1 selected 
    926     nt_add(aww,ntw,what,AP_TRUE,1); 
    927 } 
     961static void NT_add_test      (AW_window * aww, AWT_canvas *ntw, AddWhat what){ nt_add(aww, ntw, what, AP_FALSE, 1); } 
     962static void NT_quick_add_test(AW_window * aww, AWT_canvas *ntw, AddWhat what){ nt_add(aww, ntw, what, AP_TRUE,  1); } 
    928963#endif // TEST_FUNCTIONS 
    929964 
     
    932967// ----------------------------------------- 
    933968 
    934 static void NT_radd_internal(AW_window * aww, AWT_canvas *ntw, int what, AP_BOOL quick, int test) { 
    935     // what == 0 marked  ==1 selected 
    936  
     969static void NT_radd_internal(AW_window * aww, AWT_canvas *ntw, AddWhat what, AP_BOOL quick, int test) { 
    937970    AW_awar *awar_best_pars = aww->get_root()->awar(AWAR_BEST_PARSIMONY); 
    938971    int      oldparsval     = awar_best_pars->read_int(); 
    939972 
    940     NT_remove_leafs(0,ntw,AWT_REMOVE_BUT_DONT_FREE | AWT_REMOVE_MARKED); 
     973    AWT_graphic_tree *agt = AWT_TREE(ntw); 
     974    if (agt->get_root_node()) { 
     975        agt->tree_static->remove_leafs(AWT_REMOVE_BUT_DONT_FREE|AWT_REMOVE_MARKED); 
     976    } 
    941977 
    942978    // restore old parsimony value (otherwise the state where species were removed would count) : 
     
    948984// normal versions : 
    949985 
    950 static void NT_radd(AW_window * aww, AWT_canvas *ntw, int what) { 
    951     // what == 0 marked  ==1 selected 
    952     NT_radd_internal(aww, ntw, what, AP_FALSE, 0); 
    953 } 
    954  
    955 static void NT_rquick_add(AW_window * aww, AWT_canvas *ntw, int what) { 
    956     // what == 0 marked  ==1 selected 
    957     NT_radd_internal(aww, ntw, what, AP_TRUE, 0); 
    958 } 
    959  
    960 // static void NT_radd_test_internal(AW_window * aww, AWT_canvas *ntw, int what, AP_BOOL quick) { 
    961 //     // what == 0 marked  ==1 selected 
    962 //     NT_remove_leafs(0,ntw,AWT_REMOVE_BUT_DONT_FREE | AWT_REMOVE_MARKED); 
    963 //     nt_add(aww,ntw,what,quick,1); 
    964 // } 
     986static void NT_radd      (AW_window * aww, AWT_canvas *ntw, AddWhat what){ NT_radd_internal(aww, ntw, what, AP_FALSE, 0); } 
     987static void NT_rquick_add(AW_window * aww, AWT_canvas *ntw, AddWhat what){ NT_radd_internal(aww, ntw, what, AP_TRUE,  0); } 
    965988 
    966989// test versions : 
    967990 
    968991#if defined(TEST_FUNCTIONS) 
    969 static void NT_radd_test(AW_window * aww, AWT_canvas *ntw, int what) { 
    970     // what == 0 marked  ==1 selected 
    971     NT_radd_internal(aww, ntw, what, AP_FALSE, 1); 
    972 } 
    973  
    974 static void NT_rquick_add_test(AW_window * aww, AWT_canvas *ntw, int what) { 
    975     // what == 0 marked  ==1 selected 
    976     NT_radd_internal(aww, ntw, what, AP_TRUE, 1); 
    977 } 
     992static void NT_radd_test      (AW_window * aww, AWT_canvas *ntw, AddWhat what){ NT_radd_internal(aww, ntw, what, AP_FALSE, 1); } 
     993static void NT_rquick_add_test(AW_window * aww, AWT_canvas *ntw, AddWhat what){ NT_radd_internal(aww, ntw, what, AP_TRUE,  1); } 
    978994#endif // TEST_FUNCTIONS 
    979995 
     
    9981014    AWT_TREE(ntw)->resort_tree(0); 
    9991015 
    1000     ntw->zoom_reset(); 
    1001     ntw->refresh(); 
    1002     pars_export_tree(); 
    1003 } 
    1004  
    1005 static void NT_bootstrap(AW_window *aw,AWT_canvas *ntw,AW_CL limit_only) 
    1006 { 
    1007     AW_POPUP_HELP(aw, (AW_CL)"pa_bootstrap.hlp"); 
     1016    pars_saveNrefresh_changed_tree(ntw); 
     1017} 
     1018 
     1019static void NT_bootstrap(AW_window *, AWT_canvas *ntw, AW_CL limit_only) { 
    10081020    aw_openstatus("Calculating Bootstrap Limit"); 
    10091021    int abort_flag = AP_FALSE; 
    10101022    rootEdge()->nni_rek(AP_FALSE, abort_flag, -1, GB_FALSE, 
    1011                         limit_only ? AP_BL_BOOTSTRAP_LIMIT : AP_BL_BOOTSTRAP_ESTIMATE); 
     1023                        AP_BL_MODE((limit_only ? AP_BL_BOOTSTRAP_LIMIT : AP_BL_BOOTSTRAP_ESTIMATE)|AP_BL_BL_ONLY)); 
    10121024    aw_closestatus(); 
    10131025 
    10141026    AWT_TREE(ntw)->resort_tree(0); 
    10151027 
    1016     AWT_TREE(ntw)->tree_root_display = AWT_TREE(ntw)->tree_root; 
    1017     ntw->zoom_reset(); 
    1018     ntw->refresh(); 
    1019     pars_export_tree(); 
     1028    AWT_TREE(ntw)->tree_root_display = AWT_TREE(ntw)->get_root_node(); 
     1029    pars_saveNrefresh_changed_tree(ntw); 
    10201030} 
    10211031 
     
    10241034    aw_openstatus("Optimize Tree"); 
    10251035 
    1026     PARS_optimizer_cb((*ap_main->tree_root)); 
    1027     rootNode()->test_tree(); 
     1036    PARS_optimizer_cb(rootNode()); 
     1037    ASSERT_VALID_TREE(rootNode()); 
    10281038 
    10291039    aw_openstatus("Calculating Branch Lengths"); 
     
    10331043    rootNode()->compute_tree(GLOBAL_gb_main); 
    10341044    aw_closestatus(); 
    1035     ntw->zoom_reset(); 
    1036     ntw->refresh(); 
    1037     pars_export_tree(); 
     1045    pars_saveNrefresh_changed_tree(ntw); 
    10381046} 
    10391047 
     
    10601068    rootNode()->compute_tree(GLOBAL_gb_main); 
    10611069    aw_closestatus(); 
    1062     ntw->zoom_reset(); 
    1063     ntw->refresh(); 
    1064     pars_export_tree(); 
     1070    pars_saveNrefresh_changed_tree(ntw); 
    10651071} 
    10661072 
     
    11201126    ntw->refresh(); 
    11211127} 
    1122  
    1123 static void testTree(AP_tree_nlen *tree,int *nodeCount, int *edgeCount) 
    1124 { 
    1125     tree->test(); 
    1126     (*nodeCount)++; 
    1127  
    1128     if (tree->father)   // we do only test edges if were not at root 
    1129     { 
    1130         AP_tree_edge *e =0; 
    1131         int skipTest=0; 
    1132  
    1133         if (tree->father->father) 
    1134         { 
    1135             e = tree->edgeTo(tree->Father()); 
    1136         } 
    1137         else        // son of root! 
    1138         { 
    1139             if (tree->father->leftson==(AP_tree*)tree)  // to not test twice 
    1140             { 
    1141                 e = tree->edgeTo(tree->Brother()); 
    1142             } 
    1143             else 
    1144             { 
    1145                 skipTest=1; 
    1146             } 
    1147         } 
    1148  
    1149         if (!skipTest) 
    1150         { 
    1151             if (e) 
    1152             { 
    1153                 int dist2bord; 
    1154  
    1155                 e->test(); 
    1156                 (*edgeCount)++; 
    1157  
    1158                 dist2bord = e->distanceToBorder(); 
    1159                 if (dist2bord != e->Distance()) 
    1160                 { 
    1161                     cout << *e << "distance error: should=" << dist2bord << " is=" << e->Distance() << endl; 
    1162                 } 
    1163             } 
    1164             else 
    1165             { 
    1166                 cout << *tree << "has no edge to father\n"; 
    1167             } 
    1168         } 
    1169     } 
    1170  
    1171     if (!tree->is_leaf) 
    1172     { 
    1173         testTree((AP_tree_nlen*)tree->leftson,nodeCount,edgeCount); 
    1174         testTree((AP_tree_nlen*)tree->rightson,nodeCount,edgeCount); 
    1175     } 
    1176 } 
    1177  
    1178 static void TEST_testWholeTree(AW_window *, AWT_canvas *) 
    1179 // Tests the whole tree structure (edges and nodes) for consistency 
    1180 { 
    1181     AP_tree_nlen *root  = (AP_tree_nlen*)*ap_main->tree_root; 
    1182     int           nodes = 0; 
    1183     int           edges = 0; 
    1184  
    1185     if (root->father) 
    1186     { 
    1187         int m = INT_MAX; 
    1188  
    1189         cout << "OOPS! Root has father:\n" << *root << '\n'; 
    1190         while (m-- && root->father) root = root->Father(); 
    1191  
    1192         if (root->father) 
    1193         { 
    1194             cout << "Root node lost between:\n" 
    1195                  << *root << '\n' 
    1196                  << *(root->Father()) << '\n'; 
    1197         } 
    1198         else 
    1199         { 
    1200             cout << "Found a root:\n" << *root << "\n Let's test from here:\n"; 
    1201         } 
    1202     } 
    1203  
    1204     root->test_tree(); 
    1205     testTree(root, &nodes, &edges); 
    1206  
    1207     cout << "Nodes tested: " << nodes << '\n' 
    1208          << "Edges tested: " << edges << '\n'; 
    1209 } 
    1210 #endif // TEST_FUNCTIONS 
    1211  
    1212 static int dumpNodes(AP_tree_nlen *node) 
    1213 { 
    1214     int cnt = 1; 
    1215  
    1216     cout << *node 
    1217          << "(llen=" << node->leftlen 
    1218          << ",rlen=" << node->rightlen << ")\n"; 
    1219  
    1220     if (!node->is_leaf) 
    1221     { 
    1222         cnt += dumpNodes(node->Leftson()); 
    1223         cnt += dumpNodes(node->Rightson()); 
    1224     } 
    1225  
    1226     return cnt; 
    1227 } 
    1228  
    1229 #if defined(TEST_FUNCTIONS) 
    1230 static void TEST_dumpNodes(AW_window *, AWT_canvas *) 
    1231 { 
    1232     AP_tree_nlen *root = (AP_tree_nlen*)*ap_main->tree_root; 
    1233     int cnt; 
    1234  
    1235     cout << "----- Dumping all nodes in tree\n"; 
    1236     cnt = dumpNodes(root); 
    1237     cout << "----- " << cnt << "nodes dumped!\n"; 
    1238 } 
    12391128#endif // TEST_FUNCTIONS 
    12401129 
     
    12521141static void TEST_setBranchlen(AW_window *, AWT_canvas *ntw) 
    12531142{ 
    1254     AP_tree_nlen *root = (AP_tree_nlen*)*ap_main->tree_root; 
     1143    AP_tree_nlen *root = rootNode(); 
    12551144 
    12561145    setBranchlens(root,1.0); 
    12571146    refreshTree(ntw); 
    12581147} 
    1259 #endif // TEST_FUNCTIONS 
    1260  
    1261 /* 
    1262 static AP_tree_nlen *getRandomSonOf(AP_tree_nlen *daddy, int innerNodeAllowed,int rootAllowed) 
    1263 { 
    1264     if (daddy->is_leaf) return daddy; 
    1265     int r = rand() % (innerNodeAllowed && rootAllowed ? 3 : 2); 
    1266     if (r==2) return daddy; 
    1267     return getRandomSonOf(r ? daddy->Leftson() : daddy->Rightson(), 
    1268               innerNodeAllowed, 1); 
    1269 } 
    1270 static void TEST_performRandomMoves(AW_window *aww,AWT_canvas *ntw) 
    1271 { 
    1272     AWUSE(aww); 
    1273  
    1274     int cnt=10000; 
    1275  
    1276     while(cnt) 
    1277     { 
    1278     AP_tree_nlen *root = (AP_tree_nlen*)*ap_main->tree_root; 
    1279     AP_tree_nlen *source = getRandomSonOf(root,1,0); 
    1280     AP_tree_nlen *dest = getRandomSonOf(root,1,0); 
    1281  
    1282     if (source!=dest && !dest->is_son(source)) 
    1283     { 
    1284         root->setBranchlen(1.0,1.0); 
    1285         source->setBranchlen(1.0,1.0); 
    1286         dest->setBranchlen(1.0,1.0); 
    1287  
    1288         char *error = source->move(dest,0.5); 
    1289  
    1290         if (error) 
    1291         { 
    1292         cout << error << '\n'; 
    1293         break; 
    1294         } 
    1295  
    1296         cnt--; 
    1297 //      cout << "Moves left: " << cnt << '\n'; 
    1298     } 
    1299     } 
    1300  
    1301     cout << "Testing tree\n"; 
    1302     TEST_testWholeTree(aww,ntw); 
    1303  
    1304 //    cout << "setting branchlens\n"; 
    1305 //    TEST_setBranchlen(aww,ntw); 
    1306  
    1307 //    cout << "dumping nodes\n"; 
    1308 //    TEST_dumpNodes(aww,ntw); 
    1309  
    1310     cout << "done\n"; 
    1311 //    refreshTree(ntw); 
    1312 } 
    1313 */ 
    1314  
    1315 #if defined(TEST_FUNCTIONS) 
     1148 
     1149static void TEST_treeStats(AW_window *, AWT_canvas *) { 
     1150    ARB_tree_info tinfo; 
     1151    AP_tree_nlen *root = rootNode(); 
     1152 
     1153    { 
     1154        GB_transaction ta(root->get_tree_root()->get_gb_main()); 
     1155        root->calcTreeInfo(tinfo); 
     1156    } 
     1157 
     1158    puts("Tree stats:"); 
     1159     
     1160    printf("nodes      =%6zu\n", tinfo.nodes()); 
     1161    printf(" inner     =%6zu\n", tinfo.innerNodes); 
     1162    printf("  groups   =%6zu\n", tinfo.groups); 
     1163    printf(" leafs     =%6zu\n", tinfo.leafs); 
     1164    printf("  unlinked =%6zu (zombies?)\n", tinfo.unlinked); 
     1165    printf("  linked   =%6zu\n", tinfo.linked()); 
     1166    printf("   marked  =%6zu\n", tinfo.marked); 
     1167} 
     1168 
    13161169static void TEST_mixTree(AW_window *, AWT_canvas *ntw) 
    13171170{ 
     
    13221175static void TEST_sortTreeByName(AW_window *, AWT_canvas *ntw) 
    13231176{ 
    1324     AP_tree_nlen *root = (AP_tree_nlen*)*ap_main->tree_root; 
     1177    AP_tree_nlen *root = rootNode(); 
    13251178 
    13261179    root->sortByName(); 
     
    13301183static void TEST_buildAndDumpChain(AW_window *, AWT_canvas *) 
    13311184{ 
    1332     AP_tree_nlen *root = (AP_tree_nlen*)*ap_main->tree_root; 
     1185    AP_tree_nlen *root = rootNode(); 
    13331186 
    13341187    root->Leftson()->edgeTo(root->Rightson())->testChain(2); 
     
    13491202    awm->create_menu("Test[debug]", "T", AWM_ALL ); 
    13501203 
    1351     awm->insert_menu_topic(0, "Test edges",         "T", "", AWM_ALL, (AW_CB)TEST_testWholeTree,     (AW_CL)ntw, 0); 
    13521204    awm->insert_menu_topic(0, "Mix tree",           "M", "", AWM_ALL, (AW_CB)TEST_mixTree,           (AW_CL)ntw, 0); 
    1353     awm->insert_menu_topic(0, "Dump nodes",         "D", "", AWM_ALL, (AW_CB)TEST_dumpNodes,         (AW_CL)ntw, 0); 
     1205    awm->insert_menu_topic(0, "Tree statistics",    "s", "", AWM_ALL, (AW_CB)TEST_treeStats,         (AW_CL)ntw, 0); 
    13541206    awm->insert_menu_topic(0, "Set branchlens",     "b", "", AWM_ALL, (AW_CB)TEST_setBranchlen,      (AW_CL)ntw, 0); 
    1355     awm->insert_menu_topic(0, "Sort tree by name",  "S", "", AWM_ALL, (AW_CB)TEST_sortTreeByName,    (AW_CL)ntw, 0); 
     1207    awm->insert_menu_topic(0, "Sort tree by name",  "o", "", AWM_ALL, (AW_CB)TEST_sortTreeByName,    (AW_CL)ntw, 0); 
    13561208    awm->insert_menu_topic(0, "Build & dump chain", "c", "", AWM_ALL, (AW_CB)TEST_buildAndDumpChain, (AW_CL)ntw, 0); 
    13571209    awm->insert_separator(); 
    1358     awm->insert_menu_topic(0, "Add marked species",          "A", "pa_quick.hlp", AWM_ALL, (AW_CB)NT_quick_add_test,  (AW_CL)ntw, 0); 
    1359     awm->insert_menu_topic(0, "Add marked species + NNI",    "N", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_add_test,        (AW_CL)ntw, 0); 
    1360     awm->insert_menu_topic(0, "Remove & add marked species", "o", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_rquick_add_test, (AW_CL)ntw, 0); 
    1361     awm->insert_menu_topic(0, "Remove & add marked + NNI",   "v", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_radd_test,       (AW_CL)ntw, 0); 
     1210    awm->insert_menu_topic(0, "Add marked species",          "A", "pa_quick.hlp", AWM_ALL, (AW_CB)NT_quick_add_test,  (AW_CL)ntw, NT_ADD_MARKED); 
     1211    awm->insert_menu_topic(0, "Add marked species + NNI",    "N", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_add_test,        (AW_CL)ntw, NT_ADD_MARKED); 
     1212    awm->insert_menu_topic(0, "Remove & add marked species", "o", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_rquick_add_test, (AW_CL)ntw, NT_ADD_MARKED); 
     1213    awm->insert_menu_topic(0, "Remove & add marked + NNI",   "v", "pa_add.hlp",   AWM_ALL, (AW_CB)NT_radd_test,       (AW_CL)ntw, NT_ADD_MARKED); 
    13621214    awm->insert_separator(); 
    1363     awm->insert_menu_topic(0, "Add selected species",       "l", "pa_quick_sel.hlp", AWM_ALL, (AW_CB)NT_quick_add_test, (AW_CL)ntw, 1); 
    1364     awm->insert_menu_topic(0, "Add selected species + NNI", "I", "pa_add_sel.hlp",   AWM_ALL, (AW_CB)NT_add_test,       (AW_CL)ntw, 1); 
     1215    awm->insert_menu_topic(0, "Add selected species",       "l", "pa_quick_sel.hlp", AWM_ALL, (AW_CB)NT_quick_add_test, (AW_CL)ntw, NT_ADD_SELECTED); 
     1216    awm->insert_menu_topic(0, "Add selected species + NNI", "I", "pa_add_sel.hlp",   AWM_ALL, (AW_CB)NT_add_test,       (AW_CL)ntw, NT_ADD_SELECTED); 
    13651217} 
    13661218#endif // TEST_FUNCTIONS 
     
    14081260******************************************************/ 
    14091261 
    1410 static void pars_start_cb(AW_window *aw_parent, AW_CL cd_adfiltercbstruct) { 
    1411     AW_root *awr = aw_parent->get_root(); 
     1262 
     1263 
     1264static void pars_start_cb(AW_window *aw_parent, AW_CL cd_weightedFilter, AW_CL cl_cmds) { 
     1265    WeightedFilter *wfilt = (WeightedFilter*)cd_weightedFilter; 
     1266    PARS_commands  *cmds  = (PARS_commands*)cl_cmds; 
     1267    AW_root        *awr   = aw_parent->get_root(); 
    14121268    GB_begin_transaction(GLOBAL_gb_main); 
    14131269    { 
     
    14281284 
    14291285    AW_gc_manager aw_gc_manager = 0; 
    1430     GLOBAL_NT->tree             = PARS_generate_tree(awr); 
     1286 
     1287    GLOBAL_PARS->tree = PARS_generate_tree(awr, wfilt); 
    14311288 
    14321289    AWT_canvas *ntw; 
    14331290    { 
    1434         AP_tree_sort  old_sort_type = GLOBAL_NT->tree->tree_sort; 
    1435         GLOBAL_NT->tree->set_tree_type(AP_LIST_SIMPLE); // avoid NDS warnings during startup 
    1436         ntw = new AWT_canvas(GLOBAL_gb_main, (AW_window *)awm, GLOBAL_NT->tree, aw_gc_manager, AWAR_TREE); 
    1437         GLOBAL_NT->tree->set_tree_type(old_sort_type); 
    1438     } 
    1439  
    1440     { 
     1291        AP_tree_sort  old_sort_type = GLOBAL_PARS->tree->tree_sort; 
     1292        GLOBAL_PARS->tree->set_tree_type(AP_LIST_SIMPLE); // avoid NDS warnings during startup 
     1293        ntw = new AWT_canvas(GLOBAL_gb_main, (AW_window *)awm, GLOBAL_PARS->tree, aw_gc_manager, AWAR_TREE); 
     1294        GLOBAL_PARS->tree->set_tree_type(old_sort_type); 
     1295    } 
     1296 
     1297    { 
     1298        GB_ERROR error = 0; 
     1299 
    14411300        aw_openstatus("load tree"); 
    1442         NT_reload_tree_event(awr,ntw,GB_TRUE);          // load first tree and set delete callbacks 
    1443         if (!GLOBAL_NT->tree->tree_root) { 
    1444             aw_closestatus(); 
    1445             aw_popup_exit("I cannot load the selected tree"); 
    1446         } 
    1447  
    1448         AP_tree_edge::initialize((AP_tree_nlen*)*ap_main->tree_root);   // builds edges 
    1449         GLOBAL_NT->tree->tree_root->remove_leafs(ntw->gb_main, AWT_REMOVE_DELETED); 
    1450  
    1451         adfiltercbstruct *acbs = (adfiltercbstruct*)cd_adfiltercbstruct; 
    1452         NT_tree_init(GLOBAL_NT->tree, acbs); 
    1453              
    1454         GLOBAL_NT->tree->tree_root->remove_leafs(ntw->gb_main, AWT_REMOVE_DELETED | AWT_REMOVE_NO_SEQUENCE); 
    1455  
    1456         GB_commit_transaction(ntw->gb_main); 
    1457         aw_status("Calculating inner nodes"); 
    1458         GLOBAL_NT->tree->tree_root->costs(); 
    1459  
     1301        NT_reload_tree_event(awr, ntw);             // load first tree 
     1302        if (!GLOBAL_PARS->tree->get_root_node()) { 
     1303            error = "I cannot load the selected tree"; 
     1304        } 
     1305        else { 
     1306            AP_tree_edge::initialize(rootNode());   // builds edges 
     1307            GLOBAL_PARS->tree->tree_static->remove_leafs(AWT_REMOVE_DELETED); 
     1308 
     1309            PARS_tree_init(GLOBAL_PARS->tree); 
     1310            GLOBAL_PARS->tree->tree_static->remove_leafs(AWT_REMOVE_DELETED | AWT_REMOVE_NO_SEQUENCE); 
     1311 
     1312            if (!GLOBAL_PARS->tree->get_root_node()) { 
     1313                const char *aliname = GLOBAL_PARS->tree->tree_static->get_aliview()->get_aliname(); 
     1314                error               = GBS_global_string("Less than 2 species contain data in '%s'\n" 
     1315                                                        "Tree vanished", aliname); 
     1316            } 
     1317 
     1318            error = GB_end_transaction(ntw->gb_main, error); 
     1319            if (!error) { 
     1320                aw_status("Calculating inner nodes"); 
     1321                AP_TREE_NLEN_CAST(GLOBAL_PARS->tree->get_root_node())->costs(); 
     1322            } 
     1323        } 
    14601324        aw_closestatus(); 
     1325        if (error) aw_popup_exit(error); 
    14611326    } 
    14621327 
    14631328    awr->awar( AWAR_COLOR_GROUPS_USE)->add_callback( (AW_RCB)NT_recompute_cb, (AW_CL)ntw,0); 
    14641329 
    1465     if (ap_main->commands.add_marked)           NT_quick_add(awm,ntw,0); 
    1466     if (ap_main->commands.add_selected)         NT_quick_add(awm,ntw,1); 
    1467     if (ap_main->commands.calc_branch_lengths)  NT_branch_lengths(awm,ntw); 
    1468     if (ap_main->commands.calc_bootstrap)       NT_bootstrap(awm,ntw,0); 
    1469     if (ap_main->commands.quit)                 pars_exit(awm); 
     1330    if (cmds->add_marked)           NT_quick_add(awm,ntw,NT_ADD_MARKED); 
     1331    if (cmds->add_selected)         NT_quick_add(awm,ntw,NT_ADD_SELECTED); 
     1332    if (cmds->calc_branch_lengths)  NT_branch_lengths(awm,ntw); 
     1333    if (cmds->calc_bootstrap)       NT_bootstrap(awm,ntw,0); 
     1334    if (cmds->quit)                 pars_exit(awm); 
    14701335 
    14711336    GB_transaction dummy(ntw->gb_main); 
     
    15171382        awm->insert_sub_menu("Add Species to Tree",      "A"); 
    15181383        { 
    1519             awm->insert_menu_topic("add_marked",         "Add Marked Species",                              "M", "pa_quick.hlp",     AWM_ALL, (AW_CB)NT_quick_add,  (AW_CL)ntw, 0); 
    1520             awm->insert_menu_topic("add_marked_nni",     "Add Marked Species + Local Optimization (NNI)",   "N", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_add,        (AW_CL)ntw, 0); 
    1521             awm->insert_menu_topic("rm_add_marked",      "Remove & Add Marked Species",                     "R", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_rquick_add, (AW_CL)ntw, 0); 
    1522             awm->insert_menu_topic("rm_add_marked_nni|", "Remove & Add Marked + Local Optimization (NNI)",  "L", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_radd,       (AW_CL)ntw, 0); 
     1384            awm->insert_menu_topic("add_marked",         "Add Marked Species",                              "M", "pa_quick.hlp",     AWM_ALL, (AW_CB)NT_quick_add,  (AW_CL)ntw, NT_ADD_MARKED); 
     1385            awm->insert_menu_topic("add_marked_nni",     "Add Marked Species + Local Optimization (NNI)",   "N", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_add,        (AW_CL)ntw, NT_ADD_MARKED); 
     1386            awm->insert_menu_topic("rm_add_marked",      "Remove & Add Marked Species",                     "R", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_rquick_add, (AW_CL)ntw, NT_ADD_MARKED); 
     1387            awm->insert_menu_topic("rm_add_marked_nni|", "Remove & Add Marked + Local Optimization (NNI)",  "L", "pa_add.hlp",       AWM_ALL, (AW_CB)NT_radd,       (AW_CL)ntw, NT_ADD_MARKED); 
    15231388            awm->insert_separator(); 
    15241389            awm->insert_menu_topic("add_marked_partial", "Add Marked Partial Species",                      "P", "pa_partial.hlp",   AWM_ALL, NT_partial_add,       (AW_CL)ntw, (AW_CL)0); 
    15251390            awm->insert_separator(); 
    1526             awm->insert_menu_topic("add_selected",       "Add Selected Species",                            "S", "pa_quick_sel.hlp", AWM_ALL, (AW_CB)NT_quick_add,  (AW_CL)ntw, 1); 
    1527             awm->insert_menu_topic("add_selected_nni",   "Add Selected Species + Local Optimization (NNI)", "O", "pa_add_sel.hlp",   AWM_ALL, (AW_CB)NT_add,        (AW_CL)ntw, 1); 
     1391            awm->insert_menu_topic("add_selected",       "Add Selected Species",                            "S", "pa_quick_sel.hlp", AWM_ALL, (AW_CB)NT_quick_add,  (AW_CL)ntw, NT_ADD_SELECTED); 
     1392            awm->insert_menu_topic("add_selected_nni",   "Add Selected Species + Local Optimization (NNI)", "O", "pa_add_sel.hlp",   AWM_ALL, (AW_CB)NT_add,        (AW_CL)ntw, NT_ADD_SELECTED); 
    15281393        } 
    15291394        awm->close_sub_menu(); 
     
    16821547} 
    16831548 
    1684 static AW_window *create_pars_init_window(AW_root *awr) 
    1685 { 
     1549static AW_window *create_pars_init_window(AW_root *awr, const PARS_commands *cmds) { 
    16861550    AW_window_simple *aws = new AW_window_simple; 
    16871551    aws->init( awr, "PARS_PROPS", "SET PARSIMONY OPTIONS"); 
     
    16991563    aws->create_button("HELP","HELP","H"); 
    17001564 
     1565    WeightedFilter *weighted_filter = // do NOT free (bound to callbacks) 
     1566        new WeightedFilter(GLOBAL_gb_main, aws->get_root(), AWAR_FILTER_NAME, AWAR_CSP_NAME); 
     1567 
    17011568    aws->at("filter"); 
    1702     adfiltercbstruct *filtercd = awt_create_select_filter(aws->get_root(),GLOBAL_gb_main,AWAR_FILTER_NAME); 
    1703     aws->callback(AW_POPUP, (AW_CL)awt_create_select_filter_win, (AW_CL)filtercd); 
     1569    aws->callback(AW_POPUP, (AW_CL)awt_create_select_filter_win, (AW_CL)weighted_filter->get_adfiltercbstruct()); 
    17041570    aws->create_button("SELECT_FILTER",AWAR_FILTER_NAME); 
    17051571 
    1706     aws->callback(pars_start_cb, (AW_CL)filtercd); 
     1572    aws->at("weights"); 
     1573    aws->callback(AW_POPUP,(AW_CL)create_csp_window,(AW_CL)weighted_filter->get_csp()); 
     1574    aws->create_button("SELECT_CSP", AWAR_CSP_NAME); 
     1575 
     1576    aws->at("alignment"); 
     1577    awt_create_selection_list_on_ad(GLOBAL_gb_main,(AW_window *)aws,AWAR_ALIGNMENT,"*="); 
     1578 
     1579    aws->at("tree"); 
     1580    awt_create_selection_list_on_trees(GLOBAL_gb_main,(AW_window *)aws,AWAR_TREE); 
     1581 
     1582    aws->callback(pars_start_cb, (AW_CL)weighted_filter, (AW_CL)cmds); 
    17071583    aws->at("go"); 
    17081584    aws->create_button("GO","GO","G"); 
    17091585 
    1710     aws->at("alignment"); 
    1711     awt_create_selection_list_on_ad(GLOBAL_gb_main,(AW_window *)aws,AWAR_ALIGNMENT,"*="); 
    1712  
    1713     aws->at("tree"); 
    1714     awt_create_selection_list_on_trees(GLOBAL_gb_main,(AW_window *)aws,AWAR_TREE); 
    1715  
    1716     awt_csp = new AWT_csp(GLOBAL_gb_main,awr,"tmp/pars/csp/name"); 
    1717  
    1718     aws->at("weights"); 
    1719     aws->callback(AW_POPUP,(AW_CL)create_csp_window,(AW_CL)awt_csp); 
    1720     aws->create_button("SELECT_CSP","tmp/pars/csp/name"); 
    1721  
    1722     return (AW_window *)aws; 
     1586    return aws; 
    17231587} 
    17241588 
     
    18451709    ap_main = new AP_main; 
    18461710 
    1847     GLOBAL_NT      = (NT_global *)calloc(sizeof(NT_global),1); 
    1848     GLOBAL_NT->awr = aw_root; 
     1711    GLOBAL_PARS      = (PARS_global *)calloc(sizeof(PARS_global),1); 
     1712    GLOBAL_PARS->awr = aw_root; 
    18491713 
    18501714    const char *db_server = ":"; 
     1715 
     1716    PARS_commands cmds; 
    18511717 
    18521718    while (argc>=2 && argv[1][0] == '-'){ 
    18531719        argc--; 
    18541720        argv++; 
    1855         if (!strcmp(argv[0],"-quit")){ 
    1856             ap_main->commands.quit = 1; 
    1857             continue; 
    1858         } 
    1859         if (!strcmp(argv[0],"-add_marked")){ 
    1860             ap_main->commands.add_marked = 1; 
    1861             continue; 
    1862         } 
    1863         if (!strcmp(argv[0],"-add_selected")){ 
    1864             ap_main->commands.add_selected = 1; 
    1865             continue; 
    1866         } 
    1867         if (!strcmp(argv[0],"-calc_branchlengths")){ 
    1868             ap_main->commands.calc_branch_lengths = 1; 
    1869             continue; 
    1870         } 
    1871         if (!strcmp(argv[0],"-calc_bootstrap")){ 
    1872             ap_main->commands.calc_bootstrap = 1; 
    1873             continue; 
    1874         } 
    1875         GB_export_errorf("Unknown option '%s'",argv[0]); 
    1876         GB_print_error(); 
    1877         printf("    Options:                Meaning:\n" 
    1878                "\n" 
    1879                "    -add_marked             add marked species   (without changing topology)\n" 
    1880                "    -add_selected           add selected species (without changing topology)\n" 
    1881                "    -calc_branchlengths     calculate branch lengths only\n" 
    1882                "    -calc_bootstrap         estimate bootstrap values\n" 
    1883                "    -quit                   quit after performing operations\n" 
    1884                ); 
    1885  
    1886         exit(-1); 
     1721        if (!strcmp(argv[0],"-quit"))                    cmds.quit = 1; 
     1722        else if (!strcmp(argv[0],"-add_marked"))         cmds.add_marked = 1; 
     1723        else if (!strcmp(argv[0],"-add_selected"))       cmds.add_selected = 1; 
     1724        else if (!strcmp(argv[0],"-calc_branchlengths")) cmds.calc_branch_lengths = 1; 
     1725        else if (!strcmp(argv[0],"-calc_bootstrap"))     cmds.calc_bootstrap = 1; 
     1726        else { 
     1727            GB_export_errorf("Unknown option '%s'",argv[0]); 
     1728            GB_print_error(); 
     1729            printf("    Options:                Meaning:\n" 
     1730                   "\n" 
     1731                   "    -add_marked             add marked species   (without changing topology)\n" 
     1732                   "    -add_selected           add selected species (without changing topology)\n" 
     1733                   "    -calc_branchlengths     calculate branch lengths only\n" 
     1734                   "    -calc_bootstrap         estimate bootstrap values\n" 
     1735                   "    -quit                   quit after performing operations\n" 
     1736                   ); 
     1737 
     1738            exit(-1); 
     1739        } 
    18871740    } 
    18881741 
     
    19011754    pars_create_all_awars(aw_root,aw_default); 
    19021755 
    1903     aww = create_pars_init_window(aw_root); 
     1756    aww = create_pars_init_window(aw_root, &cmds); 
    19041757    aww->show(); 
    19051758 
     
    19091762} 
    19101763 
    1911  
  • trunk/PARSIMONY/ap_tree_nlen.hxx

    r6141 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : ap_tree_nlen.hxx                                  // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Coded by Ralf Westram (coder@reallysoft.de) in Summer 1995    // 
     7//   Institute of Microbiology (Technical University Munich)       // 
     8//   http://www.arb-home.de/                                       // 
     9//                                                                 // 
     10// =============================================================== // 
     11 
     12#ifndef AP_TREE_NLEN_HXX 
     13#define AP_TREE_NLEN_HXX 
     14 
     15#ifndef _CPP_IOSTREAM 
    116#include <iostream> 
    2 #include <limits.h> 
    3  
    4 #define ap_assert(x) arb_assert(x) 
     17#endif 
     18#ifndef _CPP_CLIMITS 
     19#include <climits> 
     20#endif 
     21#ifndef ARBDBT_H 
     22#include <arbdbt.h> 
     23#endif 
     24#ifndef AP_TREE_HXX 
     25#include <AP_Tree.hxx> 
     26#endif 
     27#ifndef AP_BUFFER_HXX 
     28#include "AP_buffer.hxx" 
     29#endif 
     30#ifndef AP_MAIN_HXX 
     31#include <ap_main.hxx> 
     32#endif 
     33 
     34// --------------------------------------------- 
     35//      downcasts for AP_tree_nlen 
     36 
     37#ifndef DOWNCAST_H 
     38#include <downcast.h> 
     39#endif 
     40 
     41#define AP_TREE_NLEN_CAST(arb_tree)       DOWNCAST(AP_tree_nlen*, arb_tree) 
     42#define AP_TREE_NLEN_CONST_CAST(arb_tree) DOWNCAST(const AP_tree_nlen*, arb_tree) 
     43 
     44 
    545 
    646class AP_tree_nlen; 
     
    3070    AP_BL_NNI_BL             = 3, // better tree & branch lengths 
    3171    AP_BL_BOOTSTRAP_LIMIT    = 4, // calculate upper bootstrap limits 
    32     AP_BL_BOOTSTRAP_ESTIMATE = 12 // calculate estimate of bootstrap 
     72    AP_BL_BOOTSTRAP_ESTIMATE = 12 // calculate estimate of bootstrap (includes AP_BL_BOOTSTRAP_LIMIT) 
    3373} AP_BL_MODE; 
    3474 
    3575class AP_tree_edge; 
    3676 
    37 class AP_tree_nlen : public AP_tree {           /* tree that is independent of branch lengths and root */ 
    38     AP_tree *dup(void); 
    39  
    40     AP_BOOL clear(unsigned long stack_update,unsigned long user_push_counter); 
    41     void    unhash_sequence(void); 
    42     void    createListRekUp(AP_CO_LIST *list,int *cn); 
    43     void    createListRekSide(AP_CO_LIST *list,int *cn); 
    44  
     77class AP_tree_nlen : public AP_tree { 
     78    /* tree that is independent of branch lengths and root */ 
    4579 
    4680    AP_TREE_SIDE kernighan;     // Flag zum markieren 
     
    5286    int           index[3];     // index to node[] in AP_tree_edge 
    5387 
    54 protected: 
     88    AP_FLOAT mutation_rate; 
     89 
     90 
     91     
     92    AP_tree_nlen *dup() const; 
     93 
     94    void createListRekUp(AP_CO_LIST *list,int *cn); 
     95    void createListRekSide(AP_CO_LIST *list,int *cn); 
    5596 
    5697public: 
    57     AP_FLOAT costs(void);       /* cost of a tree (number of changes ..)*/ 
    58     AP_BOOL  push(AP_STACK_MODE, unsigned long); /* push state of costs */ 
    59     void     pop(unsigned long); /* pop old tree costs */ 
    60      
    61     virtual AP_UPDATE_FLAGS check_update(); // disable  load !!!! 
    62  
    63  
    6498    AP_tree_nlen(AP_tree_root *tree_root); 
    6599    virtual ~AP_tree_nlen() {} 
    66100 
     101    void     unhash_sequence(); 
     102    AP_FLOAT costs(char *mutPerSite = NULL);        /* cost of a tree (number of changes ..)*/ 
     103 
     104    AP_BOOL push(AP_STACK_MODE, unsigned long); /* push state of costs */ 
     105    void    pop(unsigned long); /* pop old tree costs */ 
     106    AP_BOOL clear(unsigned long stack_update,unsigned long user_push_counter); 
     107 
     108    virtual AP_UPDATE_FLAGS check_update(); // disable  load !!!! 
     109 
    67110    void copy(AP_tree_nlen *tree); 
    68111    int  Distance(); 
     
    70113    // tree reconstruction methods: 
    71114    void insert(AP_tree *new_brother); 
    72     void remove(void); 
     115    void remove(); 
    73116    void swap_assymetric(AP_TREE_SIDE mode); 
    74117    void moveTo(AP_tree *new_brother, AP_FLOAT rel_pos); // if unsure, use cantMoveTo to test if possible 
     
    76119 
    77120    // tree optimization methods: 
    78     void parsimony_rek(); 
     121    void parsimony_rek(char *mutPerSite = NULL); 
    79122 
    80123    AP_FLOAT nn_interchange_rek(AP_BOOL     openclosestatus, 
     
    109152    void setBranchlen(double leftLen,double rightLen) { leftlen = leftLen; rightlen = rightLen; } 
    110153 
    111     int         test() const; 
    112154    const char* fullname() const; 
    113  
    114155    const char* sortByName(); 
    115156 
    116157    // casted access to neighbours: 
    117158 
    118     AP_tree_nlen *Father() const { return (AP_tree_nlen*)father; } 
    119     AP_tree_nlen *Brother() const { return (AP_tree_nlen*)brother(); } 
    120     AP_tree_nlen *Leftson() const { return (AP_tree_nlen*)leftson; } 
    121     AP_tree_nlen *Rightson() const { return (AP_tree_nlen*)rightson; } 
     159    AP_tree_nlen *Father()   { return AP_TREE_NLEN_CAST(get_father()); } 
     160    AP_tree_nlen *Brother()  { return AP_TREE_NLEN_CAST(get_brother()); } 
     161    AP_tree_nlen *Leftson()  { return AP_TREE_NLEN_CAST(get_leftson()); } 
     162    AP_tree_nlen *Rightson() { return AP_TREE_NLEN_CAST(get_rightson()); } 
     163    const AP_tree_nlen *Father() const { return AP_TREE_NLEN_CONST_CAST(get_father()); } 
     164    const AP_tree_nlen *Brother() const { return AP_TREE_NLEN_CONST_CAST(get_brother()); } 
     165    const AP_tree_nlen *Leftson() const { return AP_TREE_NLEN_CONST_CAST(get_leftson()); } 
     166    const AP_tree_nlen *Rightson() const { return AP_TREE_NLEN_CONST_CAST(get_rightson()); } 
    122167 
    123168    // AP_tree_edge access functions: 
     
    134179    void unlinkAllEdges(AP_tree_edge **edgePtr1, AP_tree_edge **edgePtr2, AP_tree_edge **edgePtr3); 
    135180 
    136     //void      destroyAllEdges(); 
    137  
    138     // test stuff: 
    139  
    140     char *getSequence(); 
    141  
     181    char *getSequenceCopy(); 
     182 
     183#if defined(CHECK_TREE_STRUCTURE) 
     184    void assert_edges_valid() const; 
     185    void assert_valid() const; 
     186#endif // CHECK_TREE_STRUCTURE 
     187 
     188     
    142189    friend      class AP_tree_edge; 
    143190    friend      std::ostream& operator<<(std::ostream&,const AP_tree_nlen&); 
     
    146193 
    147194/************ AP_tree_edge  ************/ 
     195 
     196class MutationsPerSite; 
     197 
    148198class AP_tree_edge 
    149199{ 
     
    175225                             AP_tree_edge       *comesFrom   = NULL); 
    176226 
    177     long sizeofChain(void); 
     227    long sizeofChain(); 
    178228    void calcDistance(); 
    179229    void tailDistance(AP_tree_nlen*); 
     
    223273                     AP_tree_nlen *skipNode    = NULL); 
    224274 
    225     AP_FLOAT nni(AP_FLOAT pars_one, AP_BL_MODE mode); 
     275    AP_FLOAT nni_mutPerSite(AP_FLOAT pars_one, AP_BL_MODE mode, MutationsPerSite *mps); 
     276    AP_FLOAT nni(AP_FLOAT pars_one, AP_BL_MODE mode) { return nni_mutPerSite(pars_one, mode, NULL); } 
    226277 
    227278    // test methods: 
     
    233284 
    234285    int Distance() const { ap_assert(distanceOK()); return (node[0]->distance+node[1]->distance) >> 1; } 
    235     int distanceToBorder(int maxsearch=INT_MAX,AP_tree_nlen *skip=NULL) const;  // obsolete 
     286    int distanceToBorder(int maxsearch=INT_MAX,AP_tree_nlen *skip=NULL) const; // obsolete 
    236287 
    237288    static int dumpNNI;             // should NNI dump its values? 
     
    242293    void countSpecies(int deep=-1,const AP_tree_nlen* skip=NULL); 
    243294 
    244     static int speciesInTree;   // no of species (leafs) in tree 
    245     static int nodesInTree;     // no of nodes in tree 
     295    static int speciesInTree;                       // no of species (leafs) in tree (updated by countSpecies) 
     296    static int nodesInTree;                         // no of nodes in tree - including leafs, but w/o rootnode (updated by countSpecies) 
     297 
     298    static int edgesInTree() { return nodesInTree-1; } // (updated by countSpecies) 
    246299}; 
    247300 
     
    251304 
    252305inline AP_tree_nlen *rootNode() { 
    253     return ((AP_tree_nlen*)*ap_main->tree_root); 
     306    return ap_main->get_root_node(); 
    254307} 
    255308 
     
    259312 
    260313/**************************************************/ 
     314 
     315#else 
     316#error ap_tree_nlen.hxx included twice 
     317#endif // AP_TREE_NLEN_HXX 
  • trunk/PARSIMONY/pars_dtree.hxx

    r5827 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : pars_dtree.hxx                                    // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef PARS_DTREE_HXX 
     12#define PARS_DTREE_HXX 
     13 
     14#ifndef TREEDISPLAY_HXX 
     15#include <TreeDisplay.hxx> 
     16#endif 
     17 
     18 
    119class AWT_graphic_parsimony: public AWT_graphic_tree { 
    220    virtual AW_gc_manager init_devices(AW_window *,AW_device *, AWT_canvas *ntw,AW_CL cd2); 
     
    1634}; 
    1735 
    18 struct adfiltercbstruct; 
    19 void NT_tree_init(AWT_graphic_tree *agt, adfiltercbstruct *pars_global_filter); 
     36void PARS_tree_init(AWT_graphic_tree *agt); 
    2037void PARS_optimizer_cb(AP_tree *tree); 
     38 
     39#else 
     40#error pars_dtree.hxx included twice 
     41#endif // PARS_DTREE_HXX 
  • trunk/PARSIMONY/pars_main.hxx

    r5827 r6280  
    1 #define MIN_SEQUENCE_LENGTH     20 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : pars_main.hxx                                     // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    210 
    3 extern struct NT_global { 
    4     AW_root *awr; 
     11#ifndef PARS_MAIN_HXX 
     12#define PARS_MAIN_HXX 
     13 
     14#define MIN_SEQUENCE_LENGTH 20 
     15 
     16class AW_root; 
     17class AWT_graphic_tree; 
     18class WeightedFilter; 
     19 
     20extern struct PARS_global { 
     21    AW_root          *awr; 
    522    AWT_graphic_tree *tree; 
    6 } *GLOBAL_NT; 
     23} *GLOBAL_PARS; 
    724 
    8 AWT_graphic_tree *PARS_generate_tree(AW_root *root); 
     25AWT_graphic_tree *PARS_generate_tree(AW_root *root, WeightedFilter *pars_weighted_filter); 
    926 
     27 
     28#else 
     29#error pars_main.hxx included twice 
     30#endif // PARS_MAIN_HXX 
  • trunk/PHYLO/Makefile

    r6277 r6280  
    3737PH_data.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3838PH_data.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     39PH_data.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
    3940PH_data.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    4041PH_data.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    4445PH_data.o: $(ARBHOME)/INCLUDE/arbtools.h 
    4546PH_data.o: $(ARBHOME)/INCLUDE/attributes.h 
    46 PH_data.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    4747PH_data.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    4848PH_data.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    5050PH_data.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    5151PH_data.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    52 PH_data.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    53 PH_data.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    5452PH_data.o: $(ARBHOME)/INCLUDE/smartptr.h 
    5553 
     
    6159PH_display.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    6260PH_display.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     61PH_display.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
    6362PH_display.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    6463PH_display.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    6867PH_display.o: $(ARBHOME)/INCLUDE/arbtools.h 
    6968PH_display.o: $(ARBHOME)/INCLUDE/attributes.h 
    70 PH_display.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    7169PH_display.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    7270PH_display.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    7472PH_display.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    7573PH_display.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    76 PH_display.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    77 PH_display.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    7874PH_display.o: $(ARBHOME)/INCLUDE/smartptr.h 
    7975 
     
    8480PH_filt.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    8581PH_filt.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     82PH_filt.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
    8683PH_filt.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    8784PH_filt.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    9188PH_filt.o: $(ARBHOME)/INCLUDE/arbtools.h 
    9289PH_filt.o: $(ARBHOME)/INCLUDE/attributes.h 
    93 PH_filt.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    9490PH_filt.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    9591PH_filt.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    9793PH_filt.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    9894PH_filt.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    99 PH_filt.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    100 PH_filt.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    10195PH_filt.o: $(ARBHOME)/INCLUDE/smartptr.h 
    10296 
     
    108102PH_main.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    109103PH_main.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     104PH_main.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
    110105PH_main.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    111106PH_main.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    115110PH_main.o: $(ARBHOME)/INCLUDE/arbtools.h 
    116111PH_main.o: $(ARBHOME)/INCLUDE/attributes.h 
    117 PH_main.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    118112PH_main.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    119113PH_main.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    123117PH_main.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    124118PH_main.o: $(ARBHOME)/INCLUDE/awt.hxx 
    125 PH_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    126119PH_main.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    127 PH_main.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    128120PH_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
    129121 
     
    133125PH_matr.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    134126PH_matr.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     127PH_matr.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
     128PH_matr.o: $(ARBHOME)/INCLUDE/AP_pro_a_nucs.hxx 
    135129PH_matr.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    136130PH_matr.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    140134PH_matr.o: $(ARBHOME)/INCLUDE/arbtools.h 
    141135PH_matr.o: $(ARBHOME)/INCLUDE/attributes.h 
    142 PH_matr.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    143136PH_matr.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    144137PH_matr.o: $(ARBHOME)/INCLUDE/aw_global.hxx 
     
    148141PH_matr.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    149142PH_matr.o: $(ARBHOME)/INCLUDE/awt.hxx 
    150 PH_matr.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    151 PH_matr.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    152143PH_matr.o: $(ARBHOME)/INCLUDE/smartptr.h 
    153144 
     
    157148PH_root.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    158149PH_root.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     150PH_root.o: $(ARBHOME)/INCLUDE/AP_matrix.hxx 
    159151PH_root.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    160152PH_root.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    164156PH_root.o: $(ARBHOME)/INCLUDE/arbtools.h 
    165157PH_root.o: $(ARBHOME)/INCLUDE/attributes.h 
    166 PH_root.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    167158PH_root.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    168 PH_root.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    169 PH_root.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    170159PH_root.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/PHYLO/PH_matr.cxx

    r5625 r6280  
    44#include <awt.hxx> 
    55 
     6#include <AP_pro_a_nucs.hxx> 
     7 
    68#include <cstring> 
    79#include <cstdlib> 
     10 
    811 
    912#warning module completely unused 
  • trunk/PHYLO/phylo.hxx

    r5901 r6280  
    1 ///////////////////////////////////////////////////////////////// 
    2 ///////////////////////////////////////////////////////////////// 
    3 //                                                             // 
    4 //                    FILENAME: phylo.hxx                      // 
    5 //                                                             // 
    6 ///////////////////////////////////////////////////////////////// 
    7 //                                                             // 
    8 // contains: abstract classes and                              // 
    9 //           global needed definitions,declarations and        // 
    10 //           functions                                         // 
    11 //                                                             // 
    12 ///////////////////////////////////////////////////////////////// 
    13 ///////////////////////////////////////////////////////////////// 
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : phylo.hxx                                         // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
    1410 
     11#ifndef PHYLO_HXX 
     12#define PHYLO_HXX 
    1513 
    1614#ifndef _CPP_CSTDIO 
     
    2321#include <arbdbt.h> 
    2422#endif 
    25 #ifndef AWT_TREE_HXX 
    26 #include <awt_tree.hxx> 
     23#ifndef AW_ROOT_HXX 
     24#include <aw_root.hxx> 
    2725#endif 
    28  
     26#ifndef AP_MATRIX_HXX 
     27#include <AP_matrix.hxx> 
     28#endif 
    2929#ifndef ARB_ASSERT_H 
    3030#include <arb_assert.h> 
    3131#endif 
    32  
    3332#ifndef PH_FILTER_HXX 
    3433#include "PH_filter.hxx" 
     
    132131long AP_timer(void); 
    133132 
    134 GBT_TREE *neighbourjoining(char **names, AP_FLOAT **m, long size, size_t structure_size); 
    135  
    136133///////////////////////////////////////////////////////////////// 
    137134//                                                             // 
     
    192189}; 
    193190 
    194  
     191#else 
     192#error phylo.hxx included twice 
     193#endif // PHYLO_HXX 
  • trunk/PROBE_DESIGN/Makefile

    r6277 r6280  
    3434probe_design.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    3535probe_design.o: $(ARBHOME)/INCLUDE/adGene.h 
     36probe_design.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     37probe_design.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     38probe_design.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    3639probe_design.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    3740probe_design.o: $(ARBHOME)/INCLUDE/arb_error.h 
     41probe_design.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    3842probe_design.o: $(ARBHOME)/INCLUDE/arbdb.h 
    3943probe_design.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    5256probe_design.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    5357probe_design.o: $(ARBHOME)/INCLUDE/awt_config_manager.hxx 
    54 probe_design.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    5558probe_design.o: $(ARBHOME)/INCLUDE/awt_iupac.hxx 
    56 probe_design.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    5759probe_design.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    58 probe_design.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    59 probe_design.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
    6060probe_design.o: $(ARBHOME)/INCLUDE/client.h 
     61probe_design.o: $(ARBHOME)/INCLUDE/downcast.h 
    6162probe_design.o: $(ARBHOME)/INCLUDE/GEN.hxx 
    6263probe_design.o: $(ARBHOME)/INCLUDE/PT_com.h 
    6364probe_design.o: $(ARBHOME)/INCLUDE/servercntrl.h 
    6465probe_design.o: $(ARBHOME)/INCLUDE/smartptr.h 
     66probe_design.o: $(ARBHOME)/INCLUDE/TreeCallbacks.hxx 
     67probe_design.o: $(ARBHOME)/INCLUDE/TreeDisplay.hxx 
    6568 
    6669probe_match_parser.o: probe_match_parser.hxx 
     
    8891SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/attributes.h 
    8992SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    90 SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    9193SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    9294SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    98100SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_canvas.hxx 
    99101SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_config_manager.hxx 
    100 SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_dtree.hxx 
    101102SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_nds.hxx 
    102 SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    103103SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    104 SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    105 SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/awt_tree_cb.hxx 
    106104SaiProbeVisualization.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/PROBE_DESIGN/SaiProbeVisualization.cxx

    r6188 r6280  
    1818 
    1919#include <awt_canvas.hxx> 
    20 #include <awt_tree.hxx> 
    21 #include <awt_dtree.hxx> 
    22 #include <awt_tree_cb.hxx> 
    2320#include <awt_config_manager.hxx> 
    2421 
  • trunk/PROBE_DESIGN/probe_design.cxx

    r6141 r6280  
    1818 
    1919#include <awt_canvas.hxx> 
    20 #include <awt_tree.hxx> 
    21 #include <awt_dtree.hxx> 
    22 #include <awt_tree_cb.hxx> 
    2320#include <awt_config_manager.hxx> 
    2421#include <awt_canvas.hxx> 
     
    3431#include "probe_match_parser.hxx" 
    3532 
    36 void NT_group_not_marked_cb(void *dummy, AWT_canvas *ntw); // real prototype is in awt_tree_cb.hxx 
     33#include <TreeCallbacks.hxx> 
    3734 
    3835// general awars 
  • trunk/SECEDIT/SEC_graphic.cxx

    r6141 r6280  
    310310                break; 
    311311            } 
    312             case AWT_MODE_MOD:  // edit constraints 
     312            case AWT_MODE_EDIT:  // edit constraints 
    313313                if (button==AWT_M_LEFT && event==AW_Mouse_Press) { 
    314314                    error = change_constraints(elem); 
     
    489489                          AW_clicked_line *cl, AW_clicked_text *ct) 
    490490{ 
    491     if (cmd != AWT_MODE_MOD && cmd != AWT_MODE_STRETCH) sec_root->set_show_constraints(SEC_NO_TYPE); 
     491    if (cmd != AWT_MODE_EDIT && cmd != AWT_MODE_STRETCH) sec_root->set_show_constraints(SEC_NO_TYPE); 
    492492 
    493493    GB_ERROR error = 0; 
  • trunk/SECEDIT/SEC_main.cxx

    r6188 r6280  
    219219            break; 
    220220        } 
    221         case AWT_MODE_MOD: { 
     221        case AWT_MODE_EDIT: { 
    222222            text="CONSTRAINT MODE    LEFT: modify constraint"; 
    223223            sec_root->set_show_constraints(SEC_ANY_TYPE); 
     
    756756    awm->create_mode("rot.bitmap",         "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_ROT); 
    757757    awm->create_mode("stretch.bitmap",     "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_STRETCH); 
    758     awm->create_mode("info.bitmap",        "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_MOD); 
     758    awm->create_mode("info.bitmap",        "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_EDIT); 
    759759    awm->create_mode("sec_setcurs.bitmap", "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_LINE); 
    760760    awm->create_mode("probeInfo.bitmap",   "sec_mode.hlp", AWM_ALL, sec_mode_event, (AW_CL)root, (AW_CL)AWT_MODE_PROINFO); 
  • trunk/SEQ_QUALITY/Makefile

    r6277 r6280  
    3838SQ_functions.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3939SQ_functions.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     40SQ_functions.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    4041SQ_functions.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    4142SQ_functions.o: $(ARBHOME)/INCLUDE/arb_error.h 
     
    4546SQ_functions.o: $(ARBHOME)/INCLUDE/arbtools.h 
    4647SQ_functions.o: $(ARBHOME)/INCLUDE/attributes.h 
    47 SQ_functions.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    4848SQ_functions.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    4949SQ_functions.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    5454SQ_functions.o: $(ARBHOME)/INCLUDE/awt.hxx 
    5555SQ_functions.o: $(ARBHOME)/INCLUDE/awt_iupac.hxx 
    56 SQ_functions.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    57 SQ_functions.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    5856SQ_functions.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
    5957SQ_functions.o: $(ARBHOME)/INCLUDE/smartptr.h 
     
    6563SQ_GroupData.o: $(ARBHOME)/INCLUDE/attributes.h 
    6664 
    67 SQ_main.o: ../AWT/awtfilter.hxx 
    6865SQ_main.o: seq_quality.h 
    6966SQ_main.o: SQ_functions.h 
     
    8077SQ_main.o: $(ARBHOME)/INCLUDE/attributes.h 
    8178SQ_main.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    82 SQ_main.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    8379SQ_main.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
    8480SQ_main.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     
    8783SQ_main.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    8884SQ_main.o: $(ARBHOME)/INCLUDE/awt.hxx 
    89 SQ_main.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
     85SQ_main.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    9086SQ_main.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    91 SQ_main.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    9287SQ_main.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/SEQ_QUALITY/SQ_functions.cxx

    r6141 r6280  
    2626#include <aw_preset.hxx> 
    2727#include <awt.hxx> 
    28 #include <awt_tree.hxx> 
    2928 
    3029#include "SQ_GroupData.h" 
     
    411410 
    412411char *SQ_fetch_filtered_sequence(GBDATA * read_sequence, AP_filter * filter) { 
    413     if (!read_sequence) 
    414         return 0; 
    415  
    416     const char *rawSequence = GB_read_char_pntr(read_sequence); 
    417     int filteredLength = filter->real_len; 
    418  
    419     if (filter->filterpos_2_seqpos == 0) 
    420         filter->calc_filter_2_seq(); 
    421  
    422     char *filteredSequence = (char *) malloc(filteredLength * sizeof(char)); 
    423  
    424     if (filteredSequence) { 
    425         for (int i = 0; i < filteredLength; ++i) { 
    426             filteredSequence[i] = rawSequence[filter->filterpos_2_seqpos[i]]; 
    427         } 
    428     } 
    429  
     412    char *filteredSequence = 0; 
     413    if (read_sequence) { 
     414        const char   *rawSequence        = GB_read_char_pntr(read_sequence); 
     415        int           filteredLength     = filter->get_filtered_length(); 
     416        const size_t *filterpos_2_seqpos = filter->get_filterpos_2_seqpos(); 
     417         
     418        filteredSequence = (char*)malloc(filteredLength * sizeof(char)); 
     419        if (filteredSequence) { 
     420            for (int i = 0; i < filteredLength; ++i) { 
     421                filteredSequence[i] = rawSequence[filterpos_2_seqpos[i]]; 
     422            } 
     423        } 
     424    } 
    430425    return filteredSequence; 
    431426} 
     
    473468                char *rawSequence = SQ_fetch_filtered_sequence(read_sequence, 
    474469                        filter); 
    475                 int sequenceLength = filter->real_len; 
     470                int sequenceLength = filter->get_filtered_length(); 
    476471 
    477472                /*calculate physical layout of sequence */ 
     
    576571                    char *rawSequence = SQ_fetch_filtered_sequence( 
    577572                            read_sequence, filter); 
    578                     int sequenceLength = filter->real_len; 
     573                    int sequenceLength = filter->get_filtered_length(); 
    579574 
    580575                    /*calculate physical layout of sequence */ 
  • trunk/SEQ_QUALITY/SQ_helix.h

    r5675 r6280  
    2323#include <BI_helix.hxx> 
    2424#endif 
     25#ifndef AP_FILTER_HXX 
     26#include <AP_filter.hxx> 
     27#endif 
     28 
    2529 
    2630class SQ_helix { 
     
    8690 
    8791void SQ_helix::SQ_calc_helix_layout(const char *seq, GBDATA * gb_main, 
    88         char *alignment_name, GBDATA * gb_quality, AP_filter * filter) { 
     92                                    char *alignment_name, GBDATA * gb_quality, AP_filter * filter) { 
    8993    getHelix(gb_main, alignment_name); 
     94 
     95    size_t        filterLen          = filter->get_filtered_length(); 
     96    const size_t *filterpos_2_seqpos = filter->get_filterpos_2_seqpos(); 
    9097 
    9198    // one call should be enough here (alignment does not change during the whole evaluation) 
     
    93100        filterMap.clear(); 
    94101 
    95         for (int filter_pos = 0; filter_pos < filter->real_len; filter_pos++) { 
    96             filterMap[filter->filterpos_2_seqpos[filter_pos]] = filter_pos; 
     102        for (int filter_pos = 0; filter_pos < filterLen; filter_pos++) { 
     103            filterMap[filterpos_2_seqpos[filter_pos]] = filter_pos; 
    97104        } 
    98105 
     
    108115        std::map<int,int>::iterator it; 
    109116 
    110         for (int filter_pos = 0; filter_pos < filter->real_len; filter_pos++) { 
    111             int seq_pos = filter->filterpos_2_seqpos[filter_pos]; 
     117        for (int filter_pos = 0; filter_pos < filterLen; filter_pos++) { 
     118            int seq_pos = filterpos_2_seqpos[filter_pos]; 
    112119 
    113120            BI_PAIR_TYPE pair_type = helix->pairtype(seq_pos); 
  • trunk/SEQ_QUALITY/SQ_main.cxx

    r6141 r6280  
    2323#include <aw_window.hxx> 
    2424#include <awt.hxx> 
    25 #include <awt_tree.hxx> 
    26 #include "../AWT/awtfilter.hxx" 
     25#include <awt_filter.hxx> 
    2726#include <awt_sel_boxes.hxx> 
    2827#include <aw_awars.hxx> 
  • trunk/SL/AP_TREE/Makefile

    r6238 r6280  
    4444AP_Tree.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
    4545AP_Tree.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     46AP_Tree.o: $(ARBHOME)/INCLUDE/arb_error.h 
    4647AP_Tree.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    4748AP_Tree.o: $(ARBHOME)/INCLUDE/arbdb.h 
     
    5455AP_Tree.o: $(ARBHOME)/INCLUDE/awt_attributes.hxx 
    5556AP_Tree.o: $(ARBHOME)/INCLUDE/downcast.h 
     57AP_Tree.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/SL/GUI_ALIVIEW/Makefile

    r6253 r6280  
    4646AWT_csp.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    4747AWT_csp.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     48AWT_csp.o: $(ARBHOME)/INCLUDE/arb_error.h 
    4849AWT_csp.o: $(ARBHOME)/INCLUDE/arbdb.h 
    4950AWT_csp.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    5859AWT_csp.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    5960AWT_csp.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
     61AWT_csp.o: $(ARBHOME)/INCLUDE/smartptr.h 
    6062 
    6163AWT_filter.o: awt_filter.hxx 
     
    6567AWT_filter.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
    6668AWT_filter.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     69AWT_filter.o: $(ARBHOME)/INCLUDE/arb_error.h 
    6770AWT_filter.o: $(ARBHOME)/INCLUDE/arbdb.h 
    6871AWT_filter.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    7881AWT_filter.o: $(ARBHOME)/INCLUDE/awt.hxx 
    7982AWT_filter.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
     83AWT_filter.o: $(ARBHOME)/INCLUDE/smartptr.h 
    8084 
    8185GUI_aliview.o: awt_csp.hxx 
  • trunk/SL/MATRIX/Makefile

    r6225 r6280  
    4141AP_matrix.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    4242AP_matrix.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     43AP_matrix.o: $(ARBHOME)/INCLUDE/arb_error.h 
    4344AP_matrix.o: $(ARBHOME)/INCLUDE/arbdb.h 
    4445AP_matrix.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    5152AP_matrix.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    5253AP_matrix.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
     54AP_matrix.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/SL/Makefile

    r6023 r6280  
    11 
    22ARCHS_ALL = \ 
    3         TREE_READ/TREE_READ.dummy  \ 
    4         TREE_WRITE/TREE_WRITE.dummy  \ 
    5         HELIX/HELIX.dummy  \ 
     3        ALIVIEW/ALIVIEW.dummy  \ 
     4        AP_TREE/AP_TREE.dummy  \ 
     5        ARB_TREE/ARB_TREE.dummy  \ 
    66        AW_HELIX/AW_HELIX.dummy  \ 
    77        AW_NAME/AW_NAME.dummy  \ 
    88        DB_SCANNER/DB_SCANNER.dummy  \ 
     9        FAST_ALIGNER/FAST_ALIGNER.dummy  \ 
    910        FILE_BUFFER/FILE_BUFFER.dummy  \ 
     11        FILTER/FILTER.dummy  \ 
     12        GUI_ALIVIEW/GUI_ALIVIEW.dummy  \ 
     13        HELIX/HELIX.dummy  \ 
     14        MATRIX/MATRIX.dummy  \ 
     15        NEIGHBOURJOIN/NEIGHBOURJOIN.dummy  \ 
     16        PRONUC/PRONUC.dummy  \ 
    1017        REGEXPR/REGEXPR.dummy  \ 
    11         FAST_ALIGNER/FAST_ALIGNER.dummy  \ 
     18        SEQUENCE/SEQUENCE.dummy  \ 
     19        TREE_READ/TREE_READ.dummy  \ 
     20        TREE_WRITE/TREE_WRITE.dummy  \ 
    1221 
    1322# -------------------------------------------------------------------------------- 
     
    4453clean: $(ARCHS:.dummy=.clean) 
    4554 
     55proto: TREEDISP/TREEDISP.proto  
     56 
    4657%.depend: 
    4758        @cp -p $(@D)/Makefile $(@D)/Makefile.old # save old Makefile 
     
    6576                clean 
    6677 
     78%.proto: 
     79        @$(MAKE) -C $(@D) \ 
     80                proto 
     81 
    6782# the end of the above command avoids that the output of parallel make calls gets mixed up  
    6883 
  • trunk/SL/PRONUC/Makefile

    r6225 r6280  
    4343AP_codon_table.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    4444AP_codon_table.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     45AP_codon_table.o: $(ARBHOME)/INCLUDE/arb_error.h 
    4546AP_codon_table.o: $(ARBHOME)/INCLUDE/arbdb.h 
    4647AP_codon_table.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    5455AP_codon_table.o: $(ARBHOME)/INCLUDE/awt.hxx 
    5556AP_codon_table.o: $(ARBHOME)/INCLUDE/awt_iupac.hxx 
     57AP_codon_table.o: $(ARBHOME)/INCLUDE/smartptr.h 
    5658 
    5759AP_pro_a_nucs.o: AP_codon_table.hxx 
     
    6163AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
    6264AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     65AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arb_error.h 
    6366AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbdb.h 
    6467AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    7376AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/awt.hxx 
    7477AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/inline.h 
     78AP_pro_a_nucs.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/SL/TREE_WRITE/TreeWrite.h

    r6066 r6280  
    1111#ifndef TREEWRITE_H 
    1212#define TREEWRITE_H 
     13 
     14#ifndef ARBDBT_H 
     15#include <arbdbt.h> 
     16#endif 
    1317 
    1418typedef void        (*TREE_make_node_text_init)(GBDATA *gb_main); 
  • trunk/SOURCE_TOOLS/generate_all_links.sh

    r6277 r6280  
    44 
    55finderr() { 
    6     FOUND=`grep -Hn "$1" $SELF` 
    7     if [ -z $FOUND ]; then 
     6    FOUND=`grep -Hn "$1" $SELF | perl -ne '/^[^:]+:[^:]+:/; print $&."\n";'` 
     7    if [ -z "$FOUND" ]; then 
    88        echo "$SELF:8: $2 ($1 not located -- search manually)" 
    99    else 
     
    3535    (test -e $DIR/$1 || finderr $1 "Target '$DIR/$1 does not exists (anymore)" ) && 
    3636    (test -e $2 || (test -h $2 && 
    37                     (finderr $2 "Warning Symlink '$2' points to nowhere -- removing wrong link";ls -al $2;rm $2;true) 
     37                    (finderr $2 "Note: Symlink '$2' pointed to nowhere -- removing wrong link";ls -al $2;rm $2;true) 
    3838                    ) || true) && 
    3939    symlink_maybe_no_target $1 $2 
     
    121121symlink ../TEMPLATES/attributes.h INCLUDE/attributes.h && 
    122122symlink ../TEMPLATES/config_parser.h INCLUDE/config_parser.h && 
     123symlink ../TEMPLATES/downcast.h INCLUDE/downcast.h && 
    123124symlink ../TEMPLATES/inline.h INCLUDE/inline.h && 
    124125symlink ../TEMPLATES/output.h INCLUDE/output.h && 
     
    140141 
    141142symlink ../AISC_COM/C/aisc_func_types.h INCLUDE/aisc_func_types.h && 
     143symlink ../AISC_COM/C/aisc_global.h INCLUDE/aisc_global.h && 
    142144symlink ../AISC_COM/C/client.h INCLUDE/client.h && 
    143145symlink ../AISC_COM/C/client_privat.h INCLUDE/client_privat.h && 
    144146symlink ../AISC_COM/C/server.h INCLUDE/server.h && 
    145147symlink ../AISC_COM/C/struct_man.h INCLUDE/struct_man.h && 
    146 symlink ../AISC_COM/C/aisc_global.h INCLUDE/aisc_global.h && 
    147148symlink ../ARBDB/adGene.h INCLUDE/adGene.h && 
     149symlink ../ARBDB/ad_config.h INCLUDE/ad_config.h && 
     150symlink ../ARBDB/ad_k_prot.h INCLUDE/ad_k_prot.h && 
    148151symlink ../ARBDB/ad_prot.h INCLUDE/ad_prot.h && 
    149 symlink ../ARBDB/ad_config.h INCLUDE/ad_config.h && 
    150152symlink ../ARBDB/ad_t_prot.h INCLUDE/ad_t_prot.h && 
    151 symlink ../ARBDB/ad_k_prot.h INCLUDE/ad_k_prot.h && 
    152153symlink ../ARBDB/arb_assert.h INCLUDE/arb_assert.h && 
    153154symlink ../ARBDB/arbdb.h INCLUDE/arbdb.h && 
     
    162163symlink ../AWT/awt_attributes.hxx INCLUDE/awt_attributes.hxx && 
    163164symlink ../AWT/awt_canvas.hxx INCLUDE/awt_canvas.hxx && 
    164 symlink ../AWT/awt_codon_table.hxx INCLUDE/awt_codon_table.hxx && 
    165165symlink ../AWT/awt_config_manager.hxx INCLUDE/awt_config_manager.hxx && 
    166 symlink ../AWT/awt_csp.hxx INCLUDE/awt_csp.hxx && 
    167 symlink ../AWT/awt_dtree.hxx INCLUDE/awt_dtree.hxx && 
    168166symlink ../AWT/awt_hotkeys.hxx INCLUDE/awt_hotkeys.hxx && 
    169167symlink ../AWT/awt_input_mask.hxx INCLUDE/awt_input_mask.hxx && 
     
    174172symlink ../AWT/awt_nds.hxx INCLUDE/awt_nds.hxx && 
    175173symlink ../AWT/awt_preset.hxx INCLUDE/awt_preset.hxx && 
    176 symlink ../AWT/awt_pro_a_nucs.hxx INCLUDE/awt_pro_a_nucs.hxx && 
    177174symlink ../AWT/awt_sel_boxes.hxx INCLUDE/awt_sel_boxes.hxx && 
    178175symlink ../AWT/awt_seq_colors.hxx INCLUDE/awt_seq_colors.hxx && 
    179 symlink ../AWT/awt_seq_dna.hxx INCLUDE/awt_seq_dna.hxx && 
    180 symlink ../AWT/awt_seq_protein.hxx INCLUDE/awt_seq_protein.hxx && 
    181 symlink ../AWT/awt_seq_simple_pro.hxx INCLUDE/awt_seq_simple_pro.hxx && 
    182 symlink ../AWT/awt_translate.hxx INCLUDE/awt_translate.hxx && 
    183 symlink ../AWT/awt_tree.hxx INCLUDE/awt_tree.hxx && 
    184 symlink ../AWT/awt_tree_cb.hxx INCLUDE/awt_tree_cb.hxx && 
    185 symlink ../AWT/awt_tree_cmp.hxx INCLUDE/awt_tree_cmp.hxx && 
    186176symlink ../AWT/awt_www.hxx INCLUDE/awt_www.hxx && 
    187177symlink ../AWT/awtlocal.hxx INCLUDE/awtlocal.hxx && 
     
    204194symlink ../PROBE_DESIGN/probe_design.hxx INCLUDE/probe_design.hxx && 
    205195symlink ../SECEDIT/secedit_extern.hxx INCLUDE/secedit_extern.hxx && 
     196symlink ../SEQ_QUALITY/seq_quality.h INCLUDE/seq_quality.h && 
    206197symlink ../SERVERCNTRL/servercntrl.h INCLUDE/servercntrl.h && 
    207 symlink ../SEQ_QUALITY/seq_quality.h INCLUDE/seq_quality.h && 
     198symlink ../SL/ALIVIEW/AliView.hxx INCLUDE/AliView.hxx && 
     199symlink ../SL/AP_TREE/AP_Tree.hxx INCLUDE/AP_Tree.hxx && 
     200symlink ../SL/ARB_TREE/ARB_Tree.hxx INCLUDE/ARB_Tree.hxx && 
    208201symlink ../SL/AW_HELIX/AW_helix.hxx INCLUDE/AW_helix.hxx && 
    209202symlink ../SL/AW_NAME/AW_rename.hxx INCLUDE/AW_rename.hxx && 
     
    211204symlink ../SL/FAST_ALIGNER/fast_aligner.hxx INCLUDE/fast_aligner.hxx && 
    212205symlink ../SL/FILE_BUFFER/FileBuffer.h INCLUDE/FileBuffer.h && 
     206symlink ../SL/FILTER/AP_filter.hxx INCLUDE/AP_filter.hxx && 
     207symlink ../SL/GUI_ALIVIEW/awt_csp.hxx INCLUDE/awt_csp.hxx && 
     208symlink ../SL/GUI_ALIVIEW/awt_filter.hxx INCLUDE/awt_filter.hxx && 
     209symlink ../SL/GUI_ALIVIEW/gui_aliview.hxx INCLUDE/gui_aliview.hxx && 
    213210symlink ../SL/HELIX/BI_helix.hxx INCLUDE/BI_helix.hxx && 
     211symlink ../SL/MATRIX/AP_matrix.hxx INCLUDE/AP_matrix.hxx && 
     212symlink ../SL/NEIGHBOURJOIN/neighbourjoin.hxx INCLUDE/neighbourjoin.hxx && 
     213symlink ../SL/PRONUC/AP_codon_table.hxx INCLUDE/AP_codon_table.hxx && 
     214symlink ../SL/PRONUC/AP_pro_a_nucs.hxx INCLUDE/AP_pro_a_nucs.hxx && 
    214215symlink ../SL/REGEXPR/RegExpr.hxx INCLUDE/RegExpr.hxx && 
     216symlink ../SL/SEQUENCE/AP_seq_dna.hxx INCLUDE/AP_seq_dna.hxx && 
     217symlink ../SL/SEQUENCE/AP_seq_protein.hxx INCLUDE/AP_seq_protein.hxx && 
     218symlink ../SL/SEQUENCE/AP_seq_simple_pro.hxx INCLUDE/AP_seq_simple_pro.hxx && 
     219symlink ../SL/SEQUENCE/AP_sequence.hxx INCLUDE/AP_sequence.hxx && 
     220symlink ../SL/TRANSLATE/Translate.hxx INCLUDE/Translate.hxx && 
     221symlink ../SL/TREEDISP/TreeCallbacks.hxx INCLUDE/TreeCallbacks.hxx && 
     222symlink ../SL/TREEDISP/TreeDisplay.hxx INCLUDE/TreeDisplay.hxx && 
    215223symlink ../SL/TREE_READ/TreeRead.h INCLUDE/TreeRead.h && 
    216224symlink ../SL/TREE_WRITE/TreeWrite.h INCLUDE/TreeWrite.h && 
     
    219227symlink ../WINDOW/aw_color_groups.hxx INCLUDE/aw_color_groups.hxx && 
    220228symlink ../WINDOW/aw_device.hxx INCLUDE/aw_device.hxx && 
     229symlink ../WINDOW/aw_font_group.hxx INCLUDE/aw_font_group.hxx && 
     230symlink ../WINDOW/aw_global.hxx INCLUDE/aw_global.hxx && 
    221231symlink ../WINDOW/aw_global_awars.hxx INCLUDE/aw_global_awars.hxx && 
    222232symlink ../WINDOW/aw_keysym.hxx INCLUDE/aw_keysym.hxx && 
     
    226236symlink ../WINDOW/aw_root.hxx INCLUDE/aw_root.hxx && 
    227237symlink ../WINDOW/aw_window.hxx INCLUDE/aw_window.hxx && 
    228 symlink ../WINDOW/aw_global.hxx INCLUDE/aw_global.hxx && 
    229238symlink ../WINDOW/aw_window_Xm_interface.hxx INCLUDE/aw_window_Xm_interface.hxx && 
    230 symlink ../WINDOW/aw_font_group.hxx INCLUDE/aw_font_group.hxx && 
    231239symlink ../XML/xml.hxx INCLUDE/xml.hxx && 
    232240 
  • trunk/SOURCE_TOOLS/touch_modified.pl

    r5952 r6280  
    3232 
    3333      if ($touch==1) { 
    34         if (not -f $file) { die "File '$file' not found (statusline='$line')" } 
     34        if (-d $file) { 
     35          $handled = 1; 
     36        } 
     37        else { 
     38          if (not -f $file) { die "File '$file' not found (statusline='$line')" } 
    3539 
    36         my $touch_cmd = "touch '$file'"; 
    37         print '['.$touch_cmd."]\n"; 
    38         system($touch_cmd); 
    39         $handled = 1; 
     40          my $touch_cmd = "touch '$file'"; 
     41          print '['.$touch_cmd."]\n"; 
     42          system($touch_cmd); 
     43          $handled = 1; 
     44        } 
    4045      } 
    4146    } 
  • trunk/STAT/Makefile

    r6277 r6280  
    3535ST_ml.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    3636ST_ml.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     37ST_ml.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     38ST_ml.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     39ST_ml.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     40ST_ml.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    3741ST_ml.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    3842ST_ml.o: $(ARBHOME)/INCLUDE/arb_error.h 
     43ST_ml.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    3944ST_ml.o: $(ARBHOME)/INCLUDE/arbdb.h 
    4045ST_ml.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    4247ST_ml.o: $(ARBHOME)/INCLUDE/arbtools.h 
    4348ST_ml.o: $(ARBHOME)/INCLUDE/attributes.h 
    44 ST_ml.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    4549ST_ml.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
    4650ST_ml.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
    4751ST_ml.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    48 ST_ml.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    49 ST_ml.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     52ST_ml.o: $(ARBHOME)/INCLUDE/downcast.h 
    5053ST_ml.o: $(ARBHOME)/INCLUDE/smartptr.h 
    5154 
     
    5659ST_quality.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    5760ST_quality.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     61ST_quality.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     62ST_quality.o: $(ARBHOME)/INCLUDE/AP_filter.hxx 
     63ST_quality.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     64ST_quality.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    5865ST_quality.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    5966ST_quality.o: $(ARBHOME)/INCLUDE/arb_error.h 
     67ST_quality.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    6068ST_quality.o: $(ARBHOME)/INCLUDE/arbdb.h 
    6169ST_quality.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    6573ST_quality.o: $(ARBHOME)/INCLUDE/aw_awars.hxx 
    6674ST_quality.o: $(ARBHOME)/INCLUDE/aw_color_groups.hxx 
     75ST_quality.o: $(ARBHOME)/INCLUDE/aw_device.hxx 
     76ST_quality.o: $(ARBHOME)/INCLUDE/aw_keysym.hxx 
     77ST_quality.o: $(ARBHOME)/INCLUDE/aw_position.hxx 
    6778ST_quality.o: $(ARBHOME)/INCLUDE/aw_root.hxx 
     79ST_quality.o: $(ARBHOME)/INCLUDE/aw_window.hxx 
    6880ST_quality.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
    69 ST_quality.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    70 ST_quality.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
    7181ST_quality.o: $(ARBHOME)/INCLUDE/BI_helix.hxx 
     82ST_quality.o: $(ARBHOME)/INCLUDE/downcast.h 
    7283ST_quality.o: $(ARBHOME)/INCLUDE/smartptr.h 
    7384 
    7485ST_window.o: st_ml.hxx 
    75 ST_window.o: st_quality.hxx 
    7686ST_window.o: st_window.hxx 
    7787ST_window.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
    7888ST_window.o: $(ARBHOME)/INCLUDE/ad_prot.h 
    7989ST_window.o: $(ARBHOME)/INCLUDE/ad_t_prot.h 
     90ST_window.o: $(ARBHOME)/INCLUDE/AliView.hxx 
     91ST_window.o: $(ARBHOME)/INCLUDE/AP_sequence.hxx 
     92ST_window.o: $(ARBHOME)/INCLUDE/AP_Tree.hxx 
    8093ST_window.o: $(ARBHOME)/INCLUDE/arb_assert.h 
    8194ST_window.o: $(ARBHOME)/INCLUDE/arb_error.h 
     95ST_window.o: $(ARBHOME)/INCLUDE/ARB_Tree.hxx 
    8296ST_window.o: $(ARBHOME)/INCLUDE/arbdb.h 
    8397ST_window.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     
    94108ST_window.o: $(ARBHOME)/INCLUDE/awt.hxx 
    95109ST_window.o: $(ARBHOME)/INCLUDE/awt_csp.hxx 
     110ST_window.o: $(ARBHOME)/INCLUDE/awt_filter.hxx 
    96111ST_window.o: $(ARBHOME)/INCLUDE/awt_item_sel_list.hxx 
    97 ST_window.o: $(ARBHOME)/INCLUDE/awt_pro_a_nucs.hxx 
    98 ST_window.o: $(ARBHOME)/INCLUDE/awt_sel_boxes.hxx 
    99 ST_window.o: $(ARBHOME)/INCLUDE/awt_tree.hxx 
     112ST_window.o: $(ARBHOME)/INCLUDE/downcast.h 
    100113ST_window.o: $(ARBHOME)/INCLUDE/smartptr.h 
  • trunk/STAT/ST_ml.cxx

    r6141 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <string.h> 
    4 #include <math.h> 
    5 #include <memory.h> 
    6 // #include <malloc.h> 
    7 #include <ctype.h> 
    8 #include <arbdb.h> 
    9 #include <arbdbt.h> 
    10 #include <aw_awars.hxx> 
    11 #include <awt_tree.hxx> 
     1#include "st_ml.hxx" 
     2 
    123#include <awt_csp.hxx> 
    13 #include "st_ml.hxx" 
     4#include <AP_filter.hxx> 
     5 
     6#include <cctype> 
     7#include <cmath> 
     8 
    149 
    1510#define st_assert(bed) arb_assert(bed) 
     
    152147#endif 
    153148 
    154 ST_sequence_ml::ST_sequence_ml(AP_tree_root * rooti, ST_ML * st_mli) : 
    155     AP_sequence(rooti) { 
    156     gb_data = 0; 
    157     st_ml = st_mli; 
    158     sequence = new ST_base_vector[ST_MAX_SEQ_PART]; 
    159     color_out = NULL; 
    160     color_out_valid_till = NULL; 
    161     last_updated = 0; 
    162 } 
    163  
    164 void st_sequence_callback(GBDATA *, int *cl, gb_call_back_type) { 
     149ST_sequence_ml::ST_sequence_ml(const AliView *aliview, ST_ML *st_ml_) 
     150    : AP_sequence(aliview) 
     151    , st_ml(st_ml_) 
     152    , sequence(new ST_base_vector[ST_MAX_SEQ_PART]) 
     153    , last_updated(0) 
     154    , color_out(NULL) 
     155    , color_out_valid_till(NULL) 
     156{ 
     157} 
     158 
     159ST_sequence_ml::~ST_sequence_ml() { 
     160    delete [] sequence; 
     161    delete color_out; 
     162    delete color_out_valid_till; 
     163 
     164    unbind_from_species(true); 
     165} 
     166 
     167static void st_sequence_callback(GBDATA *, int *cl, gb_call_back_type) { 
    165168    ST_sequence_ml *seq = (ST_sequence_ml *) cl; 
    166169    seq->sequence_change(); 
    167170} 
    168171 
    169 void st_sequence_del_callback(GBDATA *, int *cl, gb_call_back_type) { 
     172static void st_sequence_del_callback(GBDATA *, int *cl, gb_call_back_type) { 
    170173    ST_sequence_ml *seq = (ST_sequence_ml *) cl; 
    171     seq->delete_sequence(); 
    172 } 
    173  
    174 void ST_sequence_ml::delete_sequence() { 
    175     if (gb_data) 
    176         GB_remove_callback(gb_data, GB_CB_CHANGED, st_sequence_callback, 
    177                            (int *) this); 
    178     if (gb_data) 
    179         GB_remove_callback(gb_data, GB_CB_DELETE, st_sequence_del_callback, 
    180                            (int *) this); 
    181     gb_data = 0; 
     174    seq->unbind_from_species(false); 
     175} 
     176 
     177 
     178GB_ERROR ST_sequence_ml::bind_to_species(GBDATA *gb_species) { 
     179    GB_ERROR error = AP_sequence::bind_to_species(gb_species); 
     180    if (!error) { 
     181        GBDATA *gb_seq = get_bound_species_data(); 
     182        st_assert(gb_seq); 
     183 
     184        error             = GB_add_callback(gb_seq, GB_CB_CHANGED, st_sequence_callback, (int *) this); 
     185        if (!error) error = GB_add_callback(gb_seq, GB_CB_DELETE, st_sequence_del_callback, (int *) this); 
     186    } 
     187    return error; 
     188} 
     189void ST_sequence_ml::unbind_from_species(bool remove_callbacks) { 
     190    if (remove_callbacks) { 
     191        GBDATA *gb_seq = get_bound_species_data(); 
     192        st_assert(gb_seq); 
     193        GB_remove_callback(gb_seq, GB_CB_CHANGED, st_sequence_callback, (int *) this); 
     194        GB_remove_callback(gb_seq, GB_CB_DELETE, st_sequence_del_callback, (int *) this); 
     195    } 
     196    AP_sequence::unbind_from_species(); 
    182197} 
    183198 
    184199void ST_sequence_ml::sequence_change() { 
    185200    st_ml->clear_all(); 
    186  
    187 } 
    188  
    189 ST_sequence_ml::~ST_sequence_ml() { 
    190     delete[]sequence; 
    191     delete color_out; 
    192     delete color_out_valid_till; 
    193  
    194     delete_sequence(); 
    195 } 
    196  
    197 AP_sequence *ST_sequence_ml::dup() { 
    198     return new ST_sequence_ml(root, st_ml); 
    199 } 
    200  
    201 void ST_sequence_ml::set_gb(GBDATA * gbd) { 
    202     delete_sequence(); 
    203     gb_data = gbd; 
    204     GB_add_callback(gb_data, GB_CB_CHANGED, st_sequence_callback, (int *) this); 
    205     GB_add_callback(gb_data, GB_CB_DELETE, st_sequence_del_callback, 
    206                     (int *) this); 
     201} 
     202 
     203AP_sequence *ST_sequence_ml::dup() const { 
     204    return new ST_sequence_ml(get_aliview(), st_ml); 
    207205} 
    208206 
    209207void ST_sequence_ml::set(const char *) { 
    210     st_assert(0); // function does nothing, so i assert it wont be called -- ralf may 2008 
     208    st_assert(0);                                   // hmm why not perform set_sequence() here ? 
     209} 
     210 
     211void ST_sequence_ml::unset() { 
    211212} 
    212213 
     
    218219    int         source_sequence_len = 0; 
    219220 
     221    GBDATA *gb_data = get_bound_species_data(); 
    220222    if (gb_data) { 
    221223        source_sequence_len = (int) GB_read_string_count(gb_data); 
     
    243245} 
    244246 
    245 AP_FLOAT ST_sequence_ml::combine(const AP_sequence *, const AP_sequence *) { 
    246     return 0.0; 
     247AP_FLOAT ST_sequence_ml::combine(const AP_sequence *, const AP_sequence *, char *) { 
     248    st_assert(0); 
     249    return -1.0; 
    247250} 
    248251 
     
    349352 
    350353void ST_sequence_ml::print() { 
    351     int i; 
    352     for (i = 0; i < ST_MAX_SEQ_PART; i++) { 
    353         printf("POS %3i  %c     ", i, GB_read_char_pntr(gb_data)[i]); 
     354    const char *data = GB_read_char_pntr(get_bound_species_data()); 
     355    for (int i = 0; i < ST_MAX_SEQ_PART; i++) { 
     356        printf("POS %3i  %c     ", i, data[i]); 
    354357        printf("\n"); 
    355358    } 
     359} 
     360 
     361AP_FLOAT ST_sequence_ml::count_weighted_bases() const { 
     362    st_assert(0); 
     363    return -1.0; 
    356364} 
    357365 
     
    362370 
    363371ST_ML::~ST_ML() { 
    364     if (tree_root) { 
    365         delete tree_root->tree; 
    366         tree_root->tree = 0; 
    367         delete tree_root; 
    368     } 
     372    delete tree_root; 
    369373    free(alignment_name); 
    370374    if (hash_2_ap_tree) GBS_free_hash(hash_2_ap_tree); 
     
    373377    delete[]inv_base_frequencies; 
    374378    delete[]rate_matrices; 
    375     if (!awt_csp) { 
     379    if (!awt_csp) { // rates and ttratio have been allocated (see ST_ML::init)  
    376380        delete rates; 
    377381        delete ttratio; 
     
    384388} 
    385389 
    386 /** Translate characters to base frequencies */ 
    387390void ST_ML::create_frequencies() { 
    388     ST_base_vector  *out       = new ST_base_vector[alignment_len]; 
    389     int              i, j; 
    390     float          **frequency = 0; 
    391  
    392     base_frequencies     = out; 
     391    // Translate characters to base frequencies 
     392 
     393    base_frequencies     = new ST_base_vector[alignment_len]; 
    393394    inv_base_frequencies = new ST_base_vector[alignment_len]; 
    394395 
    395     if (awt_csp) 
    396         frequency = awt_csp->frequency; 
    397  
    398     if (!frequency) { 
    399         for (i = 0; i < alignment_len; i++) { 
    400             for (j = ST_A; j < ST_MAX_BASE; j++) { 
    401                 out[i].b[j] = 1.0; 
     396    if (!awt_csp) { 
     397        for (int i = 0; i < alignment_len; i++) { 
     398            for (int j = ST_A; j < ST_MAX_BASE; j++) { 
     399                base_frequencies[i].b[j]     = 1.0; 
    402400                inv_base_frequencies[i].b[j] = 1.0; 
    403401            } 
    404             out[i].lik = 1.0; 
     402            base_frequencies[i].lik    = 1.0; 
    405403            inv_base_frequencies[i].lik = 1.0; 
    406404        } 
    407         return; 
    408     } 
    409  
    410     for (i = 0; i < alignment_len; i++) { 
    411         for (j = ST_A; j < ST_MAX_BASE; j++) { 
    412             out[i].b[j] = 0.01; // minimal frequency 
    413         } 
    414  
    415         if (frequency['A']) 
    416             out[i].b[ST_A] += frequency['A'][i]; 
    417         if (frequency['a']) 
    418             out[i].b[ST_A] += frequency['a'][i]; 
    419  
    420         if (frequency['C']) 
    421             out[i].b[ST_C] += frequency['C'][i]; 
    422         if (frequency['c']) 
    423             out[i].b[ST_C] += frequency['c'][i]; 
    424  
    425         if (frequency['G']) 
    426             out[i].b[ST_G] += frequency['G'][i]; 
    427         if (frequency['g']) 
    428             out[i].b[ST_G] += frequency['g'][i]; 
    429  
    430         if (frequency['T']) 
    431             out[i].b[ST_T] += frequency['T'][i]; 
    432         if (frequency['t']) 
    433             out[i].b[ST_T] += frequency['t'][i]; 
    434         if (frequency['U']) 
    435             out[i].b[ST_T] += frequency['U'][i]; 
    436         if (frequency['u']) 
    437             out[i].b[ST_T] += frequency['u'][i]; 
    438  
    439         if (frequency['-']) 
    440             out[i].b[ST_GAP] += frequency['-'][i]; 
    441  
    442         double sum = 0.0; 
    443  
    444         for (j = ST_A; j < ST_MAX_BASE; j++) 
    445             sum += out[i].b[j]; 
    446         for (j = ST_A; j < ST_MAX_BASE; j++) 
    447             out[i].b[j] += sum * .01; // smoothen frequencies to  avoid crazy values 
    448         double min = out[i].b[ST_A]; 
    449         for (sum = 0, j = ST_A; j < ST_MAX_BASE; j++) { 
    450             sum += out[i].b[j]; 
    451             if (out[i].b[j] < min) 
    452                 min = out[i].b[j]; 
    453         } 
    454         for (j = ST_A; j < ST_MAX_BASE; j++) { 
    455             if (sum > 0.01) { // valid column ?? 
    456                 out[i].b[j] *= ST_MAX_BASE / sum; 
    457             } else { 
    458                 out[i].b[j] = 1.0; // no 
    459             } 
    460             inv_base_frequencies[i].b[j] = min / out[i].b[j]; 
    461         } 
    462         out[i].lik = 1.0; 
    463         inv_base_frequencies[i].lik = 1.0; 
    464  
     405    } 
     406    else { 
     407        for (int i = 0; i < alignment_len; i++) { 
     408            for (int j = ST_A; j < ST_MAX_BASE; j++) { 
     409                base_frequencies[i].b[j] = 0.01; // minimal frequency 
     410            } 
     411 
     412            static struct { 
     413                unsigned char c; 
     414                AWT_dna_base  b; 
     415            } toCount[] = { 
     416                { 'A', ST_A }, { 'a', ST_A }, 
     417                { 'C', ST_C }, { 'c', ST_C }, 
     418                { 'G', ST_G }, { 'g', ST_G }, 
     419                { 'T', ST_T }, { 't', ST_T }, 
     420                { 'U', ST_T }, { 'u', ST_T }, 
     421                { '-', ST_GAP }, 
     422                { 0, ST_UNKNOWN }, 
     423            }; 
     424 
     425            for (int j = 0; toCount[j].c; ++j) { 
     426                const float *freq = awt_csp->get_frequencies(toCount[j].c); 
     427                if (freq) base_frequencies[i].b[toCount[j].b] += freq[i]; 
     428            } 
     429 
     430            double sum = 0.0; 
     431 
     432            for (int j = ST_A; j < ST_MAX_BASE; j++) sum                      += base_frequencies[i].b[j]; 
     433            for (int j = ST_A; j < ST_MAX_BASE; j++) base_frequencies[i].b[j] += sum * .01; // smoothen frequencies to avoid crazy values 
     434 
     435            double min = base_frequencies[i].b[ST_A]; 
     436            sum        = 0.0; 
     437            for (int j = ST_A; j < ST_MAX_BASE; j++) { 
     438                sum += base_frequencies[i].b[j]; 
     439                if (base_frequencies[i].b[j] < min) min = base_frequencies[i].b[j]; 
     440            } 
     441            for (int j = ST_A; j < ST_MAX_BASE; j++) { 
     442                if (sum > 0.01) { // valid column ?? 
     443                    base_frequencies[i].b[j] *= ST_MAX_BASE / sum; 
     444                } 
     445                else { 
     446                    base_frequencies[i].b[j] = 1.0; // no 
     447                } 
     448                inv_base_frequencies[i].b[j] = min / base_frequencies[i].b[j]; 
     449            } 
     450            base_frequencies[i].lik     = 1.0; 
     451            inv_base_frequencies[i].lik = 1.0; 
     452        } 
    465453    } 
    466454} 
     
    470458    if (node->is_leaf) { 
    471459        GBS_write_hash(hash_2_ap_tree, node->name, (long) node); 
    472     } else { 
    473         insert_tree_into_hash_rek(node->leftson); 
    474         insert_tree_into_hash_rek(node->rightson); 
     460    } 
     461    else { 
     462        insert_tree_into_hash_rek(node->get_leftson()); 
     463        insert_tree_into_hash_rek(node->get_rightson()); 
    475464    } 
    476465} 
     
    497486    else { 
    498487        AP_tree *leaf   = (AP_tree *) val; 
    499         AP_tree *father = leaf->father; 
     488        AP_tree *father = leaf->get_father(); 
    500489        leaf->remove(); 
    501490        delete father;                              // deletes me also 
     
    508497    GB_ERROR error = NULL; 
    509498 
    510     if (!tree_root->tree || tree_root->tree->is_leaf) { 
    511         const char *tree_name = tree_root->tree_name; 
    512          
     499    AP_tree *root = tree_root->get_root_node(); 
     500    if (!root || root->is_leaf) { 
     501        const char *tree_name = tree_root->get_tree_name(); 
    513502        error = GBS_global_string("Too few species remained in tree '%s'", tree_name); 
    514503    } 
     
    519508GB_ERROR ST_ML::init(const char *tree_name, const char *alignment_namei, 
    520509                     const char *species_names, int marked_only, 
    521                      const char * /*filter_string */, AWT_csp * awt_cspi) { 
    522  
    523     GB_transaction ta(gb_main); 
     510                     AWT_csp *awt_cspi, bool show_status) 
     511{ 
    524512    GB_ERROR error = 0; 
     513 
    525514    if (is_inited) { 
    526         return GB_export_error("Sorry, once you selected a column statistic you cannot change parameters"); 
    527     } 
    528     GB_ERROR awt_csp_error = 0; 
    529     awt_csp = awt_cspi; 
    530     awt_csp_error = awt_csp->go(); 
    531     if (awt_csp_error) { 
    532         fprintf(stderr, "%s\n", awt_csp_error); 
    533     } 
    534     alignment_name = strdup(alignment_namei); 
    535     alignment_len = GBT_get_alignment_len(gb_main, alignment_name); 
    536     if (alignment_len < 10) { 
    537         free(alignment_name); 
    538         return GB_await_error(); 
    539     } 
    540     AP_tree *tree = new AP_tree(0); 
    541     tree_root = new AP_tree_root(gb_main, tree, tree_name); 
    542     error = tree->load(tree_root, 0, GB_FALSE, GB_FALSE, 0, 0); // tree is not linked !!! 
    543     if (error) { 
    544         delete tree;            tree      = 0; 
    545         delete tree_root;       tree_root = 0; 
    546         return error; 
    547     } 
    548     tree_root->tree = tree; 
    549  
    550     // aw_openstatus("Initializing Online Statistic"); 
    551     /* send species into hash table */ 
    552     hash_2_ap_tree = GBS_create_hash(1000, GB_MIND_CASE); 
    553     // aw_status("Loading Tree"); 
    554     /* delete species */ 
    555     if (species_names) { // keep names 
    556         tree_root->tree->remove_leafs(gb_main, AWT_REMOVE_DELETED); 
    557  
    558         error = tree_size_ok(tree_root); 
    559         if (error) return ta.close(error); 
    560  
    561         char *l, *n; 
    562         keep_species_hash = GBS_create_hash(GBT_get_species_hash_size(gb_main), GB_MIND_CASE); 
    563         for (l = (char *) species_names; l; l = n) { 
    564             n = strchr(l, 1); 
    565             if (n) *n = 0; 
    566             GBS_write_hash(keep_species_hash, l, 1); 
    567             if (n) *(n++) = 1; 
    568         } 
    569  
    570         insert_tree_into_hash_rek(tree_root->tree); 
    571         GBS_hash_do_loop(hash_2_ap_tree, delete_species, this); 
    572         GBS_free_hash(keep_species_hash); 
    573         keep_species_hash = 0; 
    574         GBT_link_tree((GBT_TREE *) tree_root->tree, gb_main, GB_FALSE, 0, 0); 
    575     } 
    576     else { // keep marked 
    577         GBT_link_tree((GBT_TREE *) tree_root->tree, gb_main, GB_FALSE, 0, 0); 
    578         tree_root->tree->remove_leafs(gb_main, (marked_only ? AWT_REMOVE_NOT_MARKED : 0)|AWT_REMOVE_DELETED); 
     515        error = "Column statistic can't be re-initialized"; 
     516    } 
     517    else { 
     518        GB_transaction ta(gb_main); 
     519        GB_ERROR       awt_csp_error = 0; 
     520 
     521        if (show_status) aw_openstatus("Activating column statistic"); 
     522 
     523        awt_csp       = awt_cspi; 
     524        awt_csp_error = awt_csp->go(NULL); 
     525 
     526        if (awt_csp_error) fprintf(stderr, "%s\n", awt_csp_error); 
     527 
     528        alignment_name = strdup(alignment_namei); 
     529        alignment_len  = GBT_get_alignment_len(gb_main, alignment_name); 
     530 
     531        if (alignment_len < 10) { 
     532            error = GB_await_error(); 
     533        } 
     534        else { 
     535            { 
     536                AP_filter       filter(alignment_len);      // unfiltered 
     537                AP_weights      weights(&filter); 
     538                AliView        *aliview   = new AliView(gb_main, filter, weights, alignment_name); 
     539                ST_sequence_ml *seq_templ = new ST_sequence_ml(aliview, this); 
     540 
     541                tree_root = new AP_tree_root(aliview, AP_tree(0), seq_templ, false); 
     542                // do not delete 'aliview' or 'seq_templ' (they belong to 'tree_root' now) 
     543            } 
     544 
     545            if (show_status) aw_status("load tree"); 
     546            tree_root->loadFromDB(tree_name);       // tree is not linked! 
     547             
     548            if (show_status) aw_status("link tree"); 
     549            hash_2_ap_tree = GBS_create_hash(1000, GB_MIND_CASE); // send species into hash table 
     550 
     551            /* delete species */ 
     552            if (species_names) { // keep names 
     553                tree_root->remove_leafs(AWT_REMOVE_DELETED); 
     554 
     555                error = tree_size_ok(tree_root); 
     556                if (!error) { 
     557                    char *l, *n; 
     558                    keep_species_hash = GBS_create_hash(GBT_get_species_hash_size(gb_main), GB_MIND_CASE); 
     559                    for (l = (char *) species_names; l; l = n) { 
     560                        n = strchr(l, 1); 
     561                        if (n) *n = 0; 
     562                        GBS_write_hash(keep_species_hash, l, 1); 
     563                        if (n) *(n++) = 1; 
     564                    } 
     565 
     566                    insert_tree_into_hash_rek(tree_root->get_root_node()); 
     567                    GBS_hash_do_loop(hash_2_ap_tree, delete_species, this); 
     568                    GBS_free_hash(keep_species_hash); 
     569                    keep_species_hash = 0; 
     570                    GBT_link_tree(tree_root->get_root_node()->get_gbt_tree(), gb_main, GB_BOOL(show_status), 0, 0); 
     571                } 
     572            } 
     573            else { // keep marked 
     574                GBT_link_tree(tree_root->get_root_node()->get_gbt_tree(), gb_main, GB_BOOL(show_status), 0, 0); 
     575                tree_root->remove_leafs((marked_only ? AWT_REMOVE_NOT_MARKED : 0)|AWT_REMOVE_DELETED); 
    579576         
    580         error = tree_size_ok(tree_root); 
    581         if (error) return ta.close(error); 
    582  
    583         insert_tree_into_hash_rek(tree_root->tree); 
    584     } 
    585  
    586     /* calc frequencies */ 
    587  
    588     if (!awt_csp_error) { 
    589         rates = awt_csp->rates; 
    590         ttratio = awt_csp->ttratio; 
    591     } 
    592     else { 
    593         rates = new float[alignment_len]; 
    594         ttratio = new float[alignment_len]; 
    595         for (int i = 0; i < alignment_len; i++) { 
    596             rates[i] = 1.0; 
    597             ttratio[i] = 2.0; 
    598         } 
    599         awt_csp = 0; 
    600     } 
    601     // aw_status("build frequencies"); 
    602     create_frequencies(); 
    603  
    604     /* set update time */ 
    605  
    606     latest_modification = GB_read_clock(gb_main); 
    607  
    608     /* load sequences */ 
    609     // aw_status("load sequences"); 
    610     tree_root->sequence_template = new ST_sequence_ml(tree_root, this); 
    611     tree_root->tree->load_sequences_rek(alignment_name, GB_TRUE, GB_TRUE); 
    612  
    613     /* create matrices */ 
    614     create_matrices(2.0, 1000); 
    615  
    616     ST_sequence_ml::tmp_out = new ST_base_vector[alignment_len]; 
    617     is_inited = 1; 
    618     // aw_closestatus(); 
    619     return 0; 
     577                error = tree_size_ok(tree_root); 
     578                if (!error) insert_tree_into_hash_rek(tree_root->get_root_node()); 
     579            } 
     580 
     581            if (!error) { 
     582                /* calc frequencies */ 
     583                if (show_status) aw_status("calculating frequencies"); 
     584 
     585                if (!awt_csp_error) { 
     586                    rates   = awt_csp->get_rates(); 
     587                    ttratio = awt_csp->get_ttratio(); 
     588                } 
     589                else { 
     590                    float *alloc_rates   = new float[alignment_len]; 
     591                    float *alloc_ttratio = new float[alignment_len]; 
     592 
     593                    for (int i = 0; i < alignment_len; i++) { 
     594                        alloc_rates[i]   = 1.0; 
     595                        alloc_ttratio[i] = 2.0; 
     596                    } 
     597                    rates   = alloc_rates; 
     598                    ttratio = alloc_ttratio; 
     599                     
     600                    awt_csp = 0;                    // mark rates and ttratio as "allocated" 
     601                } 
     602                create_frequencies(); 
     603 
     604                /* set update time */ 
     605 
     606                latest_modification = GB_read_clock(gb_main); 
     607 
     608                /* create matrices */ 
     609                create_matrices(2.0, 1000); 
     610 
     611                ST_sequence_ml::tmp_out = new ST_base_vector[alignment_len]; 
     612                is_inited = 1; 
     613            } 
     614            if (error) { 
     615                delete tree_root;               tree_root      = NULL; 
     616                GBS_free_hash(hash_2_ap_tree);  hash_2_ap_tree = NULL; 
     617            } 
     618        } 
     619 
     620        if (error) { 
     621            free(alignment_name); 
     622            error = ta.close(error); 
     623        } 
     624 
     625        if (show_status) aw_closestatus(); 
     626    } 
     627    return error; 
     628} 
     629 
     630ST_sequence_ml *ST_ML::getOrCreate_seq(AP_tree *node) { 
     631    ST_sequence_ml *seq = DOWNCAST(ST_sequence_ml*, node->get_seq()); 
     632    if (!seq) { 
     633        seq = new ST_sequence_ml(tree_root->get_aliview(), this); // @@@ why not use dup() ? 
     634         
     635        node->set_seq(seq); 
     636        if (node->is_leaf) { 
     637            st_assert(node->gb_node); 
     638            seq->bind_to_species(node->gb_node); 
     639        } 
     640    } 
     641    return seq; 
    620642} 
    621643 
    622644/** go through the tree and calculate the ST_base_vector from bottom to top */ 
    623645ST_sequence_ml *ST_ML::do_tree(AP_tree * node) { 
    624     ST_sequence_ml *seq = static_cast<ST_sequence_ml*>(node->sequence); 
    625     if (!seq) { 
    626         seq = new ST_sequence_ml(tree_root, this); 
    627         node->sequence = (AP_sequence *) seq; 
    628     } 
    629  
    630     if (seq->last_updated) 
    631         return seq; // already valid !!! 
    632  
    633     if (node->is_leaf) { 
    634         seq->set_sequence(); 
    635     } else { 
    636         ST_sequence_ml *ls = do_tree(node->leftson); 
    637         ST_sequence_ml *rs = do_tree(node->rightson); 
    638         seq->go(ls, node->leftlen, rs, node->rightlen); 
    639     } 
    640     seq->last_updated = 1; 
     646    ST_sequence_ml *seq = getOrCreate_seq(node); 
     647    if (!seq->last_updated) { 
     648        if (node->is_leaf) { 
     649            seq->set_sequence(); 
     650        } 
     651        else { 
     652            ST_sequence_ml *ls = do_tree(node->get_leftson()); 
     653            ST_sequence_ml *rs = do_tree(node->get_rightson()); 
     654            seq->go(ls, node->leftlen, rs, node->rightlen); 
     655        } 
     656 
     657        seq->last_updated = 1; 
     658    } 
     659 
    641660    return seq; 
    642661} 
     
    644663void ST_ML::clear_all() { 
    645664    GB_transaction dummy(gb_main); 
    646     undo_tree(tree_root->tree); 
     665    undo_tree(tree_root->get_root_node()); 
    647666    latest_modification = GB_read_clock(gb_main); 
    648667} 
    649668 
    650669void ST_ML::undo_tree(AP_tree * node) { 
    651     ST_sequence_ml *seq = static_cast<ST_sequence_ml*>(node->sequence); 
    652     if (!seq) { 
    653         seq = new ST_sequence_ml(tree_root, this); 
    654         node->sequence = (AP_sequence *) seq; 
    655     } 
     670    ST_sequence_ml *seq = getOrCreate_seq(node); 
    656671    seq->ungo(); 
    657672    if (!node->is_leaf) { 
    658         undo_tree(node->leftson); 
    659         undo_tree(node->rightson); 
     673        undo_tree(node->get_leftson()); 
     674        undo_tree(node->get_rightson()); 
    660675    } 
    661676} 
     
    677692    st_assert((end_ali_pos - start_ali_pos + 1) <= ST_MAX_SEQ_PART); 
    678693 
    679     ST_sequence_ml *seq = (ST_sequence_ml *) node->sequence; 
     694    ST_sequence_ml *seq = getOrCreate_seq(node); 
    680695 
    681696    if (start_ali_pos != base || end_ali_pos > to) { 
    682         undo_tree(tree_root->tree); // undo everything 
     697        undo_tree(tree_root->get_root_node()); // undo everything 
    683698        base = start_ali_pos; 
    684699        to = end_ali_pos; 
     
    686701 
    687702    AP_tree *pntr; 
    688     for (pntr = node->father; pntr; pntr = pntr->father) { 
    689         ST_sequence_ml *sequ = (ST_sequence_ml *) pntr->sequence; 
    690         if (sequ) 
    691             sequ->ungo(); 
     703    for (pntr = node->get_father(); pntr; pntr = pntr->get_father()) { 
     704        ST_sequence_ml *sequ = getOrCreate_seq(pntr); 
     705        if (sequ) sequ->ungo(); 
    692706    } 
    693707 
     
    695709 
    696710    // get the sequence of my brother 
    697     AP_tree *brother = node->brother(); 
     711    AP_tree        *brother        = node->get_brother(); 
    698712    ST_sequence_ml *seq_of_brother = do_tree(brother); 
    699713 
    700     seq->calc_out(seq_of_brother, node->father->leftlen 
    701                   + node->father->rightlen); 
     714    seq->calc_out(seq_of_brother, node->father->leftlen + node->father->rightlen); 
    702715    return seq; 
    703716} 
     
    743756    } 
    744757 
    745     ST_sequence_ml *seq = (ST_sequence_ml *) node->sequence; 
     758    ST_sequence_ml *seq = getOrCreate_seq(node); 
    746759 
    747760    for (int pos = 0; pos < alignment_len; pos++) { 
     
    769782ST_ML_Color *ST_ML::get_color_string(char *species_name, AP_tree * node, 
    770783                                     int start_ali_pos, int end_ali_pos) 
    771 //  (Re-)Calculates the color string of a given node for sequence positions start_ali_pos..end_ali_pos 
    772784{ 
    773  
    774     // if node isn't given search it using species name: 
     785    //  (Re-)Calculates the color string of a given node for sequence positions start_ali_pos..end_ali_pos 
    775786    if (!node) { 
    776         if (!hash_2_ap_tree) 
    777             return 0; 
     787        // if node isn't given, search it using species name: 
     788        if (!hash_2_ap_tree) return 0; 
    778789        node = (AP_tree *) GBS_read_hash(hash_2_ap_tree, species_name); 
    779         if (!node) 
    780             return 0; 
    781     } 
     790        if (!node) return 0; 
     791    } 
     792 
    782793    // align start_ali_pos/end_ali_pos to previous/next pos divisible by ST_BUCKET_SIZE: 
    783794    start_ali_pos &= ~(ST_BUCKET_SIZE - 1); 
    784     end_ali_pos = (end_ali_pos & ~(ST_BUCKET_SIZE - 1)) + ST_BUCKET_SIZE - 1; 
    785     if (end_ali_pos > alignment_len) 
    786         end_ali_pos = alignment_len; 
     795    end_ali_pos    = (end_ali_pos & ~(ST_BUCKET_SIZE - 1)) + ST_BUCKET_SIZE - 1; 
     796     
     797    if (end_ali_pos > alignment_len) end_ali_pos = alignment_len; 
    787798 
    788799    double          val; 
    789     ST_sequence_ml *seq = (ST_sequence_ml *) node->sequence; 
     800    ST_sequence_ml *seq = getOrCreate_seq(node); 
    790801    int             pos; 
    791802 
     
    820831    int source_sequence_len = 0; 
    821832 
    822     if (seq->gb_data) { 
    823         source_sequence_len = GB_read_string_count(seq->gb_data); 
    824         source_sequence = GB_read_char_pntr(seq->gb_data); 
     833    GBDATA *gb_data = seq->get_bound_species_data(); 
     834    if (gb_data) { 
     835        source_sequence_len = GB_read_string_count(gb_data); 
     836        source_sequence     = GB_read_char_pntr(gb_data); 
    825837    } 
    826838    // create color string in 'outs': 
     
    860872    return seq->color_out; 
    861873} 
     874 
  • trunk/STAT/ST_quality.cxx

    r6141 r6280  
    1010#include <aw_awars.hxx> 
    1111#include <BI_helix.hxx> 
     12#include <AP_filter.hxx> 
    1213 
    1314#include <aw_root.hxx> 
    14 #include <awt_tree.hxx> 
    1515#include <awt_csp.hxx> 
    1616#include "st_ml.hxx" 
     
    9191 
    9292void st_ml_add_sequence_part_to_stat(ST_ML * st_ml, AWT_csp * /*awt_csp */, 
    93         const char *species_name, int seq_len, int bucket_size, 
    94         GB_HASH * species_to_info_hash, int start, int end) { 
    95  
     93                                     const char *species_name, int seq_len, int bucket_size, 
     94                                     GB_HASH * species_to_info_hash, int start, int end) 
     95{ 
    9696    AP_tree *node = st_ml_convert_species_name_to_node(st_ml, species_name); 
    97     if (!node) 
    98         return; 
    99     ST_sequence_ml *sml = st_ml->get_ml_vectors(0, node, start, end); 
    100     if (!sml) 
    101         return; // no statistic available 
    102     st_cq_info *info; 
    103     if (start > 0) { 
    104         info = (st_cq_info *) GBS_read_hash(species_to_info_hash, species_name); 
    105     } else { 
    106         info = new st_cq_info(seq_len, bucket_size); 
    107         GBS_write_hash(species_to_info_hash, species_name, long (info)); 
    108     } 
    109     int pos; 
    110     const char *source_sequence = 0; 
    111     int source_sequence_len = 0; 
    112  
    113     if (sml->gb_data) { 
    114         source_sequence_len = GB_read_string_count(sml->gb_data); 
    115         source_sequence = GB_read_char_pntr(sml->gb_data); 
    116     } 
    117     if (end > source_sequence_len) { 
    118         end = source_sequence_len; 
    119     } 
    120  
    121     ST_base_vector *vec = sml->tmp_out + start; 
    122     for (pos = start; pos < end; vec++, pos++) { 
    123         double max = 0; 
    124         double v; 
    125         int    b; 
     97    if (node) { 
     98        ST_sequence_ml *sml = st_ml->get_ml_vectors(0, node, start, end); 
     99        if (sml) { 
     100            st_cq_info *info; 
     101            if (start > 0) { 
     102                info = (st_cq_info *) GBS_read_hash(species_to_info_hash, species_name); 
     103            } 
     104            else { 
     105                info = new st_cq_info(seq_len, bucket_size); 
     106                GBS_write_hash(species_to_info_hash, species_name, long (info)); 
     107            } 
     108     
     109            int         pos; 
     110            const char *source_sequence     = 0; 
     111            int         source_sequence_len = 0; 
     112 
     113            // if (sml->gb_data) { 
     114            GBDATA *gb_data = sml->get_bound_species_data(); 
     115            if (gb_data) { 
     116                source_sequence_len = GB_read_string_count(gb_data); 
     117                source_sequence     = GB_read_char_pntr(gb_data); 
     118            } 
     119            if (end > source_sequence_len) { 
     120                end = source_sequence_len; 
     121            } 
     122 
     123            ST_base_vector *vec = sml->tmp_out + start; 
     124            for (pos = start; pos < end; vec++, pos++) { 
     125                double max = 0; 
     126                double v; 
     127                int    b; 
    126128         
    127         for (b = ST_A; b < ST_MAX_BASE; b++) { 
    128             v = vec->b[b]; 
    129             if (v > max) 
    130                 max = v; 
    131         } 
    132         AWT_dna_base base = awt_dna_table.char_to_enum(source_sequence[pos]); 
    133         if (base != ST_UNKNOWN && base != ST_GAP) { // don't count gaps 
    134             double val = max / (0.0001 + vec->b[base]); 
    135             double log_val = log(val); 
    136             info->ss2.add(pos * 2 / seq_len, log_val); 
    137             info->ss5.add(pos * 5 / seq_len, log_val); 
    138             info->ssu.add(pos * info->ssu.size / seq_len, log_val); 
     129                for (b = ST_A; b < ST_MAX_BASE; b++) { 
     130                    v = vec->b[b]; 
     131                    if (v > max) 
     132                        max = v; 
     133                } 
     134                AWT_dna_base base = awt_dna_table.char_to_enum(source_sequence[pos]); 
     135                if (base != ST_UNKNOWN && base != ST_GAP) { // don't count gaps 
     136                    double val = max / (0.0001 + vec->b[base]); 
     137                    double log_val = log(val); 
     138                    info->ss2.add(pos * 2 / seq_len, log_val); 
     139                    info->ss5.add(pos * 5 / seq_len, log_val); 
     140                    info->ssu.add(pos * info->ssu.size / seq_len, log_val); 
     141                } 
     142            } 
    139143        } 
    140144    } 
     
    193197 
    194198GB_ERROR st_ml_check_sequence_quality(GBDATA * gb_main, const char *tree_name, 
    195         const char *alignment_name, AWT_csp * awt_csp, int bucket_size, 
    196         int marked_only, st_report_enum report, const char *filter_string, 
    197         const char *dest_field) { 
    198     AP_filter filter; 
    199     int seq_len = GBT_get_alignment_len(gb_main, alignment_name); 
    200     filter.init(filter_string, "0 ", seq_len); 
    201     ST_ML st_ml(gb_main); 
    202     GB_ERROR error = st_ml.init(tree_name, alignment_name, 0, marked_only, 
    203             filter_string, awt_csp); 
    204     if (error) { 
    205         return error; 
    206     } 
    207  
    208     GB_HASH *species_to_info_hash = GBS_create_hash(GBT_get_species_count(gb_main), GB_IGNORE_CASE); 
    209     GB_CSTR *snames = GBT_get_species_names_of_tree((GBT_TREE *) st_ml.tree_root->tree); 
    210  
    211     int pos; 
    212     aw_openstatus("Sequence Quality Check"); 
    213     for (pos = 0; pos < seq_len; pos += ST_MAX_SEQ_PART) { 
    214         int end = pos + ST_MAX_SEQ_PART - 1; 
    215         if (end > seq_len) 
    216             end = seq_len; 
    217         if (aw_status(pos / double (seq_len))) { 
    218             return "aborted"; 
    219         } 
     199                                      const char *alignment_name, AWT_csp * awt_csp, int bucket_size, 
     200                                      int marked_only, st_report_enum report, const char *dest_field) 
     201{ 
     202    int      seq_len = GBT_get_alignment_len(gb_main, alignment_name); 
     203    ST_ML    st_ml(gb_main); 
     204    GB_ERROR error   = st_ml.init(tree_name, alignment_name, 0, marked_only, awt_csp, true); 
     205 
     206    if (!error) { 
     207        GB_HASH *species_to_info_hash = GBS_create_hash(GBT_get_species_count(gb_main), GB_IGNORE_CASE); 
     208        GB_CSTR *snames               = GBT_get_species_names_of_tree(st_ml.tree_root->get_root_node()->get_gbt_tree()); 
     209 
     210        int pos; 
     211        aw_openstatus("Sequence Quality Check"); 
     212        for (pos = 0; pos < seq_len; pos += ST_MAX_SEQ_PART) { 
     213            int end = pos + ST_MAX_SEQ_PART - 1; 
     214            if (end > seq_len) 
     215                end = seq_len; 
     216            if (aw_status(pos / double (seq_len))) { 
     217                return "aborted"; 
     218            } 
     219            const char **pspecies_name; 
     220            for (pspecies_name = snames; *pspecies_name; pspecies_name++) { 
     221                st_ml_add_sequence_part_to_stat(&st_ml, awt_csp, *pspecies_name, 
     222                                                seq_len, bucket_size, species_to_info_hash, pos, end); 
     223            } 
     224        } 
     225        aw_status("Generating Result String"); 
    220226        const char **pspecies_name; 
    221227        for (pspecies_name = snames; *pspecies_name; pspecies_name++) { 
    222             st_ml_add_sequence_part_to_stat(&st_ml, awt_csp, *pspecies_name, 
    223                     seq_len, bucket_size, species_to_info_hash, pos, end); 
    224         } 
    225     } 
    226     aw_status("Generating Result String"); 
    227     const char **pspecies_name; 
    228     for (pspecies_name = snames; *pspecies_name; pspecies_name++) { 
    229         st_ml_add_quality_string_to_species(gb_main, alignment_name, 
    230                 *pspecies_name, seq_len, bucket_size, species_to_info_hash, 
    231                 report, dest_field); 
    232     } 
    233     aw_closestatus(); 
    234     free(snames); 
    235     GBS_free_hash(species_to_info_hash); 
    236     return NULL; 
    237 } 
     228            st_ml_add_quality_string_to_species(gb_main, alignment_name, 
     229                                                *pspecies_name, seq_len, bucket_size, species_to_info_hash, 
     230                                                report, dest_field); 
     231        } 
     232        aw_closestatus(); 
     233 
     234        free(snames); 
     235        GBS_free_hash(species_to_info_hash); 
     236    } 
     237 
     238    return error; 
     239} 
  • trunk/STAT/ST_window.cxx

    r5953 r6280  
    1 #include <stdio.h> 
    2 #include <stdlib.h> 
    3 #include <arbdb.h> 
    4 #include <arbdbt.h> 
    5 #include <aw_root.hxx> 
    6 #include <aw_window.hxx> 
     1// ================================================================ // 
     2//                                                                  // 
     3//   File      : ST_window.cxx                                      // 
     4//   Purpose   :                                                    // 
     5//                                                                  // 
     6//   Institute of Microbiology (Technical University Munich)        // 
     7//   http://www.arb-home.de/                                        // 
     8//                                                                  // 
     9// ================================================================ // 
     10 
     11#include "st_window.hxx" 
     12#include "st_ml.hxx" 
     13 
    714#include <aw_awars.hxx> 
    815#include <awt.hxx> 
    9 #include <awt_tree.hxx> 
     16#include <awt_item_sel_list.hxx> 
    1017#include <awt_csp.hxx> 
    11 #include <awt_item_sel_list.hxx> 
    12 #include <awt_sel_boxes.hxx> 
    13 #include "st_window.hxx" 
    14 #include "st_ml.hxx" 
    15 #include "st_quality.hxx" 
     18#include <awt_filter.hxx> 
    1619 
    1720void st_ok_cb(AW_window *aww, ST_ML *st_ml) { 
     
    2225 
    2326    GB_ERROR error    = GB_push_transaction(st_ml->gb_main); 
    24     if (!error) error = st_ml->init(tree_name, alignment_name, (char *) 0, marked_only, (char *) 0, st_ml->awt_csp); 
     27    if (!error) error = st_ml->init(tree_name, alignment_name, NULL, marked_only, st_ml->awt_csp, true); 
    2528    if (!error && st_ml->refresh_func) st_ml->refresh_func(st_ml->aw_window); 
    2629 
     
    3437AW_window *st_create_main_window(AW_root * root, ST_ML * st_ml, AW_CB0 refresh_func, AW_window * win) { 
    3538    AW_window_simple *aws = new AW_window_simple; 
    36     aws->init(root, "ENABLE_ONLINE_STATISTIC", "ACTIVATE ONLINE STATISTIC"); 
     39    aws->init(root, "COLUMN_STATISTIC", "COLUMN STATISTIC"); 
    3740 
    3841    aws->load_xfig("stat_main.fig"); 
     
    107110 
    108111void st_check_cb(AW_window * aww, GBDATA * gb_main, AWT_csp * awt_csp) { 
    109     GB_begin_transaction(gb_main); 
     112    GB_transaction ta(gb_main); 
     113 
    110114    AW_root *r = aww->get_root(); 
     115 
    111116    char *alignment_name = r->awar(ST_ML_AWAR_ALIGNMENT)->read_string(); 
    112     int bucket_size = r->awar(ST_ML_AWAR_CQ_BUCKET_SIZE)->read_int(); 
    113     char *tree_name = r->awar(AWAR_TREE)->read_string(); 
    114     char *dest_field = r->awar(ST_ML_AWAR_CQ_DEST_FIELD)->read_string(); 
    115     int marked_only = r->awar(ST_ML_AWAR_CQ_MARKED_ONLY)->read_int(); 
    116     char *filter_string = r->awar(ST_ML_AWAR_CQ_FILTER_FILTER)->read_string(); 
     117    int   bucket_size    = r->awar(ST_ML_AWAR_CQ_BUCKET_SIZE)->read_int(); 
     118    char *tree_name      = r->awar(AWAR_TREE)->read_string(); 
     119    char *dest_field     = r->awar(ST_ML_AWAR_CQ_DEST_FIELD)->read_string(); 
     120    int   marked_only    = r->awar(ST_ML_AWAR_CQ_MARKED_ONLY)->read_int(); 
     121     
    117122    st_report_enum report = (st_report_enum) r->awar(ST_ML_AWAR_CQ_REPORT)->read_int(); 
    118     GB_ERROR error = st_ml_check_sequence_quality(gb_main, tree_name, 
    119             alignment_name, awt_csp, bucket_size, marked_only, report, 
    120             filter_string, dest_field); 
    121     free(filter_string); 
     123    GB_ERROR       error  = st_ml_check_sequence_quality(gb_main, tree_name, alignment_name, 
     124                                                         awt_csp, bucket_size, marked_only, 
     125                                                         report, dest_field); 
    122126    free(dest_field); 
    123127    free(alignment_name); 
    124128    free(tree_name); 
    125     if (error) { 
    126         aw_message(error); 
    127         GB_abort_transaction(gb_main); 
    128     } else { 
    129         GB_commit_transaction(gb_main); 
    130     } 
     129 
     130    error = ta.close(error); 
     131    if (error) aw_message(error); 
    131132} 
    132133 
     
    159160    root->awar_int(ST_ML_AWAR_CQ_REPORT, 0); 
    160161 
    161     root->awar_string(ST_ML_AWAR_CQ_FILTER_NAME, "ECOLI"); 
    162     root->awar_string(ST_ML_AWAR_CQ_FILTER_ALIGNMENT); 
    163     root->awar_string(ST_ML_AWAR_CQ_FILTER_FILTER); 
    164  
    165162    root->awar_string(ST_ML_AWAR_ALIGNMENT)->map(AWAR_DEFAULT_ALIGNMENT); 
    166     root->awar_string(ST_ML_AWAR_CQ_FILTER_ALIGNMENT)-> 
    167     map(AWAR_DEFAULT_ALIGNMENT); 
    168163 
    169164    awt_csp = new AWT_csp(gb_main, root, ST_ML_AWAR_CSP); 
    170     //AW_CL filter_cl = 
    171     awt_create_select_filter(root, gb_main, ST_ML_AWAR_CQ_FILTER_NAME); 
    172165 
    173166    aws->at("which"); 
  • trunk/STAT/st_ml.hxx

    r6141 r6280  
     1// =============================================================== // 
     2//                                                                 // 
     3//   File      : st_ml.hxx                                         // 
     4//   Purpose   :                                                   // 
     5//                                                                 // 
     6//   Institute of Microbiology (Technical University Munich)       // 
     7//   http://www.arb-home.de/                                       // 
     8//                                                                 // 
     9// =============================================================== // 
     10 
     11#ifndef ST_ML_HXX 
     12#define ST_ML_HXX 
     13 
     14#ifndef AP_SEQUENCE_HXX 
     15#include <AP_sequence.hxx> 
     16#endif 
     17#ifndef AP_TREE_HXX 
     18#include <AP_Tree.hxx> 
     19#endif 
     20 
     21 
    122#ifndef ARB_ASSERT_H 
    223#include <arb_assert.h> 
    324#endif 
     25 
    426#define st_assert(bed) arb_assert(bed) 
    527 
     
    5577 
    5678/** Note: Because we have only limited memory we split the 
    57  sequence into ST_MAX_SEQ_PART long parts */ 
    58 class ST_sequence_ml : private AP_sequence { 
     79    sequence into ST_MAX_SEQ_PART long parts */ 
     80 
     81 
     82class ST_sequence_ml : public AP_sequence { 
    5983    friend class ST_ML; 
     84 
     85    AP_FLOAT count_weighted_bases() const; 
     86 
    6087public: 
    6188 
    62     GBDATA *gb_data; // the sequence 
    6389    static ST_base_vector *tmp_out; // len = alignment length 
    6490 
    6591protected: 
    6692 
    67     ST_ML *st_ml; // link to a global ST object 
    68     ST_base_vector *sequence; // A part of the sequence 
    69     int last_updated; 
    70     ST_ML_Color *color_out; 
    71     int *color_out_valid_till; // color_out is valid up to 
     93    ST_ML          *st_ml;                          // link to a global ST object 
     94    ST_base_vector *sequence;                       // A part of the sequence 
     95    int             last_updated; 
     96    ST_ML_Color    *color_out; 
     97    int            *color_out_valid_till;           // color_out is valid up to 
     98 
     99    void set(const char *sequence); 
     100    void unset(); 
    72101 
    73102public: 
    74     void delete_sequence(); // remove link to database 
    75     void sequence_change(); // sequence has changed in db 
    76     AP_FLOAT combine(const AP_sequence* lefts, const AP_sequence *rights); 
     103 
     104    ST_sequence_ml(const AliView *aliview, ST_ML *st_ml_); 
     105    virtual ~ST_sequence_ml(); 
     106     
     107    AP_sequence *dup(void) const; 
     108    AP_FLOAT     combine(const AP_sequence* lefts, const AP_sequence *rights, char *mutation_per_site = 0); 
    77109    void partial_match(const AP_sequence* part, long *overlap, long *penalty) const; 
    78     ST_sequence_ml(AP_tree_root *rooti, ST_ML *st_ml); 
    79     ~ST_sequence_ml(); 
    80     AP_sequence *dup(void); 
    81110 
    82     void set(const char *sequence); 
    83     void set_gb(GBDATA *gbd); 
     111    GB_ERROR bind_to_species(GBDATA *gb_species); 
     112    void     unbind_from_species(bool remove_callbacks); 
     113    GBDATA *get_bound_species_data() const { return AP_sequence::get_bound_species_data(); } 
    84114 
    85     void set_sequence(); // start at st_ml->base 
     115    void sequence_change();                         // sequence has changed in db 
     116    void set_sequence();                            // start at st_ml->base 
    86117 
    87     void go(const ST_sequence_ml *lefts, double leftl, 
    88             const ST_sequence_ml *rights, double rightl); 
     118    void go(const ST_sequence_ml *lefts, double leftl, const ST_sequence_ml *rights, double rightl); 
    89119    void ungo(); // undo go 
    90120 
     
    97127 
    98128class ST_ML { 
    99     char *alignment_name; 
    100     friend AP_tree *st_ml_convert_species_name_to_node(ST_ML *st_ml, 
    101             const char *species_name); 
    102     GB_HASH *hash_2_ap_tree; // hash table to get from name to tree_node 
    103     GB_HASH *keep_species_hash; // temporary hash to find 
    104     int refresh_n; 
    105     int *not_valid; // which columns are valid 
     129    friend AP_tree *st_ml_convert_species_name_to_node(ST_ML *st_ml, const char *species_name); 
     130 
     131    char    *alignment_name; 
     132    GB_HASH *hash_2_ap_tree;                        // hash table to get from name to tree_node 
     133    GB_HASH *keep_species_hash;                     // temporary hash to find 
     134    int      refresh_n; 
     135    int     *not_valid;                             // which columns are valid 
     136 
     137    ST_sequence_ml *getOrCreate_seq(AP_tree *node); 
    106138 
    107139    ST_sequence_ml *do_tree(AP_tree *node); 
    108     void undo_tree(AP_tree *node); //opposite of do_tree 
    109     void insert_tree_into_hash_rek(AP_tree *node); 
    110     void create_matrices(double max_disti, int nmatrices); 
    111     void create_frequencies(); 
    112     static long delete_species(const char *key, long val, void *cd_st_ml); 
     140    void            undo_tree(AP_tree *node);       //opposite of do_tree 
     141    void            insert_tree_into_hash_rek(AP_tree *node); 
     142    void            create_matrices(double max_disti, int nmatrices); 
     143    void            create_frequencies(); 
     144    static long     delete_species(const char *key, long val, void *cd_st_ml); 
     145 
    113146public: 
    114147    AP_tree_root *tree_root; 
    115     int latest_modification; // last mod; 
    116     int base; 
    117     int to; 
    118     AW_CB0 refresh_func; 
    119     AW_window *aw_window; 
     148    int           latest_modification;              // last mod; 
     149    int           base; 
     150    int           to; 
     151    AW_CB0        refresh_func; 
     152    AW_window    *aw_window; 
    120153 
    121     GBDATA *gb_main; 
    122     float *ttratio; // column independent 
    123     ST_base_vector *base_frequencies; // column independent 
    124     ST_base_vector *inv_base_frequencies; // column independent 
    125     float *rates; // column independent 
    126     double max_dist; // max_dist for rate_matrices 
    127     double step_size; // max_dist/step_size matrices 
    128     int max_matr; 
    129     ST_rate_matrix *rate_matrices; // for each distance a new matrix 
    130     long alignment_len; 
    131     AWT_csp *awt_csp; 
     154    GBDATA         *gb_main; 
     155    const float    *ttratio;                        // column independent 
     156    ST_base_vector *base_frequencies;               // column independent 
     157    ST_base_vector *inv_base_frequencies;           // column independent 
     158    const float    *rates;                          // column independent 
     159    double          max_dist;                       // max_dist for rate_matrices 
     160    double          step_size;                      // max_dist/step_size matrices 
     161    int             max_matr; 
     162    ST_rate_matrix *rate_matrices;                  // for each distance a new matrix 
     163    long            alignment_len; 
     164    AWT_csp        *awt_csp; 
     165 
    132166    void set_modified(int *what = 0); 
    133     void set_refresh(); // set flag for refresh 
     167    void set_refresh();                             // set flag for refresh 
    134168 
    135169    ~ST_ML(); 
     
    138172    int is_inited; 
    139173 
    140     GB_ERROR init(const char *tree_name, const char *alignment_name, 
    141             const char *species_names, int marked_only, 
    142             const char *filter_string, AWT_csp *awt_csp); 
    143     // species_names is 0 -> all [marked] species (else species_names is a (char)1 separated list of species) 
    144     // filter_string==0 -> no filter 
     174    GB_ERROR init(const char *tree_name, 
     175                  const char *alignment_name, 
     176                  const char *species_names,        // 0 -> all [marked] species (else species_names is a (char)1 separated list of species) 
     177                  int         marked_only, 
     178                  AWT_csp    *awt_csp, 
     179                  bool        show_status) __ATTR__USERESULT; 
    145180 
    146     void clear_all(); // delete all caches 
     181    void clear_all();                               // delete all caches 
    147182 
     183    ST_sequence_ml *get_ml_vectors(char *species_name, AP_tree *node, int start_ali_pos, int end_ali_pos); 
     184    ST_ML_Color *get_color_string(char *species_name, AP_tree *node, int start_ali_pos, int end_ali_pos); 
    148185 
    149     ST_sequence_ml *get_ml_vectors(char *species_name, AP_tree *node, 
    150             int start_ali_pos, int end_ali_pos); 
    151     ST_ML_Color *get_color_string(char *species_name, AP_tree *node, 
    152             int start_ali_pos, int end_ali_pos); 
    153  
    154     int update_ml_likelihood(char *result[4], int *latest_update, 
    155             char *species_name, AP_tree *node); 
     186    int update_ml_likelihood(char *result[4], int *latest_update, char *species_name, AP_tree *node); 
    156187 
    157188    int refresh_needed(); 
    158189}; 
     190 
     191#else 
     192#error st_ml.hxx included twice 
     193#endif // ST_ML_HXX 
  • trunk/STAT/st_window.hxx

    r5968 r6280  
    1212#define ST_WINDOW_HXX 
    1313 
     14#ifndef ARBDBT_H 
     15#include <arbdbt.h> 
     16#endif 
     17#ifndef AW_WINDOW_HXX 
     18#include <aw_window.hxx> 
     19#endif 
    1420 
    1521#define ST_ML_AWAR "tmp/st_ml/" 
     
    1824#define ST_ML_AWAR_CQ_BUCKET_SIZE       ST_ML_AWAR "bucket_size" 
    1925 
    20 #define ST_ML_AWAR_CQ_FILTER_NAME       ST_ML_AWAR "filter/name" 
    21 #define ST_ML_AWAR_CQ_FILTER_ALIGNMENT  ST_ML_AWAR "filter/alignment" 
    22 #define ST_ML_AWAR_CQ_FILTER_FILTER     ST_ML_AWAR "filter/filter" 
    2326#define ST_ML_AWAR_CQ_MARKED_ONLY       ST_ML_AWAR "marked_only" 
    2427#define ST_ML_AWAR_CQ_DEST_FIELD        ST_ML_AWAR "dest_field" 
     
    5356GB_ERROR st_ml_check_sequence_quality(GBDATA * gb_main, const char *tree_name, 
    5457                                      const char *alignment_name, AWT_csp * awt_csp, int bucket_size, 
    55                                       int marked_only, st_report_enum report, const char *filter_string, 
    56                                       const char *dest_field); 
     58                                      int marked_only, st_report_enum report, const char *dest_field); 
    5759 
    5860 
  • trunk/WINDOW/AW_window.cxx

    r6223 r6280  
    13791379 
    13801380static int aw_status_dummy2(const char *val) { 
    1381     return aw_status((char *)val); 
     1381    return aw_status(val); 
    13821382} 
    13831383 
  • trunk/lib/pictures/di_ge_ma.fig

    r6141 r6280  
    88-2 
    991200 2 
    10 6 12825 7245 13905 7875 
    11 4 0 -1 0 0 18 12 0.0000 4 135 1125 12825 7380 No. of trees:\001 
    12 4 0 -1 0 0 18 12 0.0000 4 165 705 12825 7830 $bcount\001 
    13 -6 
    14 6 12645 1530 13815 2205 
    15 4 2 -1 0 0 18 12 0.0000 4 180 1155 13815 2160 $mark_upper\001 
    16 4 2 -1 0 0 18 12 0.0000 4 180 1155 13815 1710 $mark_lower\001 
    17 -6 
    18 6 8145 2430 14490 4050 
    19 2 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
    20          8175 4020 14475 4020 
    21 4 0 -1 0 0 18 12 0.0000 4 135 1620 8175 2595 Trees in Database\001 
    22 4 0 -1 0 0 18 12 0.0000 4 180 840 9975 2745 $tree_list\001 
    23 4 2 -1 0 0 18 12 0.0000 4 180 1260 14310 3870 $to:X:tree_list\001 
    24 -6 
    25 6 8145 4275 14490 6165 
    26 2 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
    27          8175 6150 14475 6150 
    28 4 0 -1 0 0 18 12 0.0000 4 165 900 8175 4575 $calculate\001 
    29 4 0 -1 0 0 18 12 0.0000 4 180 1215 12825 4425 $view_matrix\001 
    30 4 0 -1 0 0 18 12 0.0000 4 180 975 10425 4575 $compress\001 
    31 4 0 -1 0 0 18 13 0.0000 4 210 1350 12825 4875 $save_matrix\001 
    32 4 0 -1 0 0 18 13 0.0000 4 210 1560 8175 5850 $use_sort_tree\001 
    33 4 0 -1 0 0 18 13 0.0000 4 210 1800 8175 5400 $use_compr_tree\001 
    34 4 0 -1 0 0 18 12 0.0000 4 180 1710 11100 5400 $compr_tree_name\001 
    35 4 0 -1 0 0 18 12 0.0000 4 180 1515 11100 5850 $sort_tree_name\001 
    36 4 2 -1 0 0 18 12 0.0000 4 180 2130 14325 5550 $to:X:compr_tree_name\001 
    37 4 2 -1 0 0 18 12 0.0000 4 180 1935 14325 6000 $to:X:sort_tree_name\001 
     106 12285 1530 13680 2205 
     114 0 -1 0 0 18 12 0.0000 4 225 1365 12285 2160 $mark_upper\001 
     124 0 -1 0 0 18 12 0.0000 4 225 1305 12285 1710 $mark_lower\001 
    3813-6 
    39142 1 0 1 -1 -1 0 0 -1 0.000 0 0 -1 0 0 1 
     
    4419         1275 5700 7500 5700 
    45202 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
    46          7800 1500 7800 7965 
     21         7800 1500 7800 9045 
    47222 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
    48          8175 2295 14475 2295 
     23         8175 5190 14760 5190 
     242 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
     25         8175 7320 14760 7320 
    49262 1 0 1 -1 -1 0 0 -1 0.000 0 0 -1 0 0 1 
    50          14625 8010 
    51 4 0 -1 0 0 18 12 0.0000 4 165 570 1200 1125 $close\001 
    52 4 2 -1 0 0 18 12 0.0000 4 180 465 14475 1125 $help\001 
    53 4 0 -1 0 0 18 12 0.0000 4 180 1170 3975 3675 $filter_select\001 
    54 4 0 -1 0 0 18 12 0.0000 4 180 1455 3975 4275 $weights_select\001 
    55 4 0 -1 0 0 18 13 0.0000 4 210 1515 3975 4875 $which_cancel\001 
    56 4 0 -1 0 0 18 12 0.0000 4 135 2565 1275 5400 User defined distance matrix\001 
    57 4 0 -1 0 0 18 12 0.0000 4 180 1410 3975 5475 $change_matrix\001 
    58 4 2 -1 0 0 18 12 0.0000 4 180 1650 5700 5475 $to:change_matrix\001 
    59 4 0 -1 0 0 18 12 0.0000 4 135 570 6000 5400 enable\001 
    60 4 0 -1 0 0 18 12 0.0000 4 135 1395 1275 4800 Exclude Column\001 
    61 4 0 -1 0 0 18 12 0.0000 4 180 1845 1275 4200 Weights/Rates/GC ...\001 
    62 4 0 -1 0 0 18 12 0.0000 4 135 450 1275 3600 Filter\001 
    63 4 0 -1 0 0 18 12 0.0000 4 165 1065 3975 6750 $autodetect\001 
    64 4 0 -1 0 0 18 12 0.0000 4 135 915 1275 6150 Correction\001 
    65 4 0 -1 0 0 18 12 0.0000 4 180 1635 3975 6225 $which_correction\001 
    66 4 0 -1 0 0 18 12 0.0000 4 180 1275 1275 1800 Which Species\001 
    67 4 2 -1 0 0 18 12 0.0000 4 180 1650 7575 6225 $correction_select\001 
    68 4 2 -1 0 0 18 12 0.0000 4 180 1410 7575 3675 $to:filter_select\001 
    69 4 2 -1 0 0 18 12 0.0000 4 180 1695 7575 4275 $to:weights_select\001 
    70 4 2 -1 0 0 18 12 0.0000 4 180 1320 7575 4875 $cancel_select\001 
    71 4 0 -1 0 0 18 12 0.0000 4 165 675 6825 5475 $enable\001 
    72 4 0 -1 0 0 18 12 0.0000 4 180 1410 1500 2325 $which_species\001 
    73 4 0 -1 0 0 18 12 0.0000 4 180 870 3150 1800 Alignment\001 
    74 4 0 -1 0 0 18 12 0.0000 4 180 1590 4350 1800 $which_alignment\001 
    75 4 2 -1 0 0 18 12 0.0000 4 180 1830 7575 3075 $to:which_alignment\001 
    76 4 0 -1 0 0 18 12 0.0000 4 180 1410 8235 1755 $mark_distance\001 
    77 4 0 -1 0 0 18 13 0.0000 4 210 1425 8175 6765 $use_existing\001 
    78 4 0 -1 0 0 18 12 0.0000 4 180 1515 11100 6765 $calc_tree_name\001 
    79 4 2 -1 0 0 18 12 0.0000 4 180 1935 14325 6915 $to:X:calc_tree_name\001 
    80 4 0 -1 0 0 18 12 0.0000 4 180 1080 8175 7515 $t_calculate\001 
    81 4 0 -1 0 0 18 12 0.0000 4 180 960 10425 7515 $bootstrap\001 
    82 4 0 -1 0 0 18 12 0.0000 4 135 3255 8505 2070 where distance to selected is inside:\001 
     27         14895 9180 
     282 1 0 2 -1 -1 0 0 -1 0.000 0 0 -1 0 0 2 
     29         8175 2295 14760 2295 
     304 0 -1 0 0 18 12 0.0000 4 210 675 1200 1125 $close\001 
     314 0 -1 0 0 18 12 0.0000 4 225 1320 3975 3675 $filter_select\001 
     324 0 -1 0 0 18 12 0.0000 4 225 1650 3975 4275 $weights_select\001 
     334 0 -1 0 0 18 13 0.0000 4 225 1515 3975 4875 $which_cancel\001 
     344 0 -1 0 0 18 12 0.0000 4 165 2955 1275 5400 User defined distance matrix\001 
     354 0 -1 0 0 18 12 0.0000 4 225 1635 3975 5475 $change_matrix\001 
     364 2 -1 0 0 18 12 0.0000 4 225 1920 5700 5475 $to:change_matrix\001 
     374 0 -1 0 0 18 12 0.0000 4 165 690 6000 5400 enable\001 
     384 0 -1 0 0 18 12 0.0000 4 165 1680 1275 4800 Exclude Column\001 
     394 0 -1 0 0 18 12 0.0000 4 210 2145 1275 4200 Weights/Rates/GC ...\001 
     404 0 -1 0 0 18 12 0.0000 4 165 540 1275 3600 Filter\001 
     414 0 -1 0 0 18 12 0.0000 4 210 1230 3975 6750 $autodetect\001 
     424 0 -1 0 0 18 12 0.0000 4 165 1125 1275 6150 Correction\001 
     434 0 -1 0 0 18 12 0.0000 4 225 1920 3975 6225 $which_correction\001 
     444 0 -1 0 0 18 12 0.0000 4 210 1545 1275 1800 Which Species\001 
     454 2 -1 0 0 18 12 0.0000 4 225 1935 7575 6225 $correction_select\001 
     464 2 -1 0 0 18 12 0.0000 4 225 1605 7575 3675 $to:filter_select\001 
     474 2 -1 0 0 18 12 0.0000 4 225 1935 7575 4275 $to:weights_select\001 
     484 2 -1 0 0 18 12 0.0000 4 225 1530 7575 4875 $cancel_select\001 
     494 0 -1 0 0 18 12 0.0000 4 210 810 6825 5475 $enable\001 
     504 0 -1 0 0 18 12 0.0000 4 225 1635 1500 2325 $which_species\001 
     514 0 -1 0 0 18 12 0.0000 4 210 1050 3150 1800 Alignment\001 
     524 0 -1 0 0 18 12 0.0000 4 225 1860 4350 1800 $which_alignment\001 
     534 2 -1 0 0 18 12 0.0000 4 225 2145 7575 3075 $to:which_alignment\001 
     544 0 -1 0 0 18 12 0.0000 4 165 3765 8505 2070 where distance to selected is inside:\001 
     554 2 -1 0 0 18 12 0.0000 4 225 570 14745 1125 $help\001 
     564 0 -1 0 0 18 12 0.0000 4 225 1740 11100 7935 $calc_tree_name\001 
     574 0 -1 0 0 18 12 0.0000 4 225 1980 11100 6570 $compr_tree_name\001 
     584 0 -1 0 0 18 12 0.0000 4 225 1740 11100 7020 $sort_tree_name\001 
     594 2 -1 0 0 18 12 0.0000 4 225 1455 14580 4590 $to:X:tree_list\001 
     604 2 -1 0 0 18 12 0.0000 4 225 2235 14595 8085 $to:X:calc_tree_name\001 
     614 2 -1 0 0 18 12 0.0000 4 225 2475 14595 6720 $to:X:compr_tree_name\001 
     624 2 -1 0 0 18 12 0.0000 4 225 2235 14595 7170 $to:X:sort_tree_name\001 
     634 0 -1 0 0 18 13 0.0000 4 225 1350 13095 5985 $save_matrix\001 
     644 0 -1 0 0 18 12 0.0000 4 165 1275 13095 8550 No. of trees:\001 
     654 0 -1 0 0 18 12 0.0000 4 210 855 13095 9000 $bcount\001 
     664 0 -1 0 0 18 12 0.0000 4 225 1140 10665 8685 $bootstrap\001 
     674 0 -1 0 0 18 12 0.0000 4 210 1050 8175 5625 $calculate\001 
     684 0 -1 0 0 18 12 0.0000 4 225 1320 13095 5625 $view_matrix\001 
     694 0 -1 0 0 18 12 0.0000 4 225 1140 10665 5625 $compress\001 
     704 0 -1 0 0 18 12 0.0000 4 225 1635 8145 1755 $mark_distance\001 
     714 0 -1 0 0 18 12 0.0000 4 165 1860 8145 2595 Trees in Database\001 
     724 0 -1 0 0 18 12 0.0000 4 225 960 8145 2970 $tree_list\001 
     734 0 -1 0 0 18 13 0.0000 4 225 1425 8145 7935 $use_existing\001 
     744 0 -1 0 0 18 12 0.0000 4 225 1245 8145 8685 $t_calculate\001 
     754 0 -1 0 0 18 13 0.0000 4 225 1560 8145 7020 $use_sort_tree\001 
     764 0 -1 0 0 18 13 0.0000 4 225 1800 8145 6570 $use_compr_tree\001 
     774 0 -1 0 0 18 12 0.0000 4 225 1725 8145 4995 $detect_clusters\001