git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1933 show occupancy in tooltip for row
[jalview.git]
/
src
/
jalview
/
analysis
/
AAFrequency.java
diff --git
a/src/jalview/analysis/AAFrequency.java
b/src/jalview/analysis/AAFrequency.java
index
ee16f94
..
b806355
100755
(executable)
--- a/
src/jalview/analysis/AAFrequency.java
+++ b/
src/jalview/analysis/AAFrequency.java
@@
-20,10
+20,6
@@
*/
package jalview.analysis;
*/
package jalview.analysis;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.List;
-
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
@@
-41,6
+37,11
@@
import jalview.util.Format;
import jalview.util.MappingUtils;
import jalview.util.QuickSort;
import jalview.util.MappingUtils;
import jalview.util.QuickSort;
+import java.awt.Color;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.List;
+
/**
* Takes in a vector or array of sequences and column start and column end and
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
/**
* Takes in a vector or array of sequences and column start and column end and
* returns a new Hashtable[] of size maxSeqLength, if Hashtable not supplied.
@@
-315,6
+316,7
@@
public class AAFrequency
// always set ranges again
gaprow.graphMax = nseq;
gaprow.graphMin = 0;
// always set ranges again
gaprow.graphMax = nseq;
gaprow.graphMin = 0;
+ double scale = 0.8/nseq;
for (int i = startCol; i < endCol; i++)
{
ProfileI profile = profiles.get(i);
for (int i = startCol; i < endCol; i++)
{
ProfileI profile = profiles.get(i);
@@
-330,11
+332,11
@@
public class AAFrequency
final int gapped = profile.getNonGapped();
final int gapped = profile.getNonGapped();
- String description = String.valueOf(gapped);
+ String description = "" + gapped;
- gaprow.annotations[i] = new Annotation(description, description,
- '\0',
- gapped);
+ gaprow.annotations[i] = new Annotation("", description,
+ '\0', gapped, jalview.util.ColorUtils.bleachColour(
+ Color.DARK_GRAY, (float) scale * gapped));
}
}
}
}