Package pl.poznan.put.notation
Enum LeontisWesthof
- java.lang.Object
-
- java.lang.Enum<LeontisWesthof>
-
- pl.poznan.put.notation.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NucleobaseEdgeedge3()NucleobaseEdgeedge5()static LeontisWesthoffromNumber(int number)Matches a number in range 1-12 to one of the constants.static LeontisWesthoffromString(CharSequence input)Finds a constant that matches a given name in case-insensitive manner or return UNKNOWN otherwise.StringfullName()Generates a full name representation.LeontisWesthofinvert()Inverts the base edges e.g. cHS becomes cSH.StringshortName()Generates a three letter representation.Stericitystericity()inttoNumber()Generates a value in range 1-12 (orInteger.MAX_VALUE) which corresponds to this instance.StringtoString()static LeontisWesthofvalueOf(String name)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 Detail
-
CWW
public static final LeontisWesthof CWW
-
CWH
public static final LeontisWesthof CWH
-
CWS
public static final LeontisWesthof CWS
-
CHW
public static final LeontisWesthof CHW
-
CHH
public static final LeontisWesthof CHH
-
CHS
public static final LeontisWesthof CHS
-
CSW
public static final LeontisWesthof CSW
-
CSH
public static final LeontisWesthof CSH
-
CSS
public static final LeontisWesthof CSS
-
TWW
public static final LeontisWesthof TWW
-
TWH
public static final LeontisWesthof TWH
-
TWS
public static final LeontisWesthof TWS
-
THW
public static final LeontisWesthof THW
-
THH
public static final LeontisWesthof THH
-
THS
public static final LeontisWesthof THS
-
TSW
public static final LeontisWesthof TSW
-
TSH
public static final LeontisWesthof TSH
-
TSS
public static final LeontisWesthof TSS
-
UNKNOWN
public static final LeontisWesthof UNKNOWN
-
-
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 nameNullPointerException- 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 containshbond_12field.- 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 (orInteger.MAX_VALUE) which corresponds to this instance. The value is consistent with mmCIF format and itshbond_12field.- Returns:
- A value between 1-12 or Integer.MAX_VALUE for unknown LW.
-
toString
public String toString()
- Overrides:
toStringin classEnum<LeontisWesthof>
-
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.
-
-