/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
for (j = 0; j < jSize; j++)
{
+ if (sequences[j]==null)
+ {
+ System.err.println("WARNING: Consensus skipping null sequence - possible race condition.");
+ continue;
+ }
seq = sequences[j].getSequence();
if (seq.length > i)
{
boolean includeAllConsSymbols, char[] alphabet)
{
float tval, value;
- if (consensus==null || consensus.annotations==null || consensus.annotations.length<width)
+ if (consensus == null || consensus.annotations == null
+ || consensus.annotations.length < width)
{
- // called with a bad alignment annotation row - wait for it to be initialised properly
+ // called with a bad alignment annotation row - wait for it to be
+ // initialised properly
return;
}
for (int i = iStart; i < width; i++)
{
- if (i>=hconsensus.length) {
- // happens if sequences calculated over were shorter than alignment width
- consensus.annotations[i]=null;
+ if (i >= hconsensus.length)
+ {
+ // happens if sequences calculated over were shorter than alignment
+ // width
+ consensus.annotations[i] = null;
continue;
}
value = 0;