/*
* Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
* Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jalview. If not, see
" : System.getProperty("line.separator");
float avg = 0;
int min = Integer.MAX_VALUE, max = 0;
for (int i = 0; i < alignment.getHeight(); i++)
{
int size = 1 + alignment.getSequenceAt(i).getEnd()
- alignment.getSequenceAt(i).getStart();
avg += size;
if (size > max)
{
max = size;
}
if (size < min)
{
min = size;
}
}
avg = avg / alignment.getHeight();
sb.append(nl);
sb.append("Sequences: " + alignment.getHeight());
sb.append(nl);
sb.append("Minimum Sequence Length: " + min);
sb.append(nl);
sb.append("Maximum Sequence Length: " + max);
sb.append(nl);
sb.append("Average Length: " + (int) avg);
if (((Alignment) alignment).alignmentProperties != null)
{
sb.append(nl);
sb.append(nl);
if (html)
{
sb.append("
" + key + " | " + val + " |