From: Jim Procter Date: Thu, 27 Jun 2024 16:45:08 +0000 (+0100) Subject: Merge branch 'feature/JAL-4386_calculate_tree_using_secondary_structure_annotation... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=33ea95be162c87b303b091399ac0ee98dbde9c03;p=jalview.git Merge branch 'feature/JAL-4386_calculate_tree_using_secondary_structure_annotation' into spike/JAL-4386_generate_multiple_leaves_for_ss_sources --- 33ea95be162c87b303b091399ac0ee98dbde9c03 diff --cc src/jalview/structure/StructureSelectionManager.java index 95f93ea,cade4f6..731d82f --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@@ -708,24 -708,29 +708,41 @@@ public class StructureSelectionManage ssAnnotDescriptionInPDB = ssAnnotationsInPDB[0].description; } -- //Match the PDB entry using file path in the pdb data model and get the provider - Vector pdbEntries = seq.getDatasetSequence().getAllPDBEntries(); - for(PDBEntry pdbEntry : pdbEntries) { - if(ssStructFilePathNameInPDB!=null && pdbEntry.getFile()!=null && ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) { - provider = pdbEntry.getProvider(); - break; - } - } - - //Add provider value as property to the ss annotation - if(provider != null) { - AlignmentAnnotation[] ssAnnotList = ds.getAnnotation(Constants.SS_ANNOTATION_LABEL); - if(ssAnnotList != null) { - for(AlignmentAnnotation ssAnnot : ssAnnotList) { - //Match the annotation description with the annotation in pdb data object - if(ssAnnot.getProperty(Constants.SS_PROVIDER_PROPERTY) == null - && ssAnnot.description.equals(ssAnnotDescriptionInPDB)) { - ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY, provider); - if(seq.getDatasetSequence() != null) { - Vector pdbEntries = seq.getDatasetSequence().getAllPDBEntries(); - if(pdbEntries != null) { - for(PDBEntry pdbEntry : pdbEntries) { - if(ssStructFilePathNameInPDB.startsWith(pdbEntry.getFile())) { - provider = pdbEntry.getProvider(); - break; - } ++ // Match the PDB entry using file path in the pdb data model and get the ++ // provider ++ if (seq.getDatasetSequence() != null) ++ { ++ Vector pdbEntries = seq.getDatasetSequence() ++ .getAllPDBEntries(); ++ for (PDBEntry pdbEntry : pdbEntries) ++ { ++ if (ssStructFilePathNameInPDB != null ++ && pdbEntry.getFile() != null && ssStructFilePathNameInPDB ++ .startsWith(pdbEntry.getFile())) ++ { ++ provider = pdbEntry.getProvider(); ++ break; + } - - - //Add provider value as property to the ss annotation - if(provider != null) { - AlignmentAnnotation[] ssAnnotList = ds.getAnnotation(Constants.SS_ANNOTATION_LABEL); - if(ssAnnotList != null) { - for(AlignmentAnnotation ssAnnot : ssAnnotList) { - //Match the annotation description with the annotation in pdb data object - if(ssAnnot.getProperty(Constants.SS_PROVIDER_PROPERTY) == null - && ssAnnot.description.equals(ssAnnotDescriptionInPDB)) { - ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY, provider); - } ++ } ++ // Add provider value as property to the ss annotation ++ if (provider != null) ++ { ++ AlignmentAnnotation[] ssAnnotList = ds ++ .getAnnotation(Constants.SS_ANNOTATION_LABEL); ++ if (ssAnnotList != null) ++ { ++ for (AlignmentAnnotation ssAnnot : ssAnnotList) ++ { ++ // Match the annotation description with the annotation in pdb ++ // data object ++ if (ssAnnot ++ .getProperty(Constants.SS_PROVIDER_PROPERTY) == null ++ && ssAnnot.description ++ .equals(ssAnnotDescriptionInPDB)) ++ { ++ ssAnnot.setProperty(Constants.SS_PROVIDER_PROPERTY, ++ provider); + } } } }