/*
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
* Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
*
* 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 / (float) alignment.getHeight();
pw.print(nl);
pw.print("Sequences: " + alignment.getHeight());
pw.print(nl);
pw.print("Minimum Sequence Length: " + min);
pw.print(nl);
pw.print("Maximum Sequence Length: " + max);
pw.print(nl);
pw.print("Average Length: " + (int) avg);
if (((Alignment) alignment).alignmentProperties != null)
{
pw.print(nl);
pw.print(nl);
if (html)
{
pw.print("
" + key + " | " + val + " |