From: jprocter Date: Wed, 6 Apr 2005 16:05:43 +0000 (+0000) Subject: New method for helping to quickly map different aligned versions of a X-Git-Tag: Release_2_0~489 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b1ec29190c2aceda61a94197040c0d3288cc2702;p=jalview.git New method for helping to quickly map different aligned versions of a sequence. --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 99f2de2..5db051a 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -194,6 +194,22 @@ public class Sequence implements SequenceI } return pos; } + + public int[] gapMap() { + // Returns an int array giving the position of each residue in the sequence in the alignment + String seq = jalview.analysis.AlignSeq.extractGaps("-. ",sequence); + int[] map = new int[seq.length()]; + int j=0; + int p=0; + while (j