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-2319 corrected reporting of SIFTS mapping
[jalview.git]
/
src
/
jalview
/
ws
/
sifts
/
SiftsClient.java
diff --git
a/src/jalview/ws/sifts/SiftsClient.java
b/src/jalview/ws/sifts/SiftsClient.java
index
e85edd2
..
27db604
100644
(file)
--- a/
src/jalview/ws/sifts/SiftsClient.java
+++ b/
src/jalview/ws/sifts/SiftsClient.java
@@
-29,6
+29,7
@@
import jalview.datamodel.SequenceI;
import jalview.io.StructureFile;
import jalview.schemes.ResidueProperties;
import jalview.structure.StructureMapping;
import jalview.io.StructureFile;
import jalview.schemes.ResidueProperties;
import jalview.structure.StructureMapping;
+import jalview.util.Comparison;
import jalview.util.DBRefUtils;
import jalview.util.Format;
import jalview.xml.binding.sifts.Entry;
import jalview.util.DBRefUtils;
import jalview.util.Format;
import jalview.xml.binding.sifts.Entry;
@@
-472,8
+473,7
@@
public class SiftsClient implements SiftsClientI
if (mapping.isEmpty())
{
if (mapping.isEmpty())
{
- throw new SiftsException(
- "SIFTS mapping failed - falling back on Needleman-Wunsch");
+ throw new SiftsException("SIFTS mapping failed");
}
Integer[] keys = mapping.keySet().toArray(new Integer[0]);
}
Integer[] keys = mapping.keySet().toArray(new Integer[0]);
@@
-511,13
+511,13
@@
public class SiftsClient implements SiftsClientI
if (os != null)
{
MappingOutputPojo mop = new MappingOutputPojo();
if (os != null)
{
MappingOutputPojo mop = new MappingOutputPojo();
- mop.setSeqStart(pdbStart);
- mop.setSeqEnd(pdbEnd);
+ mop.setSeqStart(seqStart);
+ mop.setSeqEnd(seqEnd);
mop.setSeqName(seq.getName());
mop.setSeqResidue(matchedSeq);
mop.setSeqName(seq.getName());
mop.setSeqResidue(matchedSeq);
- mop.setStrStart(seqStart);
- mop.setStrEnd(seqEnd);
+ mop.setStrStart(pdbStart);
+ mop.setStrEnd(pdbEnd);
mop.setStrName(structId);
mop.setStrResidue(targetStrucSeqs.toString());
mop.setStrName(structId);
mop.setStrResidue(targetStrucSeqs.toString());
@@
-827,6
+827,10
@@
public class SiftsClient implements SiftsClientI
if (sPojo[0].entityId != null)
{
if (sPojo[0].entityId != null)
{
+ if (sPojo[0].pid < 1)
+ {
+ return null;
+ }
for (Entity entity : entities)
{
if (!entity.getEntityId().equalsIgnoreCase(sPojo[0].entityId))
for (Entity entity : entities)
{
if (!entity.getEntityId().equalsIgnoreCase(sPojo[0].entityId))
@@
-1001,8
+1005,10
@@
public class SiftsClient implements SiftsClientI
{
if ((i + (j * len)) < seqRes.length())
{
{
if ((i + (j * len)) < seqRes.length())
{
- if (seqRes.charAt(i + (j * len)) == strRes
- .charAt(i + (j * len))
+ boolean sameChar = Comparison.isSameResidue(
+ seqRes.charAt(i + (j * len)),
+ strRes.charAt(i + (j * len)), false);
+ if (sameChar
&& !jalview.util.Comparison.isGap(seqRes.charAt(i
+ (j * len))))
{
&& !jalview.util.Comparison.isGap(seqRes.charAt(i
+ (j * len))))
{