Enum LeontisWesthof

  • All Implemented Interfaces:
    Serializable, Comparable<LeontisWesthof>

    public enum LeontisWesthof
    extends Enum<LeontisWesthof>
    A classification of RNA base pairs described in: Geometric Nomenclature and Classification of RNA Base Pairs. N.B. Leontis, E. Westhof. RNA. 2001. 7(4):499–512. doi:10.1017/S1355838201002515
    • Method Detail

      • values

        public static LeontisWesthof[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LeontisWesthof c : LeontisWesthof.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LeontisWesthof valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • fromNumber

        public static LeontisWesthof fromNumber​(int number)
        Matches a number in range 1-12 to one of the constants. This is useful to parse mmCIF format, which contains hbond_12 field.
        Parameters:
        number - A value between 1-12.
        Returns:
        Enum value represented by the ordinal value.
      • fromString

        public static LeontisWesthof fromString​(CharSequence input)
        Finds a constant that matches a given name in case-insensitive manner or return UNKNOWN otherwise. For example, cww is the same as cWW.
        Parameters:
        input - A string representing LW notation.
        Returns:
        An instance of this class that matches the given name or UNKNONW if none does.
      • toNumber

        public int toNumber()
        Generates a value in range 1-12 (or Integer.MAX_VALUE) which corresponds to this instance. The value is consistent with mmCIF format and its hbond_12 field.
        Returns:
        A value between 1-12 or Integer.MAX_VALUE for unknown LW.
      • shortName

        public String shortName()
        Generates a three letter representation. "c" for cis, "t" for trans. Next, "W" for Watson-Crick, "H" for Hoogsteen and "S" for sugar. This method returns "n/a" for UNKNOWN.
        Returns:
        A three letter representation.
      • fullName

        public String fullName()
        Generates a full name representation. It consists of words "cis" or "trans", then "Watson-Crick", "Hoogsteen" or "Sugar". This method returns "n/a" for UNKNOWN.
        Returns:
        A long representation.
      • invert

        public LeontisWesthof invert()
        Inverts the base edges e.g. cHS becomes cSH. Stericity (i.e. cis or trans) stays as it was.
        Returns:
        An enum value.
      • stericity

        public Stericity stericity()
        Returns:
        Stericity i.e. cis, trans or unknown.
      • edge5

        public NucleobaseEdge edge5()
        Returns:
        Edge of the 5' partner i.e. Watson-Crick, Hoogsteen, sugar or unknown.
      • edge3

        public NucleobaseEdge edge3()
        Returns:
        Edge of the 3' partner i.e. Watson-Crick, Hoogsteen, sugar or unknown.