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

public class RsId extends Object
Immutable value Class representing an NCBI dbSNP reference SNP rsID.
Author:
Jules Jacobsen
  • Method Summary

    Modifier and Type
    Method
    Description
    static RsId
    Returns an instance of an empty value.
    boolean
     
    int
     
    int
     
    boolean
     
    static RsId
    of(int id)
    Returns new RsId from the integer provided.
    static RsId
    of(String id)
    Parses rs ids from their VCF representation - can be in the form "rs123456", "123456" or "." for an empty value.
    Returns an rsID formatted string - 'rs123456' or '.' for an empty value.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • of

      public static RsId of(int id)
      Returns new RsId from the integer provided. Integers less than or equal to zero will return an instance representing an empty value.
      Parameters:
      id -
      Returns:
      the rsId value represented by the argument provided.
    • of

      public static RsId of(String id)
      Parses rs ids from their VCF representation - can be in the form "rs123456", "123456" or "." for an empty value. Will accept a null as representing an empty value.
      Parameters:
      id - a String containing the int representation to be parsed
      Returns:
      the rsId value represented by the argument provided.
    • empty

      public static RsId empty()
      Returns an instance of an empty value. This is represented as '.' in VCF notation.
      Returns:
      an empty rsId value.
    • getId

      public int getId()
    • isEmpty

      public boolean isEmpty()
    • hashCode

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

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

      public String toString()
      Returns an rsID formatted string - 'rs123456' or '.' for an empty value.
      Overrides:
      toString in class Object