@Immutable public final class Segment extends Gfa1Record
| Constructor and Description |
|---|
Segment(String id,
String sequence,
Map<String,Tag> tags)
Create a new segment GFA 1.0 record.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFc()
Return true if the tags for this segment contain
the reserved key
FC. |
boolean |
containsFragmentCount()
Return true if the tags for this segment contain
the reserved key
FC, for fragment count. |
boolean |
containsKc()
Return true if the tags for this segment contain
the reserved key
KC. |
boolean |
containsKmerCount()
Return true if the tags for this segment contain
the reserved key
KC, for k-mer count. |
boolean |
containsLength()
Return true if the tags for this segment contain
the reserved key
LN, for length. |
boolean |
containsLn()
Return true if the tags for this segment contain
the reserved key
LN. |
boolean |
containsRc()
Return true if the tags for this segment contain
the reserved key
RC. |
boolean |
containsReadCount()
Return true if the tags for this segment contain
the reserved key
RC, for read count. |
boolean |
containsSequenceChecksum()
Return true if the tags for this segment contain
the reserved key
SH, for SHA-256 checksum of the
sequence. |
boolean |
containsSequenceUri()
Return true if the tags for this segment contain
the reserved key
UR. |
boolean |
containsSh()
Return true if the tags for this segment contain
the reserved key
SH. |
boolean |
containsUr()
Return true if the tags for this segment contain
the reserved key
UR. |
boolean |
equals(Object o) |
int |
getFc()
Return the Type=i value for the reserved key
FC
as an integer. |
Optional<Integer> |
getFcOpt()
Return an optional Type=i value for the reserved key
FC
as an integer. |
int |
getFragmentCount()
Return true if the tags for this segment contain
the reserved key
FC, for fragment count. |
Optional<Integer> |
getFragmentCountOpt()
Return an optional wrapping the fragment count for this segment
(Type=i value for the reserved key
FC as an integer). |
String |
getId()
Return the identifier for this segment.
|
int |
getKc()
Return the Type=i value for the reserved key
KC
as an integer. |
Optional<Integer> |
getKcOpt()
Return an optional Type=i value for the reserved key
KC
as an integer. |
int |
getKmerCount()
Return the k-mer count for this segment (Type=i value for
the reserved key
KC as an integer). |
Optional<Integer> |
getKmerCountOpt()
Return an optional wrapping the k-mer count for this segment
(Type=i value for the reserved key
KC as an integer). |
int |
getLength()
Return the length of this segment (Type=i value for
the reserved key
LN as an integer). |
Optional<Integer> |
getLengthOpt()
Return an optional wrapping the length of this segment
(Type=i value for the reserved key
LN as an integer). |
int |
getLn()
Return the Type=i value for the reserved key
LN
as an integer. |
Optional<Integer> |
getLnOpt()
Return an optional Type=i value for the reserved key
LN
as an integer. |
int |
getRc()
Return the Type=i value for the reserved key
RC
as an integer. |
Optional<Integer> |
getRcOpt()
Return an optional Type=i value for the reserved key
RC
as an integer. |
int |
getReadCount()
Return the read count for this segment (Type=i value for
the reserved key
RC as an integer). |
Optional<Integer> |
getReadCountOpt()
Return an optional wrapping the read count for this segment
(Type=i value for the reserved key
RC as an integer). |
String |
getSequence()
Return the sequence for this segment, if any.
|
byte[] |
getSequenceChecksum()
Return the SHA-256 checksum of the sequence for this segment
(Type=H value for the reserved key
SH as a byte array). |
Optional<byte[]> |
getSequenceChecksumOpt()
Return an optional wrapping the SHA-256 checksum of the sequence
for this segment (Type=H value for the reserved key
SH
as a byte array). |
Optional<String> |
getSequenceOpt()
Return an optional wrapping the sequence for this segment.
|
String |
getSequenceUri()
Return the URI or local file-system path of the sequence for
this segment (Type=Z value for the reserved key
UR
as a string). |
Optional<String> |
getSequenceUriOpt()
Return an optional wrapping the URI or local file-system path of
the sequence for this segment (Type=Z value for the reserved key
UR as a string). |
byte[] |
getSh()
Return the Type=H value for the reserved key
SH
as a byte array. |
Optional<byte[]> |
getShOpt()
Return an optional Type=H value for the reserved key
SH
as a byte array. |
String |
getUr()
Return the Type=Z value for the reserved key
UR
as a string. |
Optional<String> |
getUrOpt()
Return an optional Type=Z value for the reserved key
UR
as a string. |
int |
hashCode() |
boolean |
hasSequence()
Return true if this segment has a sequence.
|
String |
toString() |
static Segment |
valueOf(String value)
Parse a segment GFA 1.0 record from the specified value.
|
containsTagKey, getTagByteArray, getTagByteArrayOpt, getTagBytes, getTagBytesOpt, getTagCharacter, getTagCharacterOpt, getTagFloat, getTagFloatOpt, getTagFloats, getTagFloatsOpt, getTagInteger, getTagIntegerOpt, getTagIntegers, getTagIntegersOpt, getTags, getTagString, getTagStringOptpublic String getId()
public boolean hasSequence()
public String getSequence()
public Optional<String> getSequenceOpt()
public boolean containsLn()
LN.LNpublic int getLn()
LN
as an integer.LN
as an integerpublic Optional<Integer> getLnOpt()
LN
as an integer.LN
as an integerpublic boolean containsLength()
LN, for length.LN, for lengthpublic int getLength()
LN as an integer).LN as an integer)public Optional<Integer> getLengthOpt()
LN as an integer).LN as an integer)public boolean containsRc()
RC.RCpublic int getRc()
RC
as an integer.RC
as an integerpublic Optional<Integer> getRcOpt()
RC
as an integer.RC
as an integerpublic boolean containsReadCount()
RC, for read count.RC, for read countpublic int getReadCount()
RC as an integer).RC as an integer)public Optional<Integer> getReadCountOpt()
RC as an integer).RC as an integer)public boolean containsFc()
FC.FCpublic int getFc()
FC
as an integer.FC
as an integerpublic Optional<Integer> getFcOpt()
FC
as an integer.FC
as an integerpublic boolean containsFragmentCount()
FC, for fragment count.FC, for fragment countpublic int getFragmentCount()
FC, for fragment count.FC, for fragment countpublic Optional<Integer> getFragmentCountOpt()
FC as an integer).FC as an integer)public boolean containsKc()
KC.KCpublic int getKc()
KC
as an integer.KC
as an integerpublic Optional<Integer> getKcOpt()
KC
as an integer.KC
as an integerpublic boolean containsKmerCount()
KC, for k-mer count.KC, for k-mer countpublic int getKmerCount()
KC as an integer).KC as an integer)public Optional<Integer> getKmerCountOpt()
KC as an integer).KC as an integer)public boolean containsSh()
SH.SHpublic byte[] getSh()
SH
as a byte array.SH
as a byte arraypublic Optional<byte[]> getShOpt()
SH
as a byte array.SH
as a byte arraypublic boolean containsSequenceChecksum()
SH, for SHA-256 checksum of the
sequence.SH, for SHA-256 checksum of the
sequencepublic byte[] getSequenceChecksum()
SH as a byte array).SH as a byte array)public Optional<byte[]> getSequenceChecksumOpt()
SH
as a byte array).SH
as a byte array)public boolean containsUr()
UR.URpublic String getUr()
UR
as a string.UR
as a stringpublic Optional<String> getUrOpt()
UR
as a string.UR
as a stringpublic boolean containsSequenceUri()
UR.URpublic String getSequenceUri()
UR
as a string). If it does not start with a standard protocol
(e.g. ftp), it is assumed to be a local path.UR
as a string)public Optional<String> getSequenceUriOpt()
UR as a string). If it does not start with a standard
protocol (e.g. ftp), it is assumed to be a local path.UR as a string)Copyright © 2013–2020 dishevelled.org. All rights reserved.