comparison trimal_repo/source/sequencesMatrix.h @ 0:b15a3147e604 draft

"planemo upload for repository https://github.com/inab/trimal commit cbe1e8577ecb1a46709034a40dff36052e876e7a-dirty"
author padge
date Fri, 25 Mar 2022 17:10:43 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b15a3147e604
1 /* ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
2 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
3
4 trimAl v1.4: a tool for automated alignment trimming in large-scale
5 phylogenetics analyses.
6
7 2009-2015 Capella-Gutierrez S. and Gabaldon, T.
8 [scapella, tgabaldon]@crg.es
9
10 This file is part of trimAl.
11
12 trimAl is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, the last available version.
15
16 trimAl is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with trimAl. If not, see <http://www.gnu.org/licenses/>.
23
24 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
25 ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** */
26
27 #ifndef STATISTICSFILES_H
28 #define STATISTICSFILES_H
29
30 #include <iostream>
31 #include <iomanip>
32
33 #include "utils.h"
34
35 using namespace std;
36
37 /** \brief Class containing a sequences matrix
38 *
39 * This class stores the alignment sequences matrix. It provides
40 * methods to \b build the sequences matrix and print the matrix.
41 * It also provides methods for look to a column in the matrix and
42 * for look to value at the position (row, column) in the matrix.
43 */
44
45 class sequencesMatrix {
46 int resNumber;
47 int seqsNumber;
48
49 /* Sequences Matrix */
50 int **matrix;
51
52 /* Sequences Name */
53 string *seqsName;
54
55 public:
56
57 /* Constructors */
58
59 /** \brief Null constructor.
60 *
61 * This construction method initializates all attributes
62 * of the new object with 0 or NULL value.
63 */
64 sequencesMatrix(void);
65
66 /* Copy constructor */
67 sequencesMatrix(string *, string *, int, int);
68
69 sequencesMatrix &operator=(const sequencesMatrix &);
70
71 /* Destructor */
72
73 /** \brief Destructor.
74 *
75 * Destruction method that frees, if exists, previously allocated memory.
76 */
77 ~sequencesMatrix();
78
79 /* Basics Operations. */
80
81 /** \brief Sequences Matrix printing method.
82 *
83 * Method that prints the alignment sequences matrix.
84 */
85 void printMatrix();
86
87 /** \brief Column for looking to method.
88 * \param column Column number at sequences matrix.
89 * \param numResidueseqMatrix Vector where storage a column's sequences matrix.
90 *
91 * Method that storages a column's sequences matrix in a vector.
92 */
93 void getColumn(int, int *);
94
95 /** \brief Column for looking to method.
96 * \param value to look in a row's sequences matrix.
97 * \param row where to look for a value.
98 * \param numResidueseqMatrix Vector where storage a column's sequences matrix.
99 *
100 * Method that looks to value in a row and storages a column's, corresponding to row,
101 * sequences matrix in a vector.
102 */
103 void getColumn(int, int, int *);
104
105 void setOrder(int *);
106
107 void removeColumns(int, int, int *, int *);
108
109 bool getSequence(string, int *);
110
111 int getSeqNumber(void);
112
113 int getResidNumber(void);
114
115 };
116
117 #endif