source: branches/properties/RNACMA/AlignedSequenceLoader.h

Last change on this file was 18730, checked in by westram, 3 years ago
  • remove trailing whitespace from c source.
File size: 1.7 KB
Line 
1/*
2 * AlignedSequenceLoader.h
3 *
4 * Interface to Arb's DB.
5 * This class loads aligned sequences from Arb's DB and allows the other
6 * code in this package to access it in a standard way.
7 *
8 *  Created on: Feb 15, 2010
9 *      Author: Breno Faria
10 *
11 *  Institute of Microbiology (Technical University Munich)
12 *  http://www.arb-home.de/
13 */
14
15
16#ifndef ALIGNEDSEQUENCELOADER_H
17#define ALIGNEDSEQUENCELOADER_H
18
19#ifndef CMA_H
20#include "Cma.h"
21#endif
22#ifndef ARB_CORE_H
23#include <arb_core.h>
24#endif
25#ifndef ARBTOOLS_H
26#include <arbtools.h>
27#endif
28
29class AlignedSequenceLoader FINAL_TYPE : virtual Noncopyable {
30
31    GB_ERROR        error;
32    /**
33     * The aligned sequences (see Cma.h for the definition of VecVecType).
34     */
35    VecVecType     *seqs;
36    /**
37     * The positions map between cleaned-up alignment and original one.
38     */
39    vector<size_t> position_map;
40    /**
41     * The length of the multiple sequence alignment.
42     */
43    size_t          MSA_len;
44    /**
45     * Cleans-up the MSA, removing positions with no base occurrence.
46     */
47    void            cleanSeqs(const size_t * occurrences, long len);
48
49  public:
50
51    /**
52     * Returns the MSA length.
53     */
54    size_t getMsaLen();
55
56    /**
57     * Returns the position map.
58     */
59    const vector<size_t>& getPositionMap();
60
61    /**
62     * Returns the aligned sequences.
63     */
64    VecVecType* getSequences();
65
66    GB_ERROR get_error() const { return error; }
67    bool has_error() const { return get_error(); }
68
69    /**
70     * Constructor.
71     */
72    AlignedSequenceLoader(class GBDATA *gb_main);
73
74    /**
75     * Destructor.
76     */
77    ~AlignedSequenceLoader();
78};
79
80#else
81#error AlignedSequenceLoader.h included twice
82#endif // ALIGNEDSEQUENCELOADER_H
Note: See TracBrowser for help on using the repository browser.