char[] tmp = StringUtils.deleteChars(sequence, i, j);
boolean createNewDs = false;
- // TODO: take a look at the new dataset creation validation method below -
- // this could become time comsuming for large sequences - consider making it
- // more efficient
+ // TODO: take a (second look) at the dataset creation validation method for
+ // the very large sequence case
+ int eindex = -1, sindex = -1;
+ boolean ecalc = false, scalc = false;
for (int s = i; s < j; s++)
{
if (jalview.schemes.ResidueProperties.aaIndex[sequence[s]] != 23)
}
else
{
- int sindex = findIndex(start) - 1;
+ if (!scalc)
+ {
+ sindex = findIndex(start) - 1;
+ scalc = true;
+ }
if (sindex == s)
{
// delete characters including start of sequence
else
{
// delete characters after start.
- int eindex = findIndex(end) - 1;
+ if (!ecalc)
+ {
+ eindex = findIndex(end) - 1;
+ ecalc = true;
+ }
if (eindex < j)
{
// delete characters at end of sequence