From 6a8642ae75e9a5d9a138141b8237fc97bff1ca9b Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Mon, 6 Mar 2023 11:02:39 +0100
Subject: [PATCH] AFDB Modelling: make regex parsing ProMod3 output more
 permissive

'ling' instead of 'filling' also catches 'sampling' which is used in
CloseLargeDeletions desaster recovery.
---
 modelling/pymod/_afdb_modelling.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modelling/pymod/_afdb_modelling.py b/modelling/pymod/_afdb_modelling.py
index 243abc35..a273d8d8 100644
--- a/modelling/pymod/_afdb_modelling.py
+++ b/modelling/pymod/_afdb_modelling.py
@@ -609,7 +609,7 @@ def _TransferBFactors(messages, aln, model):
     # regular expression that finds stuff like: filling A.PRO59-(ESRQG)-A.ILE65
     # and directly makes stem residue numbers (59 and 65) available as groups
     cname = model.chains[0].GetName()
-    pat = f"filling {cname}\.[A-Z]+([0-9]*)-\([A-Z]+\)-{cname}\.[A-Z]+([0-9]+)"
+    pat = f"ling {cname}\.[A-Z]+([0-9]*)-\([A-Z]+\)-{cname}\.[A-Z]+([0-9]+)"
     for m in messages:
         if m.startswith("Resolved"):
             match = re.search(pat, m)
-- 
GitLab