* Return absolute column index for a visible column index
*
* @param column
- * int column index in alignment view
+ * int column index in alignment view (count from zero)
* @return alignment column index for column
*/
public int adjustForHiddenColumns(int column)
{
if (((i - refSp) % 10) == 0)
{
- iadj = av.getColumnSelection().adjustForHiddenColumns(i) - 1;
+ iadj = av.getColumnSelection().adjustForHiddenColumns(i - 1);
if (refSeq == null)
{
- string = String.valueOf(iadj + 1);
+ string = String.valueOf(iadj);
}
else
{
}
+ @Test(groups={"Functional"})
+ public void testLocateVisibleBoundsPathologicals()
+ {
+ // test some pathological cases we missed
+ AlignmentI al = new Alignment(new SequenceI[] { new Sequence("refseqGaptest","KTDVTI----------NFI-----G----L")});
+ ColumnSelection cs = new ColumnSelection();
+ cs.hideInsertionsFor(al.getSequenceAt(0));
+ assertEquals(
+ "G",
+ ""
+ + al.getSequenceAt(0).getCharAt(
+ cs.adjustForHiddenColumns(9)));
+
+
+ }
@Test(groups = { "Functional" })
public void testHideColumns()
{