ExternalResource¶
#include <pbbam/DataSetTypes.h>
-
class
PacBio::BAM::
ExternalResource
¶ The ExternalResource class represents an ExternalResource element in DataSetXML.
An ExternalResource can itself have a child element, ExternalResources, that lists related files (e.g. index files).
Inherits from IndexedDataType
Public Functions
-
ExternalResource
(const BamFile &bamFile)¶ Creates an ExternalResource from a BamFile object.
The metatype & resourceId are automatically set.
-
ExternalResource
(const std::string &metatype, const std::string &filename)¶ Creates an ExternalResource with provided
metatype
andfilename
as resource ID.
-
const PacBio::BAM::ExternalResources &
ExternalResources
() const¶ Fetches the resource’s ExternalResources child element.
- Return
- const reference to child element
- Exceptions
std::runtime_error
: if element does not exist
-
PacBio::BAM::ExternalResources &
ExternalResources
()¶ Fetches the resource’s ExternalResources child element.
This element will be created if it does not yet exist.
- Return
- non-const reference to child element
-
ExternalResource &
ExternalResources
(const PacBio::BAM::ExternalResources &resources)¶ Sets this resource’s ExternalResources child element.
This element will be created if it does not yet exist.
- Return
- reference to this resource object
- Parameters
resources
: new value for the element
-
BamFile
ToBamFile
() const¶ Converts an ExternalResource to a BamFile object.
- Return
- corresponding BamFile object for this ExternalResource
- Exceptions
std::runtime_error
: if fails to open BAM file (e.g. does not exist, not a BAM file, etc.)
-