summaryrefslogtreecommitdiffstats
Side-by-side diff
-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
9 files changed, 1240 insertions, 0 deletions
diff --git a/test/entropy/CalculateProteinEntropy.m b/test/entropy/CalculateProteinEntropy.m
new file mode 100644
index 0000000..41f06f5
--- a/dev/null
+++ b/test/entropy/CalculateProteinEntropy.m
@@ -0,0 +1,25 @@
+function OUT_DATA=CalculateProteinEntropy(Ref, ALIGN_CELL)
+
+OUT_DATA = cell(size(ALIGN_CELL));
+for i = 1:size(ALIGN_CELL,1)
+
+ aligned_seqs = ALIGN_CELL{i};
+
+ ref_seq = Ref.Sequence;
+
+ ref_prof = seqprofile(ref_seq, 'alphabet', 'aa');
+ seqs_prof = seqprofile(aligned_seqs, 'alphabet', 'aa');
+
+ [mp, H1, H2] = profalign(ref_prof, seqs_prof);
+
+ merged_seqs = char(zeros(size(aligned_seqs,1)+1, size(mp,2)));
+ merged_seqs(2:end, H2) = aligned_seqs;
+ merged_seqs(1, H1) = ref_seq;
+
+ entropy_vals = CalculateEntropy(merged_seqs);
+
+ %only pull out the values that are in the reference positions
+ ref_entropy = entropy_vals(H1);
+
+ OUT_DATA{i} = ref_entropy;
+end

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.