From 14db04bf4bd6e7bfefb17ce5d99c6536588bb9d4 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 14 Sep 2009 18:51:30 +0000 Subject: [PATCH] Fix ticket:145 this patch includes the tar.bz2 extension in the scores pattern. Also for good measure I check for tar.gz and .tgz. This'll help avoid the problem of something else showing up in the directory that matches the pattern scores*, like scores.tar.bz2.md5 --- htsworkflow/frontend/samples/results.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htsworkflow/frontend/samples/results.py b/htsworkflow/frontend/samples/results.py index c2419cd..39797b1 100644 --- a/htsworkflow/frontend/samples/results.py +++ b/htsworkflow/frontend/samples/results.py @@ -95,7 +95,11 @@ def get_flowcell_result_dict(flowcell_id): ############################### # scores.tar.gz - scores_filepath = glob.glob(os.path.join(c_dir_path, 'scores*')) + # restrict to only compressed files, so in case there are *.md5 files + # we don't get confused. + scores_filepath = [] + for pattern in ['scores*.tar.bz2', 'scores*.tar.gz', 'scores*.tgz']: + scores_filepath += glob.glob(os.path.join(c_dir_path, pattern)) if len(scores_filepath) == 0: d[c_dir]['scores'] = None -- 2.30.2