* @param seqRef
* @param startRes
*/
- public void createSequenceMapping(SequenceI seqRef, int startRes)
+ public void createSequenceMapping(SequenceI seqRef,
+ int startRes,
+ boolean alreadyMapped)
{
if(seqRef == null)
return;
sequenceMapping = new java.util.Hashtable();
sequenceRef = seqRef;
-
- if(startRes < sequenceRef.getStart())
- startRes = sequenceRef.getStart();
-
int seqPos;
- int fileOffset = 0;
- if(startRes > sequenceRef.getStart())
- {
- fileOffset = startRes - sequenceRef.getStart();
- }
-
for(int i = 0; i < annotations.length; i++)
{
- seqPos = sequenceRef.findPosition(i + fileOffset);
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();
-
}
public void adjustForAlignment()