diff options
author | Calvin <calvin@EESI> | 2013-03-14 12:35:44 -0400 |
---|---|---|
committer | Calvin <calvin@EESI> | 2013-03-14 12:35:44 -0400 |
commit | 19f73475773a16b227aedb69a5aadbde0d054767 (patch) | |
tree | 8ecfd3af033239e030bd83cccfd5abf3fdb3e7cf /src/python/quikr.py | |
parent | 2818dc1df11ea3e91a759a177071d3014d87c705 (diff) |
re-add the kmer filename checK
Diffstat (limited to 'src/python/quikr.py')
-rwxr-xr-x | src/python/quikr.py | 5 |
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) |