source: branches/stable/RNACMA/Analyser.h

Last change on this file was 18426, checked in by westram, 4 years ago
File size: 1.8 KB
Line 
1/**
2 * Analyser.h
3 *
4 * This class is the main entry point to this package.
5 * The analyser object is responsible for interacting with the Cma code and Arb.
6 *
7 * The alphabet used is also defined in this class. Please check the implementation
8 * of the constructor.
9 *
10 * If you are looking for information on Cma computations, please check the
11 * comments in the Cma class.
12 *
13 *  Created on: Feb 15, 2010
14 *      Author: Breno Faria
15 *
16 *  Institute of Microbiology (Technical University Munich)
17 *  http://www.arb-home.de/
18 */
19
20#ifndef ANALYSER_H
21#define ANALYSER_H
22
23#ifndef ARBDBT_H
24#include <arbdbt.h>
25#endif
26#ifndef ALIGNEDSEQUENCELOADER_H
27#include "AlignedSequenceLoader.h"
28#endif
29#ifndef CMA_H
30#include "Cma.h"
31#endif
32
33class Analyser FINAL_TYPE : virtual Noncopyable {
34
35    /**
36     * The sequence loader. This object is an interface to Arb's DB.
37     */
38    AlignedSequenceLoader *loader;
39
40    /**
41     * The correlated mutation analysis computation is done by this object.
42     */
43    Cma *cma;
44
45public:
46    /**
47     * Returns a reference to the Cma object.
48     */
49    Cma* getCma();
50
51    /**
52     * Saves the clustering result as SAI in the ARB DB.
53     */
54    GB_ERROR saveSAI(GBDATA *gb_main, vector<size_t> clusters, double threshold);
55    static const char *getSAIname() { return "cma_clusters"; }
56
57    /**
58     * Gives the clusters sensible names.
59     */
60    vector<char> normalizeClusters(vector<size_t> clusters);
61
62    /**
63     * Returns reference to the loader object.
64     */
65    AlignedSequenceLoader* getLoader();
66
67    GB_ERROR get_error() const { return loader->get_error(); }
68    bool has_error() const { return get_error(); }
69
70    /**
71     * Constructor.
72     */
73    Analyser(class GBDATA *gb_main);
74
75    /**
76     * Desctructor.
77     */
78    virtual ~Analyser();
79
80};
81
82#else
83#error Analyser.h included twice
84#endif // ANALYSER_H
Note: See TracBrowser for help on using the repository browser.