Package pl.poznan.put.notation
Enum LeontisWesthof
- All Implemented Interfaces:
Serializable
,Comparable<LeontisWesthof>
,java.lang.constant.Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionedge3()
edge5()
static LeontisWesthof
fromNumber
(int number) Matches a number in range 1-12 to one of the constants.static LeontisWesthof
fromString
(CharSequence input) Finds a constant that matches a given name in case-insensitive manner or return UNKNOWN otherwise.fullName()
Generates a full name representation.invert()
Inverts the base edges e.g. cHS becomes cSH.Generates a three letter representation.int
toNumber()
Generates a value in range 1-12 (orInteger.MAX_VALUE
) which corresponds to this instance.toString()
static LeontisWesthof
Returns the enum constant of this type with the specified name.static LeontisWesthof[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CWW
-
CWH
-
CWS
-
CHW
-
CHH
-
CHS
-
CSW
-
CSH
-
CSS
-
TWW
-
TWH
-
TWS
-
THW
-
THH
-
THS
-
TSW
-
TSH
-
TSS
-
UNKNOWN
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
fromNumber
Matches a number in range 1-12 to one of the constants. This is useful to parse mmCIF format, which containshbond_12
field.- Parameters:
number
- A value between 1-12.- Returns:
- Enum value represented by the ordinal value.
-
fromString
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 (orInteger.MAX_VALUE
) which corresponds to this instance. The value is consistent with mmCIF format and itshbond_12
field.- Returns:
- A value between 1-12 or Integer.MAX_VALUE for unknown LW.
-
toString
- Overrides:
toString
in classEnum<LeontisWesthof>
-
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
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
Inverts the base edges e.g. cHS becomes cSH. Stericity (i.e. cis or trans) stays as it was.- Returns:
- An enum value.
-
stericity
- Returns:
- Stericity i.e. cis, trans or unknown.
-
edge5
- Returns:
- Edge of the 5' partner i.e. Watson-Crick, Hoogsteen, sugar or unknown.
-
edge3
- Returns:
- Edge of the 3' partner i.e. Watson-Crick, Hoogsteen, sugar or unknown.
-