aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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__":