return map;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see jalview.datamodel.SequenceI#findPositionMap()
+ */
+ public int[] findPositionMap()
+ {
+ int map[] = new int[sequence.length];
+ int j = 0;
+ int pos = start;
+ int seqlen = sequence.length;
+ while ((j < seqlen))
+ {
+ map[j] = pos;
+ if (!jalview.util.Comparison.isGap(sequence[j]))
+ {
+ pos++;
+ }
+ j++;
+ }
+ return map;
+ }
/*
* (non-Javadoc)
*
public int[] gapMap();
/**
+ * Returns an int array where indices correspond to each position in
+ * sequence char array and the element value gives the result of findPosition
+ * for that index in the sequence.
+ *
+ * @return int[SequenceI.getLength()]
+ */
+ public int[] findPositionMap();
+ /**
* Delete a range of aligned sequence columns, creating a new dataset sequence if necessary
* and adjusting start and end positions accordingly.
*