X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=af0079870b139f6d4230a701df32371c7729fc68;hb=ead72caff9aef9b7103dbb15907aeae777200832;hp=ac2897d22b48ee60840c7a23de20c79316c90159;hpb=d3a2fdc864b586b5c604335dd715ec215b679197;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index ac2897d..af00798 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -46,6 +46,70 @@ public class StructureSelectionManager StructureMapping[] mappings; + private boolean processSecondaryStructure = false, + secStructServices = false, addTempFacAnnot = false; + + /** + * @return true if will try to use external services for processing secondary + * structure + */ + public boolean isSecStructServices() + { + return secStructServices; + } + + /** + * control use of external services for processing secondary structure + * + * @param secStructServices + */ + public void setSecStructServices(boolean secStructServices) + { + this.secStructServices = secStructServices; + } + + /** + * flag controlling addition of any kind of structural annotation + * + * @return true if temperature factor annotation will be added + */ + public boolean isAddTempFacAnnot() + { + return addTempFacAnnot; + } + + /** + * set flag controlling addition of structural annotation + * + * @param addTempFacAnnot + */ + public void setAddTempFacAnnot(boolean addTempFacAnnot) + { + this.addTempFacAnnot = addTempFacAnnot; + } + + /** + * + * @return if true, the structure manager will attempt to add secondary + * structure lines for unannotated sequences + */ + + public boolean isProcessSecondaryStructure() + { + return processSecondaryStructure; + } + + /** + * Control whether structure manager will try to annotate mapped sequences + * with secondary structure from PDB data. + * + * @param enable + */ + public void setProcessSecondaryStructure(boolean enable) + { + processSecondaryStructure = enable; + } + /** * debug function - write all mappings to stdout */ @@ -245,7 +309,7 @@ public class StructureSelectionManager * the tried and tested MCview pdb mapping */ MCview.PDBfile pdb = null; - boolean parseSecStr=true; + boolean parseSecStr = processSecondaryStructure; if (isPDBFileRegistered(pdbFile)) { for (SequenceI sq : sequence) @@ -274,7 +338,8 @@ public class StructureSelectionManager } try { - pdb = new MCview.PDBfile(true, parseSecStr, pdbFile, protocol); + pdb = new MCview.PDBfile(addTempFacAnnot, parseSecStr, + secStructServices, pdbFile, protocol); if (pdb.id != null && pdb.id.trim().length() > 0 && AppletFormatAdapter.FILE.equals(protocol)) { @@ -457,7 +522,6 @@ public class StructureSelectionManager { return; } - boolean removeMapping = true; String[] handlepdbs; Vector pdbs = new Vector(); for (int i = 0; i < pdbfiles.length; pdbs.addElement(pdbfiles[i++]))