From 066b2ddcb06a5c4ff0a6f34999c19f9fc37801af Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 25 Jul 2024 15:04:34 +0100 Subject: [PATCH] JAL-4386 TODOs re standardising and more efficient linking of PDB ID and provider to annotation row --- .settings/org.eclipse.buildship.core.prefs | 4 ++-- src/jalview/analysis/AlignmentUtils.java | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs index e479558..a07cb48 100644 --- a/.settings/org.eclipse.buildship.core.prefs +++ b/.settings/org.eclipse.buildship.core.prefs @@ -1,13 +1,13 @@ arguments= auto.sync=false build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.6.4)) connection.project.dir= eclipse.preferences.version=1 gradle.user.home= java.home= jvm.arguments= offline.mode=false -override.workspace.settings=false +override.workspace.settings=true show.console.view=false show.executions.view=false diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 40cf903..d78bcdc 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -3045,15 +3045,18 @@ public class AlignmentUtils Vector pdbEntries = aa.sequenceRef.getDatasetSequence() .getAllPDBEntries(); + // TODO: this is an incredibly fragile mechanism for (PDBEntry entry : pdbEntries) { String entryProvider = entry.getProvider(); if (entryProvider == null) { + // No provider - so this is either an old Jalview project, or not retrieved from recognised source entryProvider = "PDB"; } + // Should (re)use a standard mechanism for extracting the PDB ID as it is written 1QWXTUV:CHAIN // Trim the string from first occurrence of colon String entryID = entry.getId(); int index = entryID.indexOf(':'); @@ -3067,6 +3070,7 @@ public class AlignmentUtils } + // TODO: shouldn't need to extract from description what the originating ID is for this annotation! if (entryProvider == "PDB" && aa.description.toLowerCase() .contains("secondary structure for " + entryID.toLowerCase())) -- 1.7.10.2