annotate splicesitescore/splicemodels/hashseq.m~ @ 15:0e221dbd17b2 default tip

Uploaded
author xuebing
date Sat, 31 Mar 2012 08:53:06 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
1 function [sum ] = hashseq(seq)
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
2 sum = 0;
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
3 len = length(seq);
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
4 four = [1;4;16;64;256;1024;4096];
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
5 for i = 1:len
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
6 sum = sum + seq(i) * four(len - i - 1) ;
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
7 end
0e221dbd17b2 Uploaded
xuebing
parents:
diff changeset
8