ARB
SQ_functions.h
Go to the documentation of this file.
1 // ==================================================================== //
2 // //
3 // File : SQ_functions.h //
4 // Purpose : Functions used for calculation of alignment quality //
5 // //
6 // //
7 // Coded by Juergen Huber in July 2003 - February 2004 //
8 // Coded by Kai Bader (baderk@in.tum.de) in 2007 - 2008 //
9 // Copyright Department of Microbiology (Technical University Munich) //
10 // //
11 // Visit our web site at: http://www.arb-home.de/ //
12 // //
13 // ==================================================================== //
14 
15 
16 #ifndef SQ_FUNCTIONS_H
17 #define SQ_FUNCTIONS_H
18 
19 #ifndef SQ_GROUPDATA_H
20 # include "SQ_GroupData.h"
21 #endif
22 
23 #ifndef __MAP__
24 # include <map>
25 #endif
26 #ifndef __STRING__
27 # include <string>
28 #endif
29 
30 #ifndef SMARTPTR_H
31 #include <smartptr.h>
32 #endif
33 
34 #ifndef ARBDB_BASE_H
35 #include <arbdb_base.h>
36 #endif
37 
38 class AP_filter;
40 
42 typedef std::map < std::string, SQ_GroupDataPtr> SQ_GroupDataDictionary;
43 
45 
46 GB_ERROR SQ_pass1_no_tree(SQ_GroupData * globalData, GBDATA * gb_main, AP_filter * filter, arb_progress& progress);
47 GB_ERROR SQ_pass2_no_tree(const SQ_GroupData * globalData, GBDATA * gb_main, AP_filter * filter, arb_progress& progress);
48 
50 void SQ_calc_and_apply_group_data2(TreeNode * node, GBDATA * gb_main, const SQ_GroupData * data, AP_filter * filter, arb_progress& progress);
51 
52 /*
53  "option" is variable which is passed to function "SQ_get_value()".
54  SQ_get_value() returns the values that are stored in the specific containers used for alignment quality evaluation.
55  */
56 
57 struct SQ_weights {
58  int bases;
60  int helix;
61  int consensus;
62  int iupac;
63  int gc;
64 };
65 
66 GB_ERROR SQ_evaluate(GBDATA * gb_main, const SQ_weights & weights, bool marked_only);
67 /*
68  The "weight_..." -values are passed to the function "SQ_evaluate()".
69  SQ_evaluate() generates the final estimation for the quality of an alignment.
70  It takes the values from the different containers, which are generated by the other functions, weights them
71  and calculates a final value. The final value is stored in "value_of_evaluation" (see options).
72  So, with the "weight_..." -values one can customize how important a value stored in a container becomes
73  for the final result.
74  */
75 
76 GB_ERROR SQ_mark_species(GBDATA * gb_main, int condition, bool marked_only);
77 
79 
81  NONE = 0, ZOMBIE = 1, MISSING_NODE = 2
82 };
83 
85 
86 #else
87 #error SQ_functions.h included twice
88 #endif
const char * GB_ERROR
Definition: arb_core.h:25
void SQ_calc_and_apply_group_data2(TreeNode *node, GBDATA *gb_main, const SQ_GroupData *data, AP_filter *filter, arb_progress &progress)
SQ_TREE_ERROR SQ_check_tree_structure(TreeNode *node)
GB_ERROR SQ_remove_quality_entries(GBDATA *gb_main)
void SQ_clear_group_dictionary()
GB_ERROR SQ_mark_species(GBDATA *gb_main, int condition, bool marked_only)
std::map< std::string, SQ_GroupDataPtr > SQ_GroupDataDictionary
Definition: SQ_functions.h:42
GB_ERROR SQ_pass1_no_tree(SQ_GroupData *globalData, GBDATA *gb_main, AP_filter *filter, arb_progress &progress)
Generic smart pointer.
Definition: smartptr.h:149
GB_ERROR SQ_evaluate(GBDATA *gb_main, const SQ_weights &weights, bool marked_only)
static int weights[MAX_BASETYPES][MAX_BASETYPES]
Definition: ClustalV.cxx:71
void SQ_calc_and_apply_group_data(TreeNode *node, GBDATA *gb_main, SQ_GroupData *data, AP_filter *filter, arb_progress &progress)
SmartPtr< SQ_GroupData > SQ_GroupDataPtr
Definition: SQ_functions.h:39
SQ_TREE_ERROR
Definition: SQ_functions.h:80
GB_ERROR SQ_pass2_no_tree(const SQ_GroupData *globalData, GBDATA *gb_main, AP_filter *filter, arb_progress &progress)
GBDATA * gb_main
Definition: adname.cxx:33
int diff_from_average
Definition: SQ_functions.h:59