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-3032 use small example Ensembl gene for JalviewJS
[jalview.git]
/
src
/
jalview
/
structure
/
StructureSelectionManager.java
diff --git
a/src/jalview/structure/StructureSelectionManager.java
b/src/jalview/structure/StructureSelectionManager.java
index
10fe836
..
6261e74
100644
(file)
--- a/
src/jalview/structure/StructureSelectionManager.java
+++ b/
src/jalview/structure/StructureSelectionManager.java
@@
-56,9
+56,9
@@
import java.util.List;
import java.util.Map;
import java.util.Vector;
import java.util.Map;
import java.util.Vector;
-import MCview.Atom;
-import MCview.PDBChain;
-import MCview.PDBfile;
+import mc_view.Atom;
+import mc_view.PDBChain;
+import mc_view.PDBfile;
public class StructureSelectionManager
{
public class StructureSelectionManager
{
@@
-285,7
+285,8
@@
public class StructureSelectionManager
}
/**
}
/**
- * Returns the file name for a mapped PDB id (or null if not mapped).
+ * Returns the filename the PDB id is already mapped to if known, or null if
+ * it is not mapped
*
* @param pdbid
* @return
*
* @param pdbid
* @return
@@
-294,7
+295,7
@@
public class StructureSelectionManager
{
for (StructureMapping sm : mappings)
{
{
for (StructureMapping sm : mappings)
{
- if (sm.getPdbId().equals(pdbid))
+ if (sm.getPdbId().equalsIgnoreCase(pdbid))
{
return sm.pdbfile;
}
{
return sm.pdbfile;
}
@@
-397,8
+398,11
@@
public class StructureSelectionManager
{
// FIXME if sourceType is not null, we've lost data here
sourceType = AppletFormatAdapter.checkProtocol(pdbFile);
{
// FIXME if sourceType is not null, we've lost data here
sourceType = AppletFormatAdapter.checkProtocol(pdbFile);
- pdb = new JmolParser(pdbFile, sourceType);
-
+ pdb = new JmolParser(false, pdbFile, sourceType);
+ pdb.addSettings(parseSecStr && processSecondaryStructure,
+ parseSecStr && addTempFacAnnot,
+ parseSecStr && secStructServices);
+ pdb.doParse();
if (pdb.getId() != null && pdb.getId().trim().length() > 0
&& DataSourceType.FILE == sourceType)
{
if (pdb.getId() != null && pdb.getId().trim().length() > 0
&& DataSourceType.FILE == sourceType)
{
@@
-572,6
+576,13
@@
public class StructureSelectionManager
{
System.err.println(e.getMessage());
}
{
System.err.println(e.getMessage());
}
+ catch (Exception e)
+ {
+ System.err
+ .println(
+ "Unexpected exception during SIFTS mapping - falling back to NW for this sequence/structure pair");
+ System.err.println(e.getMessage());
+ }
}
if (!foundSiftsMappings.isEmpty())
{
}
if (!foundSiftsMappings.isEmpty())
{
@@
-605,7
+616,10
@@
public class StructureSelectionManager
}
if (forStructureView)
{
}
if (forStructureView)
{
- mappings.addAll(seqToStrucMapping);
+ for (StructureMapping sm : seqToStrucMapping)
+ {
+ addStructureMapping(sm); // not addAll!
+ }
}
if (progress != null)
{
}
if (progress != null)
{
@@
-657,7
+671,10
@@
public class StructureSelectionManager
public void addStructureMapping(StructureMapping sm)
{
public void addStructureMapping(StructureMapping sm)
{
- mappings.add(sm);
+ if (!mappings.contains(sm))
+ {
+ mappings.add(sm);
+ }
}
/**
}
/**