summaryrefslogtreecommitdiff
path: root/src/python/quikr.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/quikr.py')
-rwxr-xr-xsrc/python/quikr.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/python/quikr.py b/src/python/quikr.py
index e1ed69d..fe5ea63 100755
--- a/src/python/quikr.py
+++ b/src/python/quikr.py
@@ -56,12 +56,15 @@ def train_matrix(input_file_location, kmer):
kmer_file_name = str(kmer) + "mers.txt"
+ if not os.path.isfile(kmer_file_name):
+ print "could not find kmer file"
+ exit()
+
input_file = Popen(["probabilities-by-read", str(kmer), input_file_location, kmer_file_name] , stdout=PIPE)
# load and normalize the matrix by dividing each element by the sum of it's column.
# also do some fancy rotations so that it works properly with quikr
matrix = np.loadtxt(input_file.stdout)
-
matrix = np.rot90(matrix)
matrix = matrix / matrix.sum(0)