ARB
Classes | Macros | Typedefs | Enumerations | Functions | Variables
DI_clusters.cxx File Reference
#include "di_clusters.hxx"
#include "di_clustertree.hxx"
#include "di_foundclusters.hxx"
#include "di_awars.hxx"
#include <AP_seq_protein.hxx>
#include <AP_seq_dna.hxx>
#include <awt_sel_boxes.hxx>
#include <aw_awars.hxx>
#include <aw_msg.hxx>
#include <arb_progress.h>
#include <arb_msg_nospam.h>
#include <aw_root.hxx>
#include <list>
Include dependency graph for DI_clusters.cxx:

Go to the source code of this file.

Classes

class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
struct  GroupChanges
 
class  GroupBuilder
 
class  HasntCurrentClusterPrefix
 
class  UseTreeRoot
 

Macros

#define di_assert(cond)   arb_assert(cond)
 
#define AWAR_CLUSTER_PREFIX   AWAR_DIST_PREFIX "cluster/"
 
#define AWAR_CLUSTER_PREFIX_TEMP   "/tmp/" AWAR_DIST_PREFIX
 
#define AWAR_CLUSTER_MAXDIST   AWAR_CLUSTER_PREFIX "maxdist"
 
#define AWAR_CLUSTER_MINSIZE   AWAR_CLUSTER_PREFIX "minsize"
 
#define AWAR_CLUSTER_AUTOMARK   AWAR_CLUSTER_PREFIX "automark"
 
#define AWAR_CLUSTER_MARKREP   AWAR_CLUSTER_PREFIX "markrep"
 
#define AWAR_CLUSTER_SELECTREP   AWAR_CLUSTER_PREFIX "selrep"
 
#define AWAR_CLUSTER_ORDER   AWAR_CLUSTER_PREFIX "order"
 
#define AWAR_CLUSTER_GRP_PREFIX   AWAR_CLUSTER_PREFIX "group/"
 
#define AWAR_CLUSTER_GRP_PREFIX_TMP   "/tmp/" AWAR_CLUSTER_GRP_PREFIX
 
#define AWAR_CLUSTER_GROUP_WHAT   AWAR_CLUSTER_GRP_PREFIX "all"
 
#define AWAR_CLUSTER_GROUP_EXISTING   AWAR_CLUSTER_GRP_PREFIX "existing"
 
#define AWAR_CLUSTER_GROUP_NOTFOUND   AWAR_CLUSTER_GRP_PREFIX "notfound"
 
#define AWAR_CLUSTER_GROUP_IDENTITY   AWAR_CLUSTER_GRP_PREFIX "identity"
 
#define AWAR_CLUSTER_GROUP_PREFIX   AWAR_CLUSTER_GRP_PREFIX "prefix"
 
#define AWAR_CLUSTER_GROUP_PREFIX_MATCH   AWAR_CLUSTER_GRP_PREFIX "prefix_match"
 
#define AWAR_CLUSTER_GROUP_SUFFIX   AWAR_CLUSTER_GRP_PREFIX "suffix"
 
#define AWAR_CLUSTER_GROUP_PARTSEP   AWAR_CLUSTER_GRP_PREFIX "separator"
 
#define AWAR_CLUSTER_GROUP_EXAMPLE   AWAR_CLUSTER_GRP_PREFIX_TMP "example"
 
#define AWAR_CLUSTER_SELECTED   AWAR_CLUSTER_PREFIX_TEMP "selected"
 
#define AWAR_CLUSTER_RESTORE_LABEL   AWAR_CLUSTER_PREFIX_TEMP "rlabel"
 

Typedefs

typedef map< string, GroupTree * > Species2Tip
 

Enumerations

enum  Group_What { GROUP_SELECTED, GROUP_LISTED }
 
enum  Group_Action { GROUP_CREATE, GROUP_DELETE }
 
enum  Group_NotFound { NOTFOUND_ABORT, NOTFOUND_WARN, NOTFOUND_IGNORE }
 
enum  Group_Existing { EXISTING_GROUP_ABORT, EXISTING_GROUP_SKIP, EXISTING_GROUP_OVERWRITE, EXISTING_GROUP_APPEND_ORG }
 
enum  AffectedClusters { ALL_CLUSTERS, SEL_CLUSTER }
 

Functions

static void di_forget_global_data (AW_window *)
 
static void update_cluster_sellist ()
 
static void update_restore_label (AW_window *aww)
 
static void update_all (AW_window *aww)
 
static void save_results_recursive (ClusterTree *subtree)
 
static void save_results (ClusterTreeRoot *tree)
 
static void calculate_clusters (AW_window *aww)
 
 DECLARE_CBTYPE_FVV_AND_BUILDERS (ClusterCallback, void, ClusterPtr)
 
bool is_cluster (ID id)
 
static int with_affected_clusters_do (AW_root *aw_root, AffectedClusters affected, bool warn_if_none_affected, ClusterCallback cb)
 
static void mark_cluster (ClusterPtr cluster, ClusterMarkMode markRep)
 
static void select_representative (ClusterPtr cluster)
 
static void mark_clusters (AW_window *, AffectedClusters affected, bool warn_if_none_affected)
 
static void select_cluster_cb (AW_root *aw_root)
 
static void select_cluster (ID id)
 
static void sort_order_changed_cb (AW_root *aw_root)
 
string concatenate_name_parts (const list< string > &namepart, const string &separator)
 
static void update_example (AW_root *aw_root)
 
static void update_cluster_group (ClusterPtr cluster, GroupBuilder *groupBuilder)
 
static void accept_proposed_names (ClusterPtr cluster, bool accept)
 
static void group_clusters (AW_window *, Group_Action action)
 
static void popup_group_clusters_window (AW_window *aw_clusterList)
 
static void delete_selected_cluster (ClusterPtr cluster)
 
static void delete_clusters (AW_window *aww, AffectedClusters affected)
 
static void store_selected_cluster (ClusterPtr cluster)
 
static void store_clusters (AW_window *aww, AffectedClusters affected)
 
static void restore_clusters (AW_window *aww)
 
static void swap_clusters (AW_window *aww)
 
AW_windowDI_create_cluster_detection_window (AW_root *aw_root, WeightedFilter *weightedFilter)
 
void DI_create_cluster_awars (AW_root *aw_root, AW_default def, AW_default db)
 

Variables

static ClustersDataglobal_data = NULp
 

Macro Definition Documentation

#define di_assert (   cond)    arb_assert(cond)
#define AWAR_CLUSTER_PREFIX   AWAR_DIST_PREFIX "cluster/"

Definition at line 37 of file DI_clusters.cxx.

#define AWAR_CLUSTER_PREFIX_TEMP   "/tmp/" AWAR_DIST_PREFIX

Definition at line 38 of file DI_clusters.cxx.

#define AWAR_CLUSTER_MAXDIST   AWAR_CLUSTER_PREFIX "maxdist"
#define AWAR_CLUSTER_MINSIZE   AWAR_CLUSTER_PREFIX "minsize"
#define AWAR_CLUSTER_AUTOMARK   AWAR_CLUSTER_PREFIX "automark"
#define AWAR_CLUSTER_MARKREP   AWAR_CLUSTER_PREFIX "markrep"
#define AWAR_CLUSTER_SELECTREP   AWAR_CLUSTER_PREFIX "selrep"
#define AWAR_CLUSTER_ORDER   AWAR_CLUSTER_PREFIX "order"
#define AWAR_CLUSTER_GRP_PREFIX   AWAR_CLUSTER_PREFIX "group/"

Definition at line 47 of file DI_clusters.cxx.

#define AWAR_CLUSTER_GRP_PREFIX_TMP   "/tmp/" AWAR_CLUSTER_GRP_PREFIX

Definition at line 48 of file DI_clusters.cxx.

#define AWAR_CLUSTER_GROUP_WHAT   AWAR_CLUSTER_GRP_PREFIX "all"
#define AWAR_CLUSTER_GROUP_EXISTING   AWAR_CLUSTER_GRP_PREFIX "existing"
#define AWAR_CLUSTER_GROUP_NOTFOUND   AWAR_CLUSTER_GRP_PREFIX "notfound"
#define AWAR_CLUSTER_GROUP_IDENTITY   AWAR_CLUSTER_GRP_PREFIX "identity"
#define AWAR_CLUSTER_GROUP_PREFIX   AWAR_CLUSTER_GRP_PREFIX "prefix"
#define AWAR_CLUSTER_GROUP_PREFIX_MATCH   AWAR_CLUSTER_GRP_PREFIX "prefix_match"
#define AWAR_CLUSTER_GROUP_SUFFIX   AWAR_CLUSTER_GRP_PREFIX "suffix"
#define AWAR_CLUSTER_GROUP_PARTSEP   AWAR_CLUSTER_GRP_PREFIX "separator"
#define AWAR_CLUSTER_GROUP_EXAMPLE   AWAR_CLUSTER_GRP_PREFIX_TMP "example"
#define AWAR_CLUSTER_SELECTED   AWAR_CLUSTER_PREFIX_TEMP "selected"
#define AWAR_CLUSTER_RESTORE_LABEL   AWAR_CLUSTER_PREFIX_TEMP "rlabel"

Typedef Documentation

typedef map<string, GroupTree*> Species2Tip

Definition at line 301 of file DI_clusters.cxx.

Enumeration Type Documentation

enum Group_What
Enumerator
GROUP_SELECTED 
GROUP_LISTED 

Definition at line 63 of file DI_clusters.cxx.

Enumerator
GROUP_CREATE 
GROUP_DELETE 

Definition at line 68 of file DI_clusters.cxx.

Enumerator
NOTFOUND_ABORT 
NOTFOUND_WARN 
NOTFOUND_IGNORE 

Definition at line 73 of file DI_clusters.cxx.

Enumerator
EXISTING_GROUP_ABORT 
EXISTING_GROUP_SKIP 
EXISTING_GROUP_OVERWRITE 
EXISTING_GROUP_APPEND_ORG 

Definition at line 79 of file DI_clusters.cxx.

Enumerator
ALL_CLUSTERS 
SEL_CLUSTER 

Definition at line 88 of file DI_clusters.cxx.

Function Documentation

static void di_forget_global_data ( AW_window )
static

Definition at line 94 of file DI_clusters.cxx.

References di_assert, and ClustersData::free().

Referenced by DI_create_cluster_detection_window().

static void update_cluster_sellist ( )
static
static void update_restore_label ( AW_window aww)
static
static void update_all ( AW_window aww)
static
static void save_results_recursive ( ClusterTree *  subtree)
static

Definition at line 120 of file DI_clusters.cxx.

References ClustersData::add(), CS_IS_CLUSTER, and SHOWN_CLUSTERS.

Referenced by save_results().

static void save_results ( ClusterTreeRoot *  tree)
static
static void calculate_clusters ( AW_window aww)
static
DECLARE_CBTYPE_FVV_AND_BUILDERS ( ClusterCallback  ,
void  ,
ClusterPtr   
)
bool is_cluster ( ID  id)
inline

Definition at line 190 of file DI_clusters.cxx.

Referenced by update_example(), and with_affected_clusters_do().

static int with_affected_clusters_do ( AW_root aw_root,
AffectedClusters  affected,
bool  warn_if_none_affected,
ClusterCallback  cb 
)
static
static void mark_cluster ( ClusterPtr  cluster,
ClusterMarkMode  markRep 
)
static

Definition at line 249 of file DI_clusters.cxx.

References Cluster::mark_all_members().

Referenced by mark_clusters().

static void select_representative ( ClusterPtr  cluster)
static
static void mark_clusters ( AW_window ,
AffectedClusters  affected,
bool  warn_if_none_affected 
)
static
static void select_cluster_cb ( AW_root aw_root)
static
static void select_cluster ( ID  id)
static
static void sort_order_changed_cb ( AW_root aw_root)
static
string concatenate_name_parts ( const list< string > &  namepart,
const string separator 
)

Definition at line 549 of file DI_clusters.cxx.

References concat().

Referenced by GroupBuilder::generate_group_name().

static void update_example ( AW_root aw_root)
static
static void update_cluster_group ( ClusterPtr  cluster,
GroupBuilder groupBuilder 
)
static

Definition at line 777 of file DI_clusters.cxx.

References GroupBuilder::get_error(), and GroupBuilder::update_group().

Referenced by group_clusters().

static void accept_proposed_names ( ClusterPtr  cluster,
bool  accept 
)
static

Definition at line 783 of file DI_clusters.cxx.

References Cluster::accept_proposed().

Referenced by group_clusters().

static void group_clusters ( AW_window ,
Group_Action  action 
)
static
static void popup_group_clusters_window ( AW_window aw_clusterList)
static
static void delete_selected_cluster ( ClusterPtr  cluster)
static
static void delete_clusters ( AW_window aww,
AffectedClusters  affected 
)
static
static void store_selected_cluster ( ClusterPtr  cluster)
static
static void store_clusters ( AW_window aww,
AffectedClusters  affected 
)
static
static void restore_clusters ( AW_window aww)
static

Definition at line 945 of file DI_clusters.cxx.

References ClustersData::restore_all(), and update_all().

Referenced by DI_create_cluster_detection_window().

static void swap_clusters ( AW_window aww)
static
AW_window* DI_create_cluster_detection_window ( AW_root aw_root,
WeightedFilter weightedFilter 
)
void DI_create_cluster_awars ( AW_root aw_root,
AW_default  def,
AW_default  db 
)

Variable Documentation

ClustersData* global_data = NULp
static

Definition at line 90 of file DI_clusters.cxx.