24 #ifndef _VDJ_ALIGNMENT_BUILDER_H_ 25 #define _VDJ_ALIGNMENT_BUILDER_H_ 29 #include "vdj_alignment.h" 43 _n_Dalign.push_back(0);
53 segments_storage_t segments;
54 segments[0] = _segments[0];
55 segments[1] = _segments[1];
56 segments[2] = _segments[2];
58 n_D_alignments_storage_t nDs = _n_Dalign;
59 for (
size_t i = 1; i < nDs.size(); ++i) {
88 _Valign.
addAlignment(vseg, vstart, seqstart, alignment_len);
93 VDJAlignmentBuilder& addJoiAlignment(seg_index_t jseg, seq_len_t jstart, seq_len_t seqstart, seq_len_t alignment_len) {
95 _Jalign.
addAlignment(jseg, jstart, seqstart, alignment_len);
99 VDJAlignmentBuilder& addDivAlignment(seg_index_t dseg, seq_len_t dstart, seq_len_t seqstart, seq_len_t alignment_len) {
100 if (_Dseg.size() == 0 || dseg != _Dseg[_Dseg.size() - 1]) {
101 _n_Dalign.push_back(0);
102 _Dseg.push_back(dseg);
106 ++_n_Dalign[_n_Dalign.size() - 1];
108 _Dalign.
addAlignment(dseg, dstart, seqstart, alignment_len);
124 _segments[0] += vec.size();
130 _segments[1] += vec.size();
135 _n_Dalign.push_back(vec.size());
146 inline VDJAlignmentBuilder& addAlignment(GeneSegments gene, seg_index_t seg_index, seq_len_t genestart, seq_len_t seqstart, seq_len_t alignment_len) {
149 return this->
addVarAlignment(seg_index, genestart, seqstart, alignment_len);
151 return this->addJoiAlignment(seg_index, genestart, seqstart, alignment_len);
153 return this->addDivAlignment(seg_index, genestart, seqstart, alignment_len);
162 std::vector<seg_index_t> _n_Dalign, _Dseg;
VDJAlignmentBuilder & addVarAlignment(seg_index_t vseg, seq_len_t vstart, seq_len_t seqstart, seq_len_t alignment_len)
Add singular alignments to the builder.
Definition: vdj_alignment_builder.h:86
Definition: nogap_alignment_vector.h:37
void addAlignment(seg_index_t id, seq_len_t p_start, seq_len_t t_start, seq_len_t size)
Add a new alignment to the vector.
Definition: nogap_alignment_vector.h:55
VDJAlignment()
Definition: vdj_alignment.h:226
Definition: vdj_alignment_builder.h:35
Definition: vdj_alignment.h:36
VDJAlignmentBuilder()
Move constructor for _segments, _alignments and _n_D_alignments.
Definition: vdj_alignment_builder.h:40