Package htsjdk.samtools
Enum Class SamFlagField
- All Implemented Interfaces:
Serializable
,Comparable<SamFlagField>
,Constable
This determines how flag fields are represented in the SAM file.
In a string FLAG, each character represents one bit with
p=0x1 (paired), P=0x2 (properly paired), u=0x4 (unmapped),
U=0x8 (mate unmapped), r=0x10 (reverse), R=0x20 (mate reverse)
1=0x40 (first), 2=0x80 (second), s=0x100 (not primary),
x=0x200 (failure), d=0x400 (duplicate), and S=0x800 (secondary).
This was inspired by 'samtools view -X'.
We also output a character when the following bits *are not* set:
m=0x4 (mapped), M=0x8 (mate mapped), f=0x10 (forward), F=0x20
(mate forward).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
format
(int flag) Returns the string associated with this flag field.static SamFlagField
Returns the type of flag field for this string.final int
Parses the flag.static int
parseDefault
(String flag) Infers the format from the flag string and parses the flag.protected abstract int
parseWithoutValidation
(String flag) Performs the actual parsing based on the radix.static SamFlagField
Returns the enum constant of this class with the specified name.static SamFlagField[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
DECIMAL
-
HEXADECIMAL
-
OCTAL
-
STRING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
format
Returns the string associated with this flag field. -
parse
Parses the flag. Validates that the flag is of the correct type. -
parseDefault
Infers the format from the flag string and parses the flag. -
parseWithoutValidation
Performs the actual parsing based on the radix. No validation that the flag is of the correct radix should be performed. -
of
Returns the type of flag field for this string. This does not guarantee it is of the flag field, as it only checks the first two characters.
-