aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin <calvin@EESI>2013-02-22 07:41:48 -0500
committerCalvin <calvin@EESI>2013-02-22 07:41:48 -0500
commitd252aeb1e3a4a45d3a0783ff90da37e381d23d78 (patch)
tree4d6c5e12cda830285fe016acd9e01eac6f5ac2d3
parent83316cde3f811c5ae244f90783c508be237837d2 (diff)
rotate matricies
-rwxr-xr-xquikr_train.py5
1 files changed, 4 insertions, 1 deletions
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__":