|
Last change
on this file was
8940,
checked in by westram, 13 years ago
|
- added MBI copyright
- fixed include wrappers
- fixed cppcheck warning
|
|
File size:
1.5 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 ARBTOOLS_H |
|---|
| 23 | #include <arbtools.h> |
|---|
| 24 | #endif |
|---|
| 25 | |
|---|
| 26 | class AlignedSequenceLoader : virtual Noncopyable { |
|---|
| 27 | |
|---|
| 28 | private: |
|---|
| 29 | /** |
|---|
| 30 | * The aligned sequences (see Cma.h for the definition of VecVecType). |
|---|
| 31 | */ |
|---|
| 32 | VecVecType *seqs; |
|---|
| 33 | /** |
|---|
| 34 | * The positions map between cleaned-up alignment and original one. |
|---|
| 35 | */ |
|---|
| 36 | vector<size_t> *position_map; |
|---|
| 37 | /** |
|---|
| 38 | * The length of the multiple sequence alignment. |
|---|
| 39 | */ |
|---|
| 40 | size_t MSA_len; |
|---|
| 41 | /** |
|---|
| 42 | * Cleans-up the MSA, removing positions with no base occurrence. |
|---|
| 43 | */ |
|---|
| 44 | void cleanSeqs(size_t* occurrences, long len); |
|---|
| 45 | |
|---|
| 46 | public: |
|---|
| 47 | |
|---|
| 48 | /** |
|---|
| 49 | * Returns the MSA length. |
|---|
| 50 | */ |
|---|
| 51 | size_t getMsaLen(); |
|---|
| 52 | |
|---|
| 53 | /** |
|---|
| 54 | * Returns the position map. |
|---|
| 55 | */ |
|---|
| 56 | vector<size_t> * getPositionMap(); |
|---|
| 57 | |
|---|
| 58 | /** |
|---|
| 59 | * Returns the aligned sequences. |
|---|
| 60 | */ |
|---|
| 61 | VecVecType* getSequences(); |
|---|
| 62 | |
|---|
| 63 | /** |
|---|
| 64 | * Constructor. |
|---|
| 65 | */ |
|---|
| 66 | AlignedSequenceLoader(); |
|---|
| 67 | |
|---|
| 68 | /** |
|---|
| 69 | * Destructor. |
|---|
| 70 | */ |
|---|
| 71 | virtual ~AlignedSequenceLoader(); |
|---|
| 72 | }; |
|---|
| 73 | |
|---|
| 74 | #else |
|---|
| 75 | #error AlignedSequenceLoader.h included twice |
|---|
| 76 | #endif // ALIGNEDSEQUENCELOADER_H |
|---|
Note: See
TracBrowser
for help on using the repository browser.