X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=af0079870b139f6d4230a701df32371c7729fc68;hb=ead72caff9aef9b7103dbb15907aeae777200832;hp=928bb47a744518dbb43466fbe708a94221320e60;hpb=8b70da73fd4073a6e28292d94c1e731878858b66;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 928bb47..af00798 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -28,7 +28,7 @@ import jalview.datamodel.Annotation; import jalview.datamodel.PDBEntry; import jalview.datamodel.SearchResults; import jalview.datamodel.SequenceI; -import jalview.io.FormatAdapter; +import jalview.io.AppletFormatAdapter; import jalview.util.MessageManager; import java.io.PrintStream; @@ -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,9 +338,10 @@ 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 - && FormatAdapter.FILE.equals(protocol)) + && AppletFormatAdapter.FILE.equals(protocol)) { registerPDBFile(pdb.id.trim(), pdbFile); } @@ -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++]))