diff options
author | Calvin <calvin@EESI> | 2013-05-14 21:51:40 -0400 |
---|---|---|
committer | Calvin <calvin@EESI> | 2013-05-14 21:51:40 -0400 |
commit | 0773aaf89678b967588a902df1f5e6f9ccea393d (patch) | |
tree | 40762e5df1da876d460d8695357ab0835645e8c6 /src/matlab/quikr.m | |
parent | 1d2becc9af591d37badfe0e77751bbb80932472f (diff) |
release1.0
Diffstat (limited to 'src/matlab/quikr.m')
-rw-r--r-- | src/matlab/quikr.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/matlab/quikr.m b/src/matlab/quikr.m index f43ae8f..f295d2b 100644 --- a/src/matlab/quikr.m +++ b/src/matlab/quikr.m @@ -13,17 +13,19 @@ function xstar = quikr(inputfasta) %forward (+) orientation.
if nargin>1
error('too many input arguments');
+end
[status, counts]=unix(['count-kmers -r 6 -1 -u ' inputfasta]); %count the 6-mers in the fasta file, in the forward direction, return the counts without labels
if status ~= 0
error('count-kmers failed: ensure count-kmers is in your path.');
+end
counts=textscan(counts,'%f'); %convert into floats
counts=counts{:}; %make into a vector
counts=counts/sum(counts); %form a probability vector from the counts
lambda=10000; %this is the default lambda value (see the paper), and is used in the formation of trainset7_112011N6Aaux.mat
yaux=[0;lambda*counts]; % form the sample vector
-load('trainset7_112011N6Aaux.mat') %load the 6-mer sensing matrix...I need to rename this so the variable is just Aaux.
+load('../../data/trainset7_112011N6Aaux.mat') %load the 6-mer sensing matrix...I need to rename this so the variable is just Aaux.
if not(exist('Aaux2')) %make sure Aaux2 loaded
error('The default training database trainset7_112011N6Aaux.mat failed to load. Be sure it exists in the Quikr folder or current directory');
end
|