From d252aeb1e3a4a45d3a0783ff90da37e381d23d78 Mon Sep 17 00:00:00 2001 From: Calvin Date: Fri, 22 Feb 2013 07:41:48 -0500 Subject: rotate matricies --- quikr_train.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'quikr_train.py') diff --git a/quikr_train.py b/quikr_train.py index b14ddcd..b949589 100755 --- a/quikr_train.py +++ b/quikr_train.py @@ -27,8 +27,10 @@ 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=",") return 0 @@ -55,8 +57,9 @@ def quikr_train(input_file_location, kmer): # load and normalize the matrix by dividing each element by the sum of it's column. matrix = np.loadtxt(input_file.stdout) + + matrix = np.rot90(matrix) normalized = matrix / matrix.sum(0) - return normalized if __name__ == "__main__": -- cgit v1.2.3