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
merge
[jalview.git]
/
src
/
jalview
/
structure
/
StructureMapping.java
diff --git
a/src/jalview/structure/StructureMapping.java
b/src/jalview/structure/StructureMapping.java
index
e4749c9
..
a62f1ae
100644
(file)
--- a/
src/jalview/structure/StructureMapping.java
+++ b/
src/jalview/structure/StructureMapping.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-64,6
+64,11
@@
public class StructureMapping
return pdbid;
}
return pdbid;
}
+ /**
+ *
+ * @param seqpos
+ * @return 0 or corresponding atom number for the sequence position
+ */
public int getAtomNum(int seqpos)
{
if (mapping.length > seqpos)
public int getAtomNum(int seqpos)
{
if (mapping.length > seqpos)
@@
-76,6
+81,11
@@
public class StructureMapping
}
}
}
}
+ /**
+ *
+ * @param seqpos
+ * @return 0 or the corresponding residue number for the sequence position
+ */
public int getPDBResNum(int seqpos)
{
if (mapping.length > seqpos)
public int getPDBResNum(int seqpos)
{
if (mapping.length > seqpos)
@@
-88,6
+98,11
@@
public class StructureMapping
}
}
}
}
+ /**
+ *
+ * @param pdbResNum
+ * @return -1 or the corresponding sequence position for a pdb residue number
+ */
public int getSeqPos(int pdbResNum)
{
for (int i = 0; i < mapping.length; i++)
public int getSeqPos(int pdbResNum)
{
for (int i = 0; i < mapping.length; i++)
@@
-118,7
+133,10
@@
public class StructureMapping
{
ds = ds.getDatasetSequence();
}
{
ds = ds.getDatasetSequence();
}
- ala_copy.remap(ds, mapping, 0, -1, 1);
+ // need to relocate annotation from pdb coordinates to local sequence
+ // -1,-1 doesn't look at pdbresnum but fails to remap sequence positions...
+
+ ala_copy.remap(ds, mapping, -1, -1, 0);
ds.addAlignmentAnnotation(ala_copy);
if (ds != sequence)
{
ds.addAlignmentAnnotation(ala_copy);
if (ds != sequence)
{