java.lang.Object
org.monarchinitiative.lirical.exomiser_db_adapter.model.frequency.FrequencyData

public class FrequencyData extends Object
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>
  • Method Details

    • empty

      public static FrequencyData empty()
    • of

      public static FrequencyData of(Collection<Frequency> frequencies)
    • of

      public static FrequencyData of(String rsId, Frequency frequency)
    • of

      public static FrequencyData of(String rsId, Frequency... frequency)
    • of

      public static FrequencyData of(Frequency... frequency)
    • of

      public static FrequencyData of(Frequency frequency)
    • of

      public static FrequencyData of(String rsId, Collection<Frequency> frequencies)
    • 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

      public boolean containsFrequencySource(FrequencySource frequencySource)
      Checks whether the instance contains a given FrequencySource.
      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

      @Nullable public Frequency frequency(FrequencySource source)
    • getRsId

      public String 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

      public float maxFreqForPopulation(Set<FrequencySource> frequencySources)
      Returns the highest frequency in percent for a given set of FrequencySource.
      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 this FrequencyData object contains a Frequency 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 the Frequency objects are tested
      Returns:
      true if the object contains a Frequency over the provided percentage frequency, otherwise returns false.
      Since:
      10.1.0
    • frequencies

      public List<Frequency> frequencies()
      Returns a list of Frequency 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

      @Nullable public Frequency 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public FrequencyData.Builder toBuilder()
      Returns:
      a new mutable FrequencyData.Builder object from the instance
      Since:
      14.0.0
    • builder

      public static FrequencyData.Builder builder()
      Returns:
      a new mutable FrequencyData.Builder object
      Since:
      14.0.0