Class FrequencyData
java.lang.Object
org.monarchinitiative.lirical.exomiser_db_adapter.model.frequency.FrequencyData
Frequency data for the variant from the Thousand Genomes, the Exome Server
Project and Broad ExAC datasets.
Note that the frequency data are expressed as percentages.
- Author:
- Jules Jacobsen <jules.jacobsen@sanger.ac.uk>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FrequencyData.Builder
builder()
boolean
containsFrequencySource
(FrequencySource frequencySource) Checks whether the instance contains a givenFrequencySource
.static FrequencyData
empty()
boolean
Returns a list ofFrequency
objects.frequency
(FrequencySource source) float
getRsId()
boolean
boolean
boolean
boolean
boolean
hasFrequencyOverPercentageValue
(float maxFreq) This function tests if thisFrequencyData
object contains aFrequency
object which has a frequency greater than the maximum frequency provided.boolean
int
hashCode()
boolean
boolean
isEmpty()
Checks if there are any frequencies present.boolean
float
maxFreq()
Returns the maximum frequency - if there are no known frequencies/ no frequency data it will return 0.float
maxFreqForPopulation
(Set<FrequencySource> frequencySources) Returns the highest frequency in percent for a given set ofFrequencySource
.static FrequencyData
of
(String rsId, Collection<Frequency> frequencies) static FrequencyData
static FrequencyData
static FrequencyData
of
(Collection<Frequency> frequencies) static FrequencyData
static FrequencyData
int
size()
toString()
-
Method Details
-
empty
-
of
-
of
-
of
-
of
-
of
-
of
-
size
public int size()- Returns:
- the count of the frequencies
- Since:
- 13.3.0
-
isEmpty
public boolean isEmpty()Checks if there are any frequencies present. It is possible that there may be an rsID where there are no frequencies. For example, rare variants seen only in ClinVar.- Returns:
- true if the count of the frequencies is zero
- Since:
- 13.3.0
-
containsFrequencySource
Checks whether the instance contains a givenFrequencySource
.- Parameters:
frequencySource
- The frequency source to check for membership in the instance.- Returns:
- true if the instance contains the given
FrequencySource
- Since:
- 13.3.0
-
frequency
-
getRsId
-
isRepresentedInDatabase
public boolean isRepresentedInDatabase()- Returns:
- true if this variant is at all represented in dbSNP or ESP data, regardless of frequency. That is, if the variant has an RS id in dbSNP or any frequency data at all, return true, otherwise false.
-
hasDbSnpData
public boolean hasDbSnpData() -
hasDbSnpRsID
public boolean hasDbSnpRsID() -
hasEspData
public boolean hasEspData() -
hasExacData
public boolean hasExacData() -
hasGnomadData
public boolean hasGnomadData() -
maxFreqForPopulation
Returns the highest frequency in percent for a given set ofFrequencySource
.- Parameters:
frequencySources
- to find the highest frequency for- Returns:
- the population frequency as a percentage frequency i.e. 0.001 == 0.1%
- Since:
- 13.3.3
-
hasKnownFrequency
public boolean hasKnownFrequency() -
hasFrequencyOverPercentageValue
public boolean hasFrequencyOverPercentageValue(float maxFreq) This function tests if thisFrequencyData
object contains aFrequency
object which has a frequency greater than the maximum frequency provided. This method does not check any ranges, so it is advised that the user checks the frequency type in advance of calling this method. By default, exomiser expresses the frequencies as a percentage frequency.- Parameters:
maxFreq
- the maximum frequency threshold against which theFrequency
objects are tested- Returns:
- true if the object contains a
Frequency
over the provided percentage frequency, otherwise returns false. - Since:
- 10.1.0
-
frequencies
Returns a list ofFrequency
objects. If there is no known frequency data then an empty list will be returned. This method will return an immutable copy of the underlying data.- Returns:
- an immutable copy of the
Frequency
data
-
maxFreq
public float maxFreq()Returns the maximum frequency - if there are no known frequencies/ no frequency data it will return 0.- Returns:
-
maxFrequency
- Returns:
- The maximum
Frequency
or null - Since:
- 13.1.0
-
frequencyScore
public float frequencyScore()- Returns:
- returns a numerical frequency that is closer to one, the rarer the variant is. If a variant is not entered in any of the data sources, it returns one (highest score). Otherwise, it identifies the maximum MAF in any of the databases, and returns a score that depends on the MAF. Note that the frequency is expressed as a percentage.
-
equals
-
hashCode
public int hashCode() -
toString
-
toBuilder
- Returns:
- a new mutable
FrequencyData.Builder
object from the instance - Since:
- 14.0.0
-
builder
- Returns:
- a new mutable
FrequencyData.Builder
object - Since:
- 14.0.0
-