From 519cc8d29f45193325320d72804aa7dc3381cdc7 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Fri, 22 Feb 2013 11:19:55 -0500 Subject: quikr now works! the numbers are almost identical to matlab (is 6th digit precision an issue?). use a vflip and don't transpose and it works --- quikr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'quikr.py') diff --git a/quikr.py b/quikr.py index 72a32f1..92c204b 100755 --- a/quikr.py +++ b/quikr.py @@ -84,9 +84,10 @@ def quikr(input_fasta_location, trained_matrix_location, kmer, default_lambda): #form the k-mer sensing matrix trained_matrix = trained_matrix * default_lambda; - trained_matrix = np.transpose(trained_matrix); + trained_matrix = np.flipud(trained_matrix); trained_matrix = np.vstack((np.ones(trained_matrix.shape[1]), trained_matrix)) + xstar, rnorm = scipy.optimize.nnls(trained_matrix, counts) xstar = xstar / xstar.sum(0) -- cgit v1.2.3