From f93f2777f3fa13f1f48cb754f97169378c7a8f90 Mon Sep 17 00:00:00 2001 From: James Procter Date: Sun, 14 Jan 2024 15:05:10 +0000 Subject: [PATCH] JAL-4366 JAL-4371 tighten up detection of chain code and allow two-character codes JAL-3947 --- src/jalview/struture/PDBEntryUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jalview/struture/PDBEntryUtils.java b/src/jalview/struture/PDBEntryUtils.java index 08d192f..2d67434 100644 --- a/src/jalview/struture/PDBEntryUtils.java +++ b/src/jalview/struture/PDBEntryUtils.java @@ -61,7 +61,7 @@ public class PDBEntryUtils } return targetChainId; } - protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:]?(.+)*"); + protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:|]?(.{1,2})?"); public static List inferPDBEntry(SequenceI seq) { @@ -145,6 +145,8 @@ public class PDBEntryUtils putativeEntry = pdbe; return putativeEntry; } + } else { + return pdbe; } } return null; -- 1.7.10.2