import jalview.datamodel.Annotation;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.util.Comparison;
import jalview.util.Format;
import java.util.ArrayList;
.println("WARNING: Consensus skipping null sequence - possible race condition.");
continue;
}
- c = sequences[j].getCharAt(i);
- // standard representation for gaps in sequence and structure
- if (c == '.' || c == ' ')
- {
- c = '-';
- }
+ c = sequences[j].getCharAt(i);
+ cEnd = sequences[j].getCharAt(bpEnd);
- if (c == '-')
+ if (Comparison.isGap(c) || Comparison.isGap(cEnd))
{
values['-']++;
continue;
}
- cEnd = sequences[j].getCharAt(bpEnd);
/*
* ensure upper-case for counting purposes
residueHash.put(PAIRPROFILE, pairs);
}
- int count = Math.max(canonicalOrWobblePairCount, otherPairCount);
+
+ /*
+ * the count is the number of valid pairs (as a percentage, determines
+ * the relative size of the profile logo)
+ */
+ int count = canonicalOrWobblePairCount;
+
+ /*
+ * currently displaying as '(' if most pairs are valid, or as
+ * '[' if there are more invalid than valid pairs
+ */
if (!maxResidue.equals("-"))
{
maxResidue = canonicalOrWobblePairCount >= otherPairCount ? "("