From c1b285cbd0c4f73fb91dd6f56d5f711192fbc481 Mon Sep 17 00:00:00 2001 From: Leszek Pryszcz Date: Sat, 25 May 2019 14:51:37 +0200 Subject: [PATCH] Update prepare_mapping_funcs.py Filtering wrong lines from read_params.tsv #18 --- taiyaki/prepare_mapping_funcs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taiyaki/prepare_mapping_funcs.py b/taiyaki/prepare_mapping_funcs.py index 44995ed..f7722f3 100755 --- a/taiyaki/prepare_mapping_funcs.py +++ b/taiyaki/prepare_mapping_funcs.py @@ -128,6 +128,9 @@ def get_per_read_params_dict_from_tsv(input_file): per_read_params_dict = {} for row in per_read_params_array: + if len(row)!=5 or not row[1].isdigit() or not row[2].isdigit(): + sys.stderr.write("[WARNING] Incorrect line in %s: %s\n"%(input_file, row)) + continue per_read_params_dict[row[0]] = {'trim_start': row[1], 'trim_end': row[2], 'shift': row[3],