annotate tools/mytools/splicesitescore/splicemodels/hashseq.m @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 function [sum ] = hashseq(seq)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 sum = 0;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 len = length(seq);
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 four = [1;4;16;64;256;1024;4096];
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 for i = 1:len
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 sum = sum + str2num(seq(i)) * four(len - i +1) ;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 end
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8