diff options
author | mutantturkey <mutantturke@gmail.com> | 2013-02-22 11:19:55 -0500 |
---|---|---|
committer | mutantturkey <mutantturke@gmail.com> | 2013-02-22 11:19:55 -0500 |
commit | 519cc8d29f45193325320d72804aa7dc3381cdc7 (patch) | |
tree | 2f5c252a0184872007ce27e716313c16d691ba9d | |
parent | 6ffb5253c4a0c3bd61c36efb71d3b43de0020585 (diff) |
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
-rwxr-xr-x | quikr.py | 3 | ||||
-rwxr-xr-x | quikr_train.py | 1 |
2 files changed, 2 insertions, 2 deletions
@@ -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) diff --git a/quikr_train.py b/quikr_train.py index b949589..6415f67 100755 --- a/quikr_train.py +++ b/quikr_train.py @@ -27,7 +27,6 @@ def main(): # call the quikr train function, save the output with np.save matrix = quikr_train(args.input, args.kmer) - matrix = np.rot90(matrix) np.save(args.output, matrix) np.savetxt("python.csv", matrix, delimiter=",") |