source: branches/profile/SEQ_QUALITY/SQ_functions.h

Last change on this file was 8309, checked in by westram, 8 years ago
  • moved much code into static scope

(partly reverted by [8310])

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