You are on page 1of 4

9/18/2019 SequenceInfo — pbbam 0.13.

2 documentation

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   v: latest 
name: sequence name (@SQ:SN)
Sponsored Thislength: sequence
ad 100% length
funds open (@SQ:LN)
source & doesn't track you. Learn more about ethical ads ads served ethically ×
https://pbbam.readthedocs.io/en/latest/api/SequenceInfo.html 1/4
9/18/2019 SequenceInfo — pbbam 0.13.2 documentation

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   v: latest 

std::string Uri() const


Sponsored This ad 100% funds open source & doesn't track you. Learn more about ethical ads ads served ethically ×
https://pbbam.readthedocs.io/en/latest/api/SequenceInfo.html 2/4
9/18/2019 SequenceInfo — pbbam 0.13.2 documentation

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)   v: latest 


Sets the value for @SQ:SP.
Sponsored This ad 100% funds open source & doesn't track you. Learn more about ethical ads ads served ethically ×
https://pbbam.readthedocs.io/en/latest/api/SequenceInfo.html 3/4
9/18/2019 SequenceInfo — pbbam 0.13.2 documentation

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

  v: latest 

Sponsored This ad 100% funds open source & doesn't track you. Learn more about ethical ads ads served ethically ×
https://pbbam.readthedocs.io/en/latest/api/SequenceInfo.html 4/4

You might also like