-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/controller/callbacks/reshape.c | 2 | ||||
-rw-r--r-- | src/db/dbconnect.sqc | 12 | ||||
-rw-r--r-- | src/model/data/base.sqc | 2 | ||||
-rw-r--r-- | src/model/state/state.h | 3 | ||||
-rw-r--r-- | src/util/check_error.c | 6 | ||||
-rw-r--r-- | src/util/check_error_db.c | 13 | ||||
-rw-r--r-- | src/util/check_error_db.h | 9 | ||||
-rw-r--r-- | test/distance_sanity_check/gi_227977170_78032581.png | bin | 0 -> 51161 bytes | |||
-rw-r--r-- | test/entropy/Align2Ref.m | 24 | ||||
-rw-r--r-- | test/entropy/CalculateEntropy.m | 15 | ||||
-rw-r--r-- | test/entropy/CalculateProteinEntropy.m | 25 | ||||
-rw-r--r-- | test/entropy/FastNWalign2.c | 94 | ||||
-rw-r--r-- | test/entropy/GenomeAlignments.m | 31 | ||||
-rw-r--r-- | test/entropy/GenomePairwiseDist.m | 98 | ||||
-rw-r--r-- | test/entropy/RefineAlignments.m | 276 | ||||
-rw-r--r-- | test/entropy/don_anal.m | 40 | ||||
-rw-r--r-- | test/entropy/nwalign_mod.m | 637 |
18 files changed, 1280 insertions, 9 deletions
diff --git a/test/entropy/CalculateEntropy.m b/test/entropy/CalculateEntropy.m new file mode 100644 index 0000000..18bfda5 --- a/dev/null +++ b/test/entropy/CalculateEntropy.m | |||
@@ -0,0 +1,15 @@ | |||
1 | function OUT_VEC = CalculateEntropy(ARRAY) | ||
2 | % CalculateEntropy | ||
3 | % Calculate the Informationational Entropy of each position in a | ||
4 | % multialignment. In this function I remove all gap characters from | ||
5 | % each column of the alignment before doing the calculation. | ||
6 | % | ||
7 | % | ||
8 | % | ||
9 | |||
10 | num_array = aa2int(ARRAY); | ||
11 | bins = histc(num_array, 0:21, 1); | ||
12 | |||
13 | probs=bsxfun(@rdivide, bins(2:end-1,:),sum(bins(2:end-1,:))); | ||
14 | |||
15 | OUT_VEC = -nansum(log(probs).*double(probs~=0).*probs); \ No newline at end of file | ||