Fix ticket:145 this patch includes the tar.bz2 extension in the scores pattern.
[htsworkflow.git] / htsworkflow / frontend / samples / results.py
index c2419cd916d110463297f97d4bf6a5b7449d78dc..39797b12d8c574f2660b3a57fb4fb3f432e746aa 100644 (file)
@@ -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