SequenceInfo¶
#include <pbbam/SequenceInfo.h>
-
class
PacBio::BAM::SequenceInfo¶ The SequenceInfo class represents a program entry (@SQ) in the SAM header.
Conversion & Validation
-
static SequenceInfo
FromSam(const std::string &sam)¶ Creates a SequenceInfo object from SAM-formatted text.
- Return
- program info object
- Parameters
sam: SAM-formatted text
-
static std::string
ToSam(const SequenceInfo &seq)¶ Converts a SequenceInfo object to its SAM-formatted text.
- Return
- SAM-formatted text (no trailing newline)
- Parameters
seq: input SequenceInfo object
-
bool
IsValid() const¶ Currently this checks to see that Name is non-empty and Length is within the accepted range.
- Return
- true if sequence info is valid
-
std::string
ToSam() const¶ Converts this object to its SAM-formatted text.
- Return
- SAM-formatted text (no trailing newline)
Constructors & Related Methods
-
SequenceInfo(std::string name, std::string length = "0")¶ Creates a sequence info object with name & (optional) length.
- Parameters
name: sequence name (@SQ:SN)length: sequence length (@SQ:LN)
-
SequenceInfo()¶
-
SequenceInfo(const SequenceInfo&)¶
-
SequenceInfo(SequenceInfo&&)¶
-
SequenceInfo &
operator=(const SequenceInfo&)¶
-
SequenceInfo &
operator=(SequenceInfo&&)¶
-
~SequenceInfo()¶
Operators
-
bool
operator==(const SequenceInfo &other) const¶
-
bool
operator!=(const SequenceInfo &other) const¶
Attributes
-
std::string
AssemblyId() const¶ - Return
- string value of @SQ:AS
-
std::string
Checksum() const¶ - Return
- string value of @SQ:M5
-
std::map<std::string, std::string>
CustomTags() const¶ Result map consists of {tagName => value}.
- Return
- any non-standard tags added to the @PG entry
-
std::string
Length() const¶ - Return
- string value of @SQ:LN
-
std::string
Name() const¶ - Return
- string value of @SQ:SN
-
std::string
Species() const¶ - Return
- string value of @SQ:SP
-
std::string
Uri() const¶ - Return
- string value of @SQ:UR
-
SequenceInfo &
AssemblyId(const std::string &id)¶ Sets the value for @SQ:AS.
- Return
- reference to this object
- Parameters
id: new value
-
SequenceInfo &
Checksum(const std::string &checksum)¶ Sets the value for @SQ:M5.
- Return
- reference to this object
- Parameters
checksum: new value
-
SequenceInfo &
CustomTags(const std::map<std::string, std::string> &custom)¶ Sets a new collection of non-standard tags.
Custom tag map entries should consist of {tagName => value}.
- Return
- reference to this object
- Parameters
custom: new tags
-
SequenceInfo &
Length(const std::string &length)¶ Sets the value for @SQ:LN.
- Return
- reference to this object
- Parameters
length: new value
-
SequenceInfo &
Name(const std::string &name)¶ Sets the value for @SQ:SN.
- Return
- reference to this object
- Parameters
name: new value
-
SequenceInfo &
Species(const std::string &species)¶ Sets the value for @SQ:SP.
- Return
- reference to this object
- Parameters
species: new value
-
SequenceInfo &
Uri(const std::string &uri)¶ Sets the value for @SQ:UR.
- Return
- reference to this object
- Parameters
uri: new value
-
static SequenceInfo