1 #ifndef gamgee__sam_builder__guard
2 #define gamgee__sam_builder__guard
61 explicit SamBuilder(
const Sam& starting_read,
const bool validate_on_build =
true);
62 explicit SamBuilder(
const SamHeader& header,
const Sam& starting_read,
const bool validate_on_build =
true);
127 bool m_validate_on_build;
129 void validate()
const;
130 void build_data_array(
bam1_t*
sam)
const;
Sam one_time_build()
build a Sam more efficiently by moving the builder's data out of it and invalidating future builds ...
Definition: sam_builder.cpp:283
void set_first()
Definition: sam.h:303
void set_not_paired()
Definition: sam.h:294
class to hold encoded byte arrays for individual data fields (cigar, bases, etc.) during building of ...
Definition: sam_builder_data_field.h:19
SamBuilder & set_chromosome(const uint32_t chr)
simple setter for the chromosome index. Index is 0-based.
Definition: sam_builder.h:90
void set_not_first()
Definition: sam.h:304
void set_duplicate()
Definition: sam.h:311
SamBuilder & set_last()
Definition: sam_builder.h:106
SamBuilder & set_unmapped()
Definition: sam_builder.h:96
Sam build() const
build a Sam (can be called repeatedly)
Definition: sam_builder.cpp:256
class to build Sam objects from existing data or from scratch
Definition: sam_builder.h:58
SamBuilder & set_not_last()
Definition: sam_builder.h:107
SamBuilder & set_first()
Definition: sam_builder.h:104
void set_reverse()
Definition: sam.h:299
void set_not_last()
Definition: sam.h:306
SamBuilder & set_not_unmapped()
Definition: sam_builder.h:97
SamBuilder & set_paired()
Definition: sam_builder.h:94
SamBuilder & set_not_reverse()
Definition: sam_builder.h:101
void set_not_duplicate()
Definition: sam.h:312
SamBuilder & set_cigar(const Cigar &new_cigar)
set the read's cigar to the cigar of an existing read
Definition: sam_builder.cpp:76
SamBuilder & set_secondary()
Definition: sam_builder.h:108
SamBuilder & set_not_supplementary()
Definition: sam_builder.h:115
void set_fail()
Definition: sam.h:309
Utility class to handle the memory management of the sam record object for a read base qualities...
Definition: base_quals.h:13
SamBuilder & set_mate_chromosome(const uint32_t mchr)
simple setter for the mate's chromosome index. Index is 0-based.
Definition: sam_builder.h:92
SamBuilder & set_not_duplicate()
Definition: sam_builder.h:113
void set_mate_alignment_start(const uint32_t mstart)
simple setter for the mate's alignment start.
Definition: sam.h:262
SamBuilder & set_name(const std::string &new_name)
set the read's QNAME to the specified value
Definition: sam_builder.cpp:66
SamBuilder & set_not_first()
Definition: sam_builder.h:105
SamBuilder & set_fail()
Definition: sam_builder.h:110
SamBuilder & operator=(SamBuilder &&other)=default
void set_mate_unmapped()
Definition: sam.h:297
SamBuilder & set_supplementary()
Definition: sam_builder.h:114
SamBuilder(const SamHeader &header, const bool validate_on_build=true)
create a Sam from scratch, starting only with a header
Definition: sam_builder.cpp:21
SamBuilder & set_base_quals(const BaseQuals &new_base_quals)
set the read's base qualities to the base qualities of an existing read
Definition: sam_builder.cpp:200
SamBuilder & set_not_mate_unmapped()
Definition: sam_builder.h:99
void set_not_secondary()
Definition: sam.h:308
Definition: exceptions.h:9
void set_mate_reverse()
Definition: sam.h:301
void set_mate_chromosome(const uint32_t mchr)
simple setter for the mate's chromosome index. Index is 0-based.
Definition: sam.h:261
SamBuilder & set_not_mate_reverse()
Definition: sam_builder.h:103
SamBuilder & set_alignment_start(const uint32_t start)
simple setter for the alignment start.
Definition: sam_builder.h:91
void set_not_unmapped()
Definition: sam.h:296
void set_alignment_start(const uint32_t start)
simple setter for the alignment start.
Definition: sam.h:260
void set_last()
Definition: sam.h:305
void set_supplementary()
Definition: sam.h:313
void set_not_reverse()
Definition: sam.h:300
SamBuilder & set_not_fail()
Definition: sam_builder.h:111
Utility class to manipulate a Sam record.
Definition: sam.h:20
SamBuilder & set_not_paired()
Definition: sam_builder.h:95
void set_not_supplementary()
Definition: sam.h:314
Utility class to handle the memory management of the sam record object for read bases.
Definition: read_bases.h:26
void set_paired()
Definition: sam.h:293
SamBuilder & set_reverse()
Definition: sam_builder.h:100
SamBuilder & set_duplicate()
Definition: sam_builder.h:112
void set_chromosome(const uint32_t chr)
simple setter for the chromosome index. Index is 0-based.
Definition: sam.h:259
SamBuilder & set_bases(const ReadBases &new_bases)
set the read's bases to the bases of an existing read
Definition: sam_builder.cpp:138
Utility class to manage the memory of the cigar structure.
Definition: cigar.h:24
SamBuilder & set_mate_alignment_start(const uint32_t mstart)
simple setter for the mate's alignment start.
Definition: sam_builder.h:93
void set_not_fail()
Definition: sam.h:310
void set_not_mate_reverse()
Definition: sam.h:302
SamBuilder & set_mate_unmapped()
Definition: sam_builder.h:98
SamBuilder & set_not_secondary()
Definition: sam_builder.h:109
void set_secondary()
Definition: sam.h:307
SamBuilder & set_mate_reverse()
Definition: sam_builder.h:102
void set_unmapped()
Definition: sam.h:295
void set_not_mate_unmapped()
Definition: sam.h:298