git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2136 JAL-2137 Modified STRUCTMODEL annotation format and added implementation...
[jalview.git]
/
src
/
jalview
/
structure
/
StructureSelectionManager.java
diff --git
a/src/jalview/structure/StructureSelectionManager.java
b/src/jalview/structure/StructureSelectionManager.java
index
b0c185b
..
addf310
100644
(file)
--- a/
src/jalview/structure/StructureSelectionManager.java
+++ b/
src/jalview/structure/StructureSelectionManager.java
@@
-79,7
+79,6
@@
public class StructureSelectionManager
private long progressSessionId;
private long progressSessionId;
- private boolean mappingForPhyre2Model;
/*
* Set of any registered mappings between (dataset) sequences.
/*
* Set of any registered mappings between (dataset) sequences.
@@
-90,6
+89,8
@@
public class StructureSelectionManager
private List<SelectionListener> sel_listeners = new ArrayList<SelectionListener>();
private List<SelectionListener> sel_listeners = new ArrayList<SelectionListener>();
+ private List<String> phyre2ModelTemplates = new ArrayList<String>();
+
/**
* @return true if will try to use external services for processing secondary
* structure
/**
* @return true if will try to use external services for processing secondary
* structure
@@
-511,9
+512,9
@@
public class StructureSelectionManager
{
pdbFile = "INLINE" + pdb.getId();
}
{
pdbFile = "INLINE" + pdb.getId();
}
-
+ boolean phyre2Template = isPhyre2Template(pdbFile);
List<StructureMapping> seqToStrucMapping = new ArrayList<StructureMapping>();
List<StructureMapping> seqToStrucMapping = new ArrayList<StructureMapping>();
- if (!isMappingForPhyre2Model() && isMapUsingSIFTs && seq.isProtein())
+ if (!phyre2Template && isMapUsingSIFTs && seq.isProtein())
{
if (progress!=null) {
progress.setProgressBar(MessageManager
{
if (progress!=null) {
progress.setProgressBar(MessageManager
@@
-593,7
+594,7
@@
public class StructureSelectionManager
}
}
}
}
}
}
- else if (isMappingForPhyre2Model())
+ else if (phyre2Template)
{
setProgressBar(null);
setProgressBar(MessageManager
{
setProgressBar(null);
setProgressBar(MessageManager
@@
-627,11
+628,9
@@
public class StructureSelectionManager
return pdb;
}
return pdb;
}
- private boolean isCIFFile(String filename)
+ public void registerPhyre2Template(String phyre2Template)
{
{
- String fileExt = filename.substring(filename.lastIndexOf(".") + 1,
- filename.length());
- return "cif".equalsIgnoreCase(fileExt);
+ phyre2ModelTemplates.add(phyre2Template);
}
/**
}
/**
@@
-1394,15
+1393,16
@@
public class StructureSelectionManager
return seqmappings;
}
return seqmappings;
}
- public boolean isMappingForPhyre2Model()
+ public boolean isPhyre2Template(String structureFile)
{
{
- return mappingForPhyre2Model;
+ if (structureFile == null || phyre2ModelTemplates == null
+ || phyre2ModelTemplates.isEmpty())
+ {
+ return false;
+ }
+ return (phyre2ModelTemplates.contains(structureFile));
}
}
- public void setMappingForPhyre2Model(boolean mappingForPhyre2Model)
- {
- this.mappingForPhyre2Model = mappingForPhyre2Model;
- }
public static StructureSelectionManager getStructureSelectionManager()
{
public static StructureSelectionManager getStructureSelectionManager()
{