source: tags/ms_r16q3/SEQ_QUALITY/SQ_functions.h

Last change on this file was 13625, checked in by westram, 9 years ago
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
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
38class AP_filter;
39class arb_progress;
40
41typedef SmartPtr < SQ_GroupData> SQ_GroupDataPtr;
42typedef std::map < std::string, SQ_GroupDataPtr> SQ_GroupDataDictionary;
43
44GB_ERROR SQ_remove_quality_entries(GBDATA *gb_main);
45
46GB_ERROR SQ_pass1_no_tree(SQ_GroupData * globalData, GBDATA * gb_main, AP_filter * filter, arb_progress& progress);
47GB_ERROR SQ_pass2_no_tree(const SQ_GroupData * globalData, GBDATA * gb_main, AP_filter * filter, arb_progress& progress);
48
49int SQ_count_nodes(TreeNode *node);
50
51void SQ_calc_and_apply_group_data(TreeNode * node, GBDATA * gb_main, SQ_GroupData * data, AP_filter * filter, arb_progress& progress);
52void SQ_calc_and_apply_group_data2(TreeNode * node, GBDATA * gb_main, const SQ_GroupData * data, AP_filter * filter, arb_progress& progress);
53
54/*
55 "option" is variable which is passed to function "SQ_get_value()".
56 SQ_get_value() returns the values that are stored in the specific containers used for alignment quality evaluation.
57 */
58
59struct SQ_weights {
60    int bases;
61    int diff_from_average;
62    int helix;
63    int consensus;
64    int iupac;
65    int gc;
66};
67
68GB_ERROR SQ_evaluate(GBDATA * gb_main, const SQ_weights & weights, bool marked_only);
69/*
70 The "weight_..."  -values are passed to the function "SQ_evaluate()".
71 SQ_evaluate() generates the final estimation for the quality of an alignment.
72 It takes the values from the different containers, which are generated by the other functions, weights them
73 and calculates a final value. The final value is stored in "value_of_evaluation" (see options).
74 So, with the "weight_..."  -values one can customize how important a value stored in a container becomes
75 for the final result.
76 */
77
78GB_ERROR SQ_mark_species(GBDATA * gb_main, int condition, bool marked_only);
79
80void SQ_clear_group_dictionary();
81
82enum SQ_TREE_ERROR {
83    NONE = 0, ZOMBIE = 1, MISSING_NODE = 2
84};
85
86SQ_TREE_ERROR SQ_check_tree_structure(TreeNode * node);
87
88#else
89#error SQ_functions.h included twice
90#endif
Note: See TracBrowser for help on using the repository browser.