Package org.snpeff.stats
Class CountByType
java.lang.Object
org.snpeff.stats.CountByType
- All Implemented Interfaces:
Serializable
Counters indexed by 'type' (type is a generic string that can mean anything)
- Author:
- pcingola
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongAdd score for a typebooleanlongHow many counts of this type?getColorHtml(String type) Background color used for table (heatmap)longCount for this typedoubleScore for this typelongList all types (alphabetically sorted) We need it as a getter for summary page (freemarker)booleanbooleanhasData()booleanlonglongIncrement counter for a given typebooleanisEmpty()Is this emptykeySet()keysRanked(boolean reverse) List all types (sorted by count)List all types (alphabetically sorted)longmax()Maximum countlongmin()Minimum countdoublePercentage by typeranks(boolean reverse) A map: key -> rank(counts)voidRemove this entry typevoidlongsum()Sum all counts.toString()toString(boolean showScores) toStringTop(int n)
-
Field Details
-
TOTAL_TYPE
- See Also:
-
-
Constructor Details
-
CountByType
public CountByType()
-
-
Method Details
-
addScore
Add score for a type -
contains
-
get
How many counts of this type? -
getColorHtml
Background color used for table (heatmap)- Returns:
- An html coded color
-
getCount
Count for this type -
getScore
Score for this type -
getTotalCount
public long getTotalCount() -
getTypeList
List all types (alphabetically sorted) We need it as a getter for summary page (freemarker) -
hasCount
-
hasData
public boolean hasData() -
hasScore
-
inc
-
inc
Increment counter for a given type -
isEmpty
public boolean isEmpty()Is this empty -
keySet
-
keysRanked
List all types (sorted by count) -
keysSorted
List all types (alphabetically sorted) -
max
public long max()Maximum count -
min
public long min()Minimum count -
percent
Percentage by type -
ranks
A map: key -> rank(counts) -
remove
Remove this entry type -
setScore
-
sum
public long sum()Sum all counts. -
toString
-
toString
-
toString
-
toStringLine
-
toStringSort
-
toStringTop
-