File: AlignedSequenceLoader.h

package info (click to toggle)
arb 6.0.6-8
  • links: PTS, VCS
  • area: non-free
  • in suites: sid, trixie
  • size: 66,204 kB
  • sloc: ansic: 394,911; cpp: 250,290; makefile: 19,644; sh: 15,879; perl: 10,473; fortran: 6,019; ruby: 683; xml: 503; python: 53; awk: 32
file content (76 lines) | stat: -rw-r--r-- 1,509 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
 * AlignedSequenceLoader.h
 *
 * Interface to Arb's DB.
 * This class loads aligned sequences from Arb's DB and allows the other
 * code in this package to access it in a standard way.
 *
 *  Created on: Feb 15, 2010
 *      Author: Breno Faria
 *
 *  Institute of Microbiology (Technical University Munich)
 *  http://www.arb-home.de/ 
 */


#ifndef ALIGNEDSEQUENCELOADER_H
#define ALIGNEDSEQUENCELOADER_H

#ifndef CMA_H
#include "Cma.h"
#endif
#ifndef ARBTOOLS_H
#include <arbtools.h>
#endif

class AlignedSequenceLoader : virtual Noncopyable {

private:
    /**
     * The aligned sequences (see Cma.h for the definition of VecVecType).
     */
    VecVecType *seqs;
    /**
     * The positions map between cleaned-up alignment and original one.
     */
    vector<size_t> *position_map;
    /**
     * The length of the multiple sequence alignment.
     */
    size_t MSA_len;
    /**
     * Cleans-up the MSA, removing positions with no base occurrence.
     */
    void cleanSeqs(size_t* occurrences, long len);

public:

    /**
     * Returns the MSA length.
     */
    size_t getMsaLen();

    /**
     * Returns the position map.
     */
    vector<size_t> * getPositionMap();

    /**
     * Returns the aligned sequences.
     */
    VecVecType* getSequences();

    /**
     * Constructor.
     */
    AlignedSequenceLoader();

    /**
     * Destructor.
     */
    virtual ~AlignedSequenceLoader();
};

#else
#error AlignedSequenceLoader.h included twice
#endif // ALIGNEDSEQUENCELOADER_H