ReadGroupInfo¶
#include <pbbam/ReadGroupInfo.h>
-
enum
PacBio::BAM::BaseFeature¶ This enum describes the base features that may be present in a read group’s records.
This information is stored in its description (@RG:DS).
Values:
-
DELETION_QV¶
-
DELETION_TAG¶
-
INSERTION_QV¶
-
MERGE_QV¶
-
SUBSTITUTION_QV¶
-
SUBSTITUTION_TAG¶
-
IPD¶
-
PULSE_WIDTH¶
-
PKMID¶
-
PKMEAN¶
-
PKMID2¶
-
PKMEAN2¶
-
LABEL¶
-
LABEL_QV¶
-
ALT_LABEL¶
-
ALT_LABEL_QV¶
-
PULSE_MERGE_QV¶
-
PULSE_CALL¶
-
PRE_PULSE_FRAMES¶
-
PULSE_CALL_WIDTH¶
-
START_FRAME¶
-
PULSE_EXCLUSION¶
-
-
enum
PacBio::BAM::FrameCodec¶ This enum describes the encoding types used for frame data within a read group’s records.
This information is stored in its description (@RG:DS).
Values:
-
RAW¶
-
V1¶
-
-
enum
PacBio::BAM::BarcodeModeType¶ This enum describes the experimental design of the barcodes within a read group’s records.
This information is stored in its description (@RG:DS).
Values:
-
NONE¶
-
SYMMETRIC¶
-
ASYMMETRIC¶
-
TAILED¶
-
-
enum
PacBio::BAM::BarcodeQualityType¶ This enum describes the type of value encoded by barcode quality, within a read group’s records.
This information is stored in its description (@RG:DS).
Values:
-
NONE
-
SCORE¶
-
PROBABILITY¶
-
-
class
PacBio::BAM::ReadGroupInfo¶ The ReadGroupInfo class represents a read group entry (@RG) in the SAM header.
Conversion & Validation
-
static ReadGroupInfo
FromSam(const std::string &sam)¶ Creates a ReadGroupInfo object from SAM-formatted text.
- Return
- read group info object
- Parameters
sam: SAM-formatted text
-
static std::string
ToSam(const ReadGroupInfo &rg)¶ Converts a ReadGroupInfo object to its SAM-formatted text.
- Return
- SAM-formatted text (no trailing newline)
- Parameters
rg: input ReadGroupInfo object
-
static int32_t
IdToInt(const std::string &rgId)¶ Converts a read group ID (string) to its numeric value.
- Return
- numeric value of ID
- Parameters
rgId: read group ID string
-
static std::string
IntToId(const int32_t id)¶ Converts a read group ID number to its string representation.
- Return
- hexadecimal string representation of ID
- Parameters
id: read group ID number
-
static std::string
SequencingChemistryFromTriple(const std::string &bindingKit, const std::string &sequencingKit, const std::string &basecallerVersion)¶ - Return
- sequencing chemistry from (bindingKig, sequencingKit, basecallerVersion)
-
bool
IsValid() const¶ Currently this checks to see that ReadGroupInfo::Id does not contain an empty string.
- Return
- true if read group 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
-
ReadGroupInfo()¶ Creates an empty read group info object.
-
ReadGroupInfo(std::string id)¶ Creates a read group info object with an ID.
- Parameters
id: string representation of read group ID
-
ReadGroupInfo(std::string movieName, std::string readType)¶ Creates a read group info object from a movie name & read type.
- See
- RecordType
- Parameters
movieName: sequencing movie namereadType: string version of record type
-
ReadGroupInfo(std::string movieName, std::string readType, const PlatformModelType platform)¶ Creates a read group info object from a movie name, read type, and platform model.
- See
- RecordType
- Parameters
movieName: sequencing movie namereadType: string version of record typeplatform: platform model type
-
ReadGroupInfo(const ReadGroupInfo&)¶
-
ReadGroupInfo(ReadGroupInfo&&)¶
-
ReadGroupInfo &
operator=(const ReadGroupInfo&)¶
-
ReadGroupInfo &
operator=(ReadGroupInfo&&)¶
-
~ReadGroupInfo()¶
Comparison Operators
-
bool
operator==(const ReadGroupInfo &other) const¶
Attributes
-
size_t
BarcodeCount() const¶ - Return
- the number of barcode sequences in BarcodeFile
- Exceptions
std::runtime_error: if barcode data not set. Check HasBarcodeData if this data may be absent.
-
std::string
BarcodeFile() const¶ - Return
- name of FASTA file containing barcode sequences
- Exceptions
std::runtime_error: if barcode data not set. Check HasBarcodeData if this data may be absent.
-
std::string
BarcodeHash() const¶ - Return
- MD5 hash of the contents of BarcodeFile
- Exceptions
std::runtime_error: if barcode data not set. Check HasBarcodeData if this data may be absent.
-
BarcodeModeType
BarcodeMode() const¶ - Return
- experimental design type of barcodes
- Exceptions
std::runtime_error: if barcode data not set. Check HasBarcodeData if this data may be absent.
-
BarcodeQualityType
BarcodeQuality() const¶ - Return
- type of value encoded in the ‘bq’ tag
- Exceptions
std::runtime_error: if barcode data is not set. Check HasBarcodeData if this data may be absent.
-
std::string
BasecallerVersion() const¶ - Return
- basecaller version number (e.g. “2.1”)
-
std::string
BaseFeatureTag(const BaseFeature &feature) const¶ - Return
- tag name in use for the specified for base feature
-
std::string
BindingKit() const¶ - Return
- binding kit part number (e.g. “100236500”)
-
bool
Control() const¶ - Return
- true if reads are classified as spike-in controls
-
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
Date() const¶ - Return
- string value of @RG:DT
-
std::string
FlowOrder() const¶ - Return
- string value of @RG:FO
-
std::string
FrameRateHz() const¶ - Return
- frame rate in Hz
-
bool
HasBarcodeData() const¶ - Return
- true if read group has barcode data
-
bool
HasBaseFeature(const BaseFeature &feature) const¶ - Return
- true if read group has an entry for the specified base feature
-
std::string
Id() const¶ - Return
- string value of @RG:ID
-
FrameCodec
IpdCodec() const¶ - Return
- codec type in use for IPD
-
std::string
KeySequence() const¶ - Return
- string value of @RG:KS
-
std::string
Library() const¶ - Return
- string value of @RG:LB
-
std::string
MovieName() const¶ - Return
- movie name (stored in @RG:PU)
-
std::string
Platform() const¶ - Return
- string value of @RG:PL
-
PlatformModelType
PlatformModel() const¶ - Return
- string value of @RG:PM
-
std::string
PredictedInsertSize() const¶ - Return
- string value of @RG:PI
-
std::string
Programs() const¶ - Return
- string value of @RG:PG
-
FrameCodec
PulseWidthCodec() const¶ - Return
- codec type in use for PulseWidth
-
std::string
ReadType() const¶ - Return
- string value of read type
-
std::string
Sample() const¶ - Return
- string value of @RG:SM
-
std::string
SequencingCenter() const¶ - Return
- string value of @RG:CN
-
std::string
SequencingChemistry() const¶ - Return
- sequencing chemistry name
-
std::string
SequencingKit() const¶ - Return
- sequencing kit part number
-
ReadGroupInfo &
BarcodeData(const std::string &barcodeFile, const std::string &barcodeHash, size_t barcodeCount, BarcodeModeType barcodeMode, BarcodeQualityType barcodeQuality)¶ Sets read group’s barcode data.
Barcode fields are either absent or all must be present.
- See
- BarcodeFile BarcodeHash BarcodeCount BarcodeMode BarcodeQuality ReadGroupInfo::ClearBarcodeData
- Return
- reference to this object
- Parameters
barcodeFile: barcode filenamebarcodeHash: MD5 hash of barcode filebarcodeCount: number of records in barcode filebarcodeMode: experimental design of barcodesbarcodeQuality: type of barcode quality value
-
ReadGroupInfo &
BasecallerVersion(const std::string &versionNumber)¶ Sets the basecaller version number.
- Return
- reference to this object
- Parameters
versionNumber: new value
-
ReadGroupInfo &
BaseFeatureTag(const BaseFeature &feature, const std::string &tag)¶ Sets the tag to be used for a particular base feature.
- Return
- reference to this object
- Parameters
feature: feature type begin updatedtag: new value
-
ReadGroupInfo &
BindingKit(const std::string &kitNumber)¶ Sets the binding kit part number.
- Return
- reference to this object
- Parameters
kitNumber: new value
-
ReadGroupInfo &
ClearBarcodeData()¶ Removes all barcode data from this read group.
- Return
- reference to this read group
-
ReadGroupInfo &
ClearBaseFeatures()¶ Removes all base features from this read group.
- Return
- reference to this read group
-
ReadGroupInfo &
Control(const bool ctrl)¶ Sets whether read group’s records are classifed as spike-in controls.
- Return
- reference to this object
- Parameters
ctrl: true if records are spike-in controls
-
ReadGroupInfo &
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
-
ReadGroupInfo &
Date(const std::string &date)¶ Sets the value for @RG:DT.
- Return
- reference to this object
- Parameters
date: new value
-
ReadGroupInfo &
FlowOrder(const std::string &order)¶ Sets the value for @RG:FO.
- Return
- reference to this object
- Parameters
order: new value
-
ReadGroupInfo &
FrameRateHz(const std::string &frameRateHz)¶ Sets the frame rate.
- Return
- reference to this object
- Parameters
frameRateHz: string value of frame rate in Hz
-
ReadGroupInfo &
Id(const std::string &id)¶ Sets the read group’s ID.
- Return
- reference to this object
- Parameters
id: string value of ID
-
ReadGroupInfo &
Id(const std::string &movieName, const std::string &readType)¶ Sets the read group’s ID, from movie name & read type.
- Return
- reference to this object
- Parameters
movieName: sequencing movie namereadType: string version of read type
-
ReadGroupInfo &
IpdCodec(const FrameCodec &codec, const std::string &tag = std::string())¶ Sets the codec type used for IPD.
- Return
- reference to this object
- Parameters
codec: codec typetag: IPD tag
-
ReadGroupInfo &
KeySequence(const std::string &sequence)¶ Sets the value for @RG:KS.
- Return
- reference to this object
- Parameters
sequence: new value
-
ReadGroupInfo &
Library(const std::string &library)¶ Sets the value for @RG:LB.
- Return
- reference to this object
- Parameters
library: new value
-
ReadGroupInfo &
MovieName(const std::string &movieName)¶ Sets the value for movie name (stored in @RG:PU).
- Return
- reference to this object
- Parameters
movieName: new value
-
ReadGroupInfo &
PredictedInsertSize(const std::string &size)¶ Sets the value for @RG:PI.
- Return
- reference to this object
- Parameters
size: new value
-
ReadGroupInfo &
Programs(const std::string &programs)¶ Sets the value for @RG:PG.
- Return
- reference to this object
- Parameters
programs: new value
-
ReadGroupInfo &
PlatformModel(const PlatformModelType &platform)¶ Sets the value for @RG:PM.
- Return
- reference to this object
- Parameters
platformModel: new value
-
ReadGroupInfo &
PulseWidthCodec(const FrameCodec &codec, const std::string &tag = std::string())¶ Sets the codec type used for PulseWidth.
- Return
- reference to this object
- Parameters
codec: codec typetag: pulse width tag
-
ReadGroupInfo &
ReadType(const std::string &type)¶ Sets the read type.
- Return
- reference to this object
- Parameters
type: new value
-
ReadGroupInfo &
RemoveBaseFeature(const BaseFeature &feature)¶ Removes a particular base feature from this read group.
- Return
- reference to this object
- Parameters
feature: feature to remove
-
ReadGroupInfo &
Sample(const std::string &sample)¶ Sets the value for @RG:SM.
- Return
- reference to this object
- Parameters
sample: new value
-
ReadGroupInfo &
SequencingCenter(const std::string ¢er)¶ Sets the value for @RG:CN.
- Return
- reference to this object
- Parameters
center: new value
-
ReadGroupInfo &
SequencingKit(const std::string &kitNumber)¶ Sets the sequencing kit part number.
- Return
- reference to this object
- Parameters
kitNumber: new value
-
static ReadGroupInfo
-
PBBAM_EXPORT std::string PacBio::BAM::MakeReadGroupId(const std::string & movieName, const std::string & readType) Creates a read group ID from a movie name & read type.
- Return
- hexadecimal string read group ID
- Parameters
movieName: sequencing movie namereadType: string version of read type