annotate splicesitescore/splicemodels/hashseq.m @ 9:e9d440a002d2

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