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-1738 JAL-345 fix for JAL-2302 only report Matches that are not contained by the...
[jalview.git]
/
src
/
jalview
/
structure
/
StructureSelectionManager.java
diff --git
a/src/jalview/structure/StructureSelectionManager.java
b/src/jalview/structure/StructureSelectionManager.java
index
7db85ff
..
6912836
100644
(file)
--- a/
src/jalview/structure/StructureSelectionManager.java
+++ b/
src/jalview/structure/StructureSelectionManager.java
@@
-31,7
+31,9
@@
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResults;
import jalview.datamodel.Annotation;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResults;
+import jalview.datamodel.SearchResultsI;
import jalview.datamodel.SequenceI;
import jalview.datamodel.SequenceI;
+import jalview.ext.jmol.JmolParser;
import jalview.gui.IProgressIndicator;
import jalview.io.AppletFormatAdapter;
import jalview.io.StructureFile;
import jalview.gui.IProgressIndicator;
import jalview.io.AppletFormatAdapter;
import jalview.io.StructureFile;
@@
-326,7
+328,6
@@
public class StructureSelectionManager
return setMapping(true, sequence, targetChains, pdbFile, protocol);
}
return setMapping(true, sequence, targetChains, pdbFile, protocol);
}
-
/**
* create sequence structure mappings between each sequence and the given
* pdbFile (retrieved via the given protocol).
/**
* create sequence structure mappings between each sequence and the given
* pdbFile (retrieved via the given protocol).
@@
-347,8
+348,7
@@
public class StructureSelectionManager
*/
synchronized public StructureFile setMapping(boolean forStructureView,
SequenceI[] sequenceArray, String[] targetChainIds,
*/
synchronized public StructureFile setMapping(boolean forStructureView,
SequenceI[] sequenceArray, String[] targetChainIds,
- String pdbFile,
- String protocol)
+ String pdbFile, String protocol)
{
/*
* There will be better ways of doing this in the future, for now we'll use
{
/*
* There will be better ways of doing this in the future, for now we'll use
@@
-384,14
+384,16
@@
public class StructureSelectionManager
boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts();
try
{
boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts();
try
{
- pdb = new jalview.ext.jmol.JmolParser(addTempFacAnnot, parseSecStr,
- secStructServices, pdbFile, protocol);
+ pdb = new JmolParser(pdbFile, protocol);
if (pdb.getId() != null && pdb.getId().trim().length() > 0
&& AppletFormatAdapter.FILE.equals(protocol))
{
registerPDBFile(pdb.getId().trim(), pdbFile);
}
if (pdb.getId() != null && pdb.getId().trim().length() > 0
&& AppletFormatAdapter.FILE.equals(protocol))
{
registerPDBFile(pdb.getId().trim(), pdbFile);
}
+ // if PDBId is unavailable then skip SIFTS mapping execution path
+ isMapUsingSIFTs = pdb.isPPDBIdAvailable();
+
} catch (Exception ex)
{
ex.printStackTrace();
} catch (Exception ex)
{
ex.printStackTrace();
@@
-538,8
+540,7
@@
public class StructureSelectionManager
try
{
StructureMapping siftsMapping = getStructureMapping(seq,
try
{
StructureMapping siftsMapping = getStructureMapping(seq,
- pdbFile,
- chain.id, pdb, chain, sqmpping, maxAlignseq);
+ pdbFile, chain.id, pdb, chain, sqmpping, maxAlignseq);
foundSiftsMappings.add(siftsMapping);
} catch (SiftsException e)
{
foundSiftsMappings.add(siftsMapping);
} catch (SiftsException e)
{
@@
-614,24
+615,23
@@
public class StructureSelectionManager
PDBChain maxChain, jalview.datamodel.Mapping sqmpping,
AlignSeq maxAlignseq) throws SiftsException
{
PDBChain maxChain, jalview.datamodel.Mapping sqmpping,
AlignSeq maxAlignseq) throws SiftsException
{
- StructureMapping curChainMapping = siftsClient
- .getSiftsStructureMapping(seq, pdbFile, targetChainId);
- try
- {
+ StructureMapping curChainMapping = siftsClient
+ .getSiftsStructureMapping(seq, pdbFile, targetChainId);
+ try
+ {
PDBChain chain = pdb.findChain(targetChainId);
if (chain != null)
{
chain.transferResidueAnnotation(curChainMapping, sqmpping);
}
PDBChain chain = pdb.findChain(targetChainId);
if (chain != null)
{
chain.transferResidueAnnotation(curChainMapping, sqmpping);
}
- } catch (Exception e)
- {
- e.printStackTrace();
- }
- return curChainMapping;
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return curChainMapping;
}
}
- private StructureMapping getNWMappings(SequenceI seq,
- String pdbFile,
+ private StructureMapping getNWMappings(SequenceI seq, String pdbFile,
String maxChainId, PDBChain maxChain, StructureFile pdb,
AlignSeq maxAlignseq)
{
String maxChainId, PDBChain maxChain, StructureFile pdb,
AlignSeq maxAlignseq)
{
@@
-806,7
+806,7
@@
public class StructureSelectionManager
return;
}
return;
}
- SearchResults results = new SearchResults();
+ SearchResultsI results = new SearchResults();
for (AtomSpec atom : atoms)
{
SequenceI lastseq = null;
for (AtomSpec atom : atoms)
{
SequenceI lastseq = null;
@@
-856,7
+856,7
@@
public class StructureSelectionManager
{
boolean hasSequenceListeners = handlingVamsasMo
|| !seqmappings.isEmpty();
{
boolean hasSequenceListeners = handlingVamsasMo
|| !seqmappings.isEmpty();
- SearchResults results = null;
+ SearchResultsI results = null;
if (seqPos == -1)
{
seqPos = seq.findPosition(indexpos);
if (seqPos == -1)
{
seqPos = seq.findPosition(indexpos);