From 4dd44779e0d1ffa07b52b67bd8178ad45801bb4f Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 2 May 2007 14:27:25 +0000 Subject: [PATCH] documentation and proxy call to util.MapList.getToWord(mpos) --- src/jalview/datamodel/Mapping.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/jalview/datamodel/Mapping.java b/src/jalview/datamodel/Mapping.java index b9874a4..0063faa 100644 --- a/src/jalview/datamodel/Mapping.java +++ b/src/jalview/datamodel/Mapping.java @@ -99,12 +99,14 @@ public class Mapping { } return mpos; } + /** + * gets boundary in direction of mapping + * @param position in mapped reference frame + * @return int{start, end} positions in associated sequence (in direction of mapped word) + */ public int[] getWord(int mpos) { if (map!=null) { - int[] mp=map.shiftTo(mpos); - if (mp!=null) { - return new int[] {mp[0], mp[0]+mp[2]*(map.getFromRatio()-1)}; - } + return map.getToWord(mpos); } return null; } -- 1.7.10.2