int startPos = aligmentStartEnd[0];
int endPos = aligmentStartEnd[1];
- int[] lowestRange = new int[2];
- int[] higestRange = new int[2];
+ int[] lowestRange = new int[] { -1, -1 };
+ int[] higestRange = new int[] { -1, -1 };
for (int[] hiddenCol : hiddenCols)
{
- // System.out.println("comparing : " + hiddenCol[0] + "-" + hiddenCol[1]);
lowestRange = (hiddenCol[0] <= startPos) ? hiddenCol : lowestRange;
higestRange = (hiddenCol[1] >= endPos) ? hiddenCol : higestRange;
}
- // System.out.println("min : " + lowestRange[0] + "-" + lowestRange[1]);
- // System.out.println("max : " + higestRange[0] + "-" + higestRange[1]);
- if (lowestRange[0] == 0 && lowestRange[1] == 0)
+ if (lowestRange[0] == -1 && lowestRange[1] == -1)
{
startPos = aligmentStartEnd[0];
}
startPos = lowestRange[1] + 1;
}
- if (higestRange[0] == 0 && higestRange[1] == 0)
+ if (higestRange[0] == -1 && higestRange[1] == -1)
{
endPos = aligmentStartEnd[1];
}
else
{
- endPos = higestRange[0];
+ endPos = higestRange[0] - 1;
}
- // System.out.println("Export range : " + minPos + " - " + maxPos);
+ // System.out.println("Export range : " + startPos + " - " + endPos);
return new int[] { startPos, endPos };
}
public static void main(String[] args)
{
ArrayList<int[]> hiddenCols = new ArrayList<int[]>();
- hiddenCols.add(new int[] { 0, 4 });
+ hiddenCols.add(new int[] { 0, 0 });
hiddenCols.add(new int[] { 6, 9 });
hiddenCols.add(new int[] { 11, 12 });
hiddenCols.add(new int[] { 33, 33 });
- hiddenCols.add(new int[] { 45, 50 });
+ hiddenCols.add(new int[] { 50, 50 });
int[] x = getStartEnd(new int[] { 0, 50 }, hiddenCols);
// System.out.println("Export range : " + x[0] + " - " + x[1]);
{
startRes = seqs[i].getStart();
endRes = seqs[i].getEnd();
-
if (startEnd != null)
{
startIndex = startEnd[0];
}
startRes = seqs[i].findPosition(startIndex);
- startRes = seqs[i].getStart() > 1 ? startRes - seqs[i].getStart()
- : startRes;
- endRes = seqs[i].findPosition(endIndex) - seqs[i].getStart();
+ endRes = seqs[i].findPosition(endIndex);
}
tmp[i] = new Sequence(seqs[i].getName(), omitHiddenColumns[i],