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-2629 can now choose number of jackhmmer iterations
[jalview.git]
/
src
/
jalview
/
structure
/
StructureSelectionManager.java
diff --git
a/src/jalview/structure/StructureSelectionManager.java
b/src/jalview/structure/StructureSelectionManager.java
index
0e43841
..
ff88bb7
100644
(file)
--- a/
src/jalview/structure/StructureSelectionManager.java
+++ b/
src/jalview/structure/StructureSelectionManager.java
@@
-41,6
+41,7
@@
import jalview.io.DataSourceType;
import jalview.io.StructureFile;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
import jalview.io.StructureFile;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import jalview.ws.sifts.SiftsClient;
import jalview.ws.sifts.SiftsException;
import jalview.ws.sifts.SiftsSettings;
import jalview.ws.sifts.SiftsClient;
import jalview.ws.sifts.SiftsException;
import jalview.ws.sifts.SiftsSettings;
@@
-285,7
+286,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
+296,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
+399,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)
{
@@
-426,6
+431,7
@@
public class StructureSelectionManager
{
isMapUsingSIFTs = false;
e.printStackTrace();
{
isMapUsingSIFTs = false;
e.printStackTrace();
+ siftsClient = null;
}
String targetChainId;
}
String targetChainId;
@@
-571,6
+577,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())
{
@@
-604,7
+617,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)
{
@@
-656,7
+672,10
@@
public class StructureSelectionManager
public void addStructureMapping(StructureMapping sm)
{
public void addStructureMapping(StructureMapping sm)
{
- mappings.add(sm);
+ if (!mappings.contains(sm))
+ {
+ mappings.add(sm);
+ }
}
/**
}
/**
@@
-1152,7
+1171,8
@@
public class StructureSelectionManager
StringBuilder sb = new StringBuilder(64);
for (StructureMapping sm : mappings)
{
StringBuilder sb = new StringBuilder(64);
for (StructureMapping sm : mappings)
{
- if (sm.pdbfile.equals(pdbfile) && seqs.contains(sm.sequence))
+ if (Platform.pathEquals(sm.pdbfile, pdbfile)
+ && seqs.contains(sm.sequence))
{
sb.append(sm.mappingDetails);
sb.append(NEWLINE);
{
sb.append(sm.mappingDetails);
sb.append(NEWLINE);
@@
-1325,7
+1345,10
@@
public class StructureSelectionManager
instances.remove(jalviewLite);
try
{
instances.remove(jalviewLite);
try
{
- mnger.finalize();
+ /* bsoares 2019-03-20 finalize deprecated, no apparent external
+ * resources to close
+ */
+ // mnger.finalize();
} catch (Throwable x)
{
}
} catch (Throwable x)
{
}