Mercurial > repos > padge > trimal
comparison trimal_repo/source/statisticsConservation.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 STATISTICS_CONSERVATION_H | |
28 #define STATISTICS_CONSERVATION_H | |
29 | |
30 #include <math.h> | |
31 #include <iostream> | |
32 #include <iomanip> | |
33 | |
34 #include "similarityMatrix.h" | |
35 #include "statisticsGaps.h" | |
36 #include "defines.h" | |
37 #include "utils.h" | |
38 | |
39 using namespace std; | |
40 | |
41 /* ***************************************************************************************************************** */ | |
42 /* Header Class File: StatisticsConservation. */ | |
43 /* ***************************************************************************************************************** */ | |
44 | |
45 class statisticsConservation{ | |
46 private: | |
47 | |
48 /* Number of columns and sequences of the alignment */ | |
49 int columns; | |
50 int sequences; | |
51 | |
52 /* Sequence's Datatype: DNA, RNA or Amino Acids. */ | |
53 int dataType; | |
54 | |
55 /* Half window size */ | |
56 int halfWindow; | |
57 | |
58 /* Conservation vectors */ | |
59 float *Q; | |
60 float *MDK; | |
61 float *MDK_Window; | |
62 | |
63 /* Identity weight matrix between alignment rows */ | |
64 float **matrixIdentity; | |
65 | |
66 /* Similarity matrix used to conservation calculations */ | |
67 similarityMatrix *simMatrix; | |
68 | |
69 /* Private methods */ | |
70 /* Computes the matrix identity between alignment's columns. */ | |
71 void calculateMatrixIdentity(string *alignmentMatrix); | |
72 | |
73 public: | |
74 | |
75 /* Constructors without any parameters */ | |
76 statisticsConservation(void); | |
77 | |
78 /* Constructors using parameters */ | |
79 statisticsConservation(string *, int, int, int); | |
80 | |
81 /* Destroyer */ | |
82 ~statisticsConservation(void); | |
83 | |
84 /* This methods allows us compute the alignment's conservation's values. */ | |
85 bool calculateVectors(string *, int *); | |
86 | |
87 /* Allows us compute the conservationWindow's values. */ | |
88 bool applyWindow(int); | |
89 | |
90 /* Returns if a windows size value has been defined or not. */ | |
91 bool isDefinedWindow(void); | |
92 | |
93 /* This methods returns a pointer to conservationWindow's vector */ | |
94 float *getMdkwVector(void); | |
95 | |
96 /* Associates a pointer to similarity matrix. This matrix is needed to compute the conservation's values. */ | |
97 bool setSimilarityMatrix(similarityMatrix *); | |
98 | |
99 /* Returns if a similarity matrix is being used or not. */ | |
100 bool isSimMatrixDef(void); | |
101 | |
102 /* Computes and selects the cut point values based on conservation's values. */ | |
103 double calcCutPoint(float, float); | |
104 | |
105 /* Prints the conservation's value for each alignment's column. */ | |
106 void printConservationColumns(void); | |
107 | |
108 /* Computes and prints the accumulative statistics associated to the alignment. */ | |
109 void printConservationAcl(void); | |
110 | |
111 }; | |
112 #endif |