From c69b7e13895e8692afedb742bfdcc110bd982974 Mon Sep 17 00:00:00 2001 From: Calvin Date: Mon, 18 Feb 2013 09:01:52 -0500 Subject: set the input matrix properly --- quikr.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'quikr.py') diff --git a/quikr.py b/quikr.py index 1feb82d..4b29cec 100755 --- a/quikr.py +++ b/quikr.py @@ -33,6 +33,7 @@ def main(): # If we are using a custom trained matrix, we need to do some basic checks if args.trained_matrix is not None: + trained_matrix_location = args.trained_matrix if not os.path.isfile(args.trained_matrix): parser.error("custom trained matrix not be found") @@ -50,8 +51,8 @@ def main(): trained_matrix_location = "output.npy" input_lambda = 10000 kmer = 6 - xstar = quikr(args.fasta, trained_matrix_location, kmer, input_lambda) - + xstar = quikr(args.fasta, trained_matrix_location, kmer, input_lambda) + print xstar return 0 def quikr(input_fasta_location, trained_matrix_location, kmer, default_lambda): @@ -90,7 +91,7 @@ def quikr(input_fasta_location, trained_matrix_location, kmer, default_lambda): # perform the non-negative least squares # import pdb; pdb.set_trace() - counts = np.rot90(counts) + trained_matrix = np.rot90(trained_matrix) xstar = scipy.optimize.nnls(trained_matrix, counts) xstar = xstar / sum(xstar) -- cgit v1.2.3