From 01b6894c0a23ab88079f9f0f6a0786b5956f88a9 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 30 Mar 2010 17:45:22 +0000 Subject: [PATCH] name update for group autoannotation and consensus display settings --- src/jalview/datamodel/SequenceGroup.java | 73 +++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 3bdb65f..871e4cf 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -86,14 +86,14 @@ public class SequenceGroup /** * consensus calculation property */ - private boolean includeAllConsSymbols=false; + private boolean showConsensusProfile=false; /** * @return the includeAllConsSymbols */ public boolean isIncludeAllConsSymbols() { - return includeAllConsSymbols; + return showConsensusProfile; } @@ -454,6 +454,11 @@ public class SequenceGroup } /** + * Max Gaps Threshold for performing a conservation calculation + * TODO: make this a configurable property - or global to an alignment view + */ + private int consPercGaps=25; + /** * calculate residue conservation for group - but only if necessary. */ public void recalcConservation() @@ -465,7 +470,7 @@ public class SequenceGroup try { - Hashtable cnsns[] = AAFrequency.calculate(sequences, startRes, endRes + 1, includeAllConsSymbols); + Hashtable cnsns[] = AAFrequency.calculate(sequences, startRes, endRes + 1, showConsensusProfile); if (consensus != null) { _updateConsensusRow(cnsns); @@ -486,7 +491,7 @@ public class SequenceGroup ResidueProperties.propHash, 3, sequences, startRes, endRes + 1); c.calculate(); - c.verdict(false, 25); + c.verdict(false, consPercGaps); if (conservation!=null) { _updateConservationRow(c); @@ -515,6 +520,10 @@ public class SequenceGroup { getConservation(); } + // update Labels + conservation.label = "Conservation for "+getName(); + conservation.description = "Conservation for group "+getName()+" less than " + consPercGaps + + "% gaps"; // preserve width if already set int aWidth = (conservation.annotations!=null) ? (endRes