From 19f73475773a16b227aedb69a5aadbde0d054767 Mon Sep 17 00:00:00 2001 From: Calvin Date: Thu, 14 Mar 2013 12:35:44 -0400 Subject: re-add the kmer filename checK --- src/python/quikr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/python/quikr.py') 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) -- cgit v1.2.3