}\r
return pos;\r
}\r
+\r
+ public int[] gapMap() {\r
+ // Returns an int array giving the position of each residue in the sequence in the alignment\r
+ String seq = jalview.analysis.AlignSeq.extractGaps("-. ",sequence);\r
+ int[] map = new int[seq.length()];\r
+ int j=0;\r
+ int p=0;\r
+ while (j<sequence.length()) {\r
+ if (!jalview.util.Comparison.isGap(sequence.charAt(j))) {\r
+ map[p++]=j;\r
+ }\r
+ j++;\r
+ }\r
+ return map;\r
+ }\r
+\r
public void deleteCharAt(int i)\r
{\r
StringBuffer sbuffer = new StringBuffer(sequence);\r
\r
public int findIndex(int pos);\r
public int findPosition(int i);\r
-\r
+ public int[] gapMap();\r
public void deleteChars(int i, int j);\r
public void deleteCharAt(int i);\r
public void insertCharAt(int i, char c);\r