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
Simplified layout
[jalview.git]
/
src
/
jalview
/
datamodel
/
AlignmentAnnotation.java
diff --git
a/src/jalview/datamodel/AlignmentAnnotation.java
b/src/jalview/datamodel/AlignmentAnnotation.java
index
2850eeb
..
470497e
100755
(executable)
--- a/
src/jalview/datamodel/AlignmentAnnotation.java
+++ b/
src/jalview/datamodel/AlignmentAnnotation.java
@@
-1,6
+1,6
@@
/*
* Jalview - A Sequence Alignment Editor and Viewer
/*
* Jalview - A Sequence Alignment Editor and Viewer
-* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+* Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@
-262,7
+262,9
@@
public class AlignmentAnnotation
* @param seqRef
* @param startRes
*/
* @param seqRef
* @param startRes
*/
- public void createSequenceMapping(SequenceI seqRef, int startRes)
+ public void createSequenceMapping(SequenceI seqRef,
+ int startRes,
+ boolean alreadyMapped)
{
if(seqRef == null)
return;
{
if(seqRef == null)
return;
@@
-270,30
+272,22
@@
public class AlignmentAnnotation
sequenceMapping = new java.util.Hashtable();
sequenceRef = seqRef;
sequenceMapping = new java.util.Hashtable();
sequenceRef = seqRef;
-
- if(startRes < sequenceRef.getStart())
- startRes = sequenceRef.getStart();
-
int seqPos;
int seqPos;
- int fileOffset = 0;
- if(startRes > sequenceRef.getStart())
- {
- fileOffset = startRes - sequenceRef.getStart();
- }
-
for(int i = 0; i < annotations.length; i++)
{
for(int i = 0; i < annotations.length; i++)
{
- seqPos = sequenceRef.findPosition(i + fileOffset);
if (annotations[i] != null)
{
if (annotations[i] != null)
{
- sequenceMapping.put(new Integer(seqPos),
- annotations[i]);
+ if(alreadyMapped)
+ seqPos = seqRef.findPosition(i);
+ else
+ seqPos = i+startRes;
+
+ sequenceMapping.put(new Integer(seqPos), annotations[i]);
}
}
adjustForAlignment();
}
}
adjustForAlignment();
-
}
public void adjustForAlignment()
}
public void adjustForAlignment()