From f6cf71697dde4b4cdc4dcc8941e30fb5c71a5a41 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Fri, 27 May 2016 11:17:14 +0100 Subject: [PATCH] JAL-1823 improvement to all chain code specification from manual pdb entry mode --- src/jalview/gui/StructureChooser.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()); -- 1.7.10.2