-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 |
9 files changed, 1240 insertions, 0 deletions
diff --git a/test/entropy/don_anal.m b/test/entropy/don_anal.m new file mode 100644 index 0000000..7d0a648 --- a/dev/null +++ b/test/entropy/don_anal.m @@ -0,0 +1,40 @@ +d = fastaread('C:\dondata\FASTA2.fa');
+lens = arrayfun(@(x)(numel(x.Sequence)), d);
+d(lens < 300) = [];
+rexp = '/Human/(\w*)/([\d\w]*)/(.*?)/(\d{4})/';
+headers = cell(length(d), 1);
+[headers{:}] = deal(d(:).Header);
+groups = regexp(headers, rexp, 'tokens', 'once');
+cgroups = cat(1,groups{:});
+dates = unique(cgroups(:,end));
+
+seqs = cell(length(d), 1);
+[seqs{:}] = deal(d(:).Sequence);
+
+ALIGN_CELL = cell(length(dates), 1);
+INDS_CELL = cell(length(dates), 1);
+PAIRWISE_CELL = cell(length(dates),1);
+for i = 1:length(dates)
+ display(dates{i})
+ tf = strcmp(cgroups(:,end), dates{i});
+ if isempty(PAIRWISE_CELL{i})
+ pairwise_dists = GenomePairwiseDist(d(tf), dates{i});
+ PAIRWISE_CELL{i} = pairwise_dists;
+ else
+ pairwise_dists = PAIRWISE_CELL{i};
+ end
+ if isempty(ALIGN_CELL{i}) || isempty(INDS_CELL{i})
+ [ALIGN_CELL{i}, INDS_CELL{i}] = GenomeAlignments(d(tf), ...
+ pairwise_dists);
+ save restore_data PAIRWISE_CELL ALIGN_CELL INDS_CELL
+ end
+end
+
+for i = 1:length(ALIGN_CELL)
+ [ALIGN_CELL{i}, ~]= RefineAlignments(ALIGN_CELL{i});
+end
+
+
+ents = CalculateProteinEntropy(d(1), ALIGN_CELL);
+
+dents = cat(1, ents{:});
|