From: tcofoegbu Date: Fri, 27 May 2016 10:17:14 +0000 (+0100) Subject: JAL-1823 improvement to all chain code specification from manual pdb entry mode X-Git-Tag: Release_2_10_0~210 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f6cf71697dde4b4cdc4dcc8941e30fb5c71a5a41;p=jalview.git JAL-1823 improvement to all chain code specification from manual pdb entry mode --- diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index d924e73..10d3a9d 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -800,6 +800,10 @@ public class StructureChooser extends GStructureChooser implements if (pdbEntry == null) { pdbEntry = new PDBEntry(); + if (pdbIdStr.split(":").length > 1) + { + pdbEntry.setChainCode(pdbIdStr.split(":")[1]); + } pdbEntry.setId(pdbIdStr); pdbEntry.setType(PDBEntry.Type.PDB); selectedSequence.getDatasetSequence().addPDBId(pdbEntry); @@ -943,6 +947,9 @@ public class StructureChooser extends GStructureChooser implements isValidPBDEntry = false; if (txt_search.getText().length() > 0) { + String searchTerm = txt_search.getText().toLowerCase(); + searchTerm = searchTerm.split(":")[0]; + System.out.println(">>>>> search term : " + searchTerm); List wantedFields = new ArrayList(); FTSRestRequest pdbRequest = new FTSRestRequest(); pdbRequest.setAllowEmptySeq(false); @@ -950,7 +957,7 @@ public class StructureChooser extends GStructureChooser implements pdbRequest.setFieldToSearchBy("(pdb_id:"); pdbRequest.setWantedFields(wantedFields); pdbRequest - .setSearchTerm(txt_search.getText().toLowerCase() + ")"); +.setSearchTerm(searchTerm + ")"); pdbRequest.setAssociatedSequence(selectedSequence); pdbRestCleint = PDBFTSRestClient.getInstance(); wantedFields.add(pdbRestCleint.getPrimaryKeyColumn());