summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/Makefile.am2
-rw-r--r--src/controller/callbacks/reshape.c2
-rw-r--r--src/db/dbconnect.sqc12
-rw-r--r--src/model/data/base.sqc2
-rw-r--r--src/model/state/state.h3
-rw-r--r--src/util/check_error.c6
-rw-r--r--src/util/check_error_db.c13
-rw-r--r--src/util/check_error_db.h9
-rw-r--r--test/distance_sanity_check/gi_227977170_78032581.pngbin0 -> 51161 bytes
-rw-r--r--test/entropy/Align2Ref.m24
-rw-r--r--test/entropy/CalculateEntropy.m15
-rw-r--r--test/entropy/CalculateProteinEntropy.m25
-rw-r--r--test/entropy/FastNWalign2.c94
-rw-r--r--test/entropy/GenomeAlignments.m31
-rw-r--r--test/entropy/GenomePairwiseDist.m98
-rw-r--r--test/entropy/RefineAlignments.m276
-rw-r--r--test/entropy/don_anal.m40
-rw-r--r--test/entropy/nwalign_mod.m637
18 files changed, 1280 insertions, 9 deletions
diff --git a/test/entropy/Align2Ref.m b/test/entropy/Align2Ref.m
new file mode 100644
index 0000000..3021d4a
--- a/dev/null
+++ b/test/entropy/Align2Ref.m
@@ -0,0 +1,24 @@
+function NEW_INDS = Align2Ref(REF_SEQ, ALIGN, ALIGN_INDS, ALPHA)
+% Align2Ref
+% Uses a profile alignment to change a set of indicices in the
+% "alignment space" to the "reference space".
+%
+%
+% NEW_INDS = Align2Ref(REF_SEQ, ALIGN, ALIGN_INDS)
+%
+
+if nargin == 3
+ ALPHA = 'aa';
+end
+
+ref_prof = seqprofile(REF_SEQ, 'alphabet', ALPHA);
+align_prof = seqprofile(ALIGN, 'alphabet', ALPHA);
+
+[~, ind1, ind2] = profalign(ref_prof, align_prof);
+
+ninds = ind2(ALIGN_INDS);
+
+mask = sum(bsxfun(@le, ind1(:)', ninds(:)),2);
+mask(mask == 0) = 1;
+
+NEW_INDS = reshape(ind1(mask), size(ALIGN_INDS)); \ No newline at end of file

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.