24 #ifndef _VDJ_ALIGNMENT_H_ 25 #define _VDJ_ALIGNMENT_H_ 30 #include "nogap_alignment_vector.h" 39 typedef std::array<seg_index_t, 3> segments_storage_t;
42 typedef std::vector<seg_index_t> n_D_alignments_storage_t;
47 const n_D_alignments_storage_t &n_D_alignments)
48 : _segments(segments),
84 return _segments == other._segments
90 return _segments != other._segments
99 seg_index_t
nVar()
const {
return _segments[0]; }
102 seg_index_t nJoi()
const {
return _segments[1]; }
104 seg_index_t nDiv()
const {
return _segments[2]; }
114 seg_index_t getJoi(
size_t index)
const {
return _alignments.id(_segments[0] + index); }
128 seq_len_t getVarGeneEnd(seg_index_t vgene)
const {
132 seq_len_t getVarSeqStart(seg_index_t vgene)
const {
136 seq_len_t getVarSeqEnd(seg_index_t vgene)
const {
140 seq_len_t getVarLen(seg_index_t vgene)
const {
144 bool isVarMismatch(seg_index_t vgene, seq_len_t pos)
const {
149 seq_len_t getJoiGeneStart(seg_index_t jgene)
const {
150 return _alignments.pattern_start(_segments[0] + jgene);
153 seq_len_t getJoiGeneEnd(seg_index_t jgene)
const {
157 seq_len_t getJoiSeqStart(seg_index_t jgene)
const {
158 return _alignments.text_start(_segments[0] + jgene);
161 seq_len_t getJoiSeqEnd(seg_index_t jgene)
const {
165 seq_len_t getJoiLen(seg_index_t jgene)
const {
169 bool isJoiMismatch(seg_index_t jgene, seq_len_t pos)
const {
170 return _alignments.isMismatch(_segments[0] + jgene, pos);
174 seq_len_t getDivGeneStart(seg_index_t dgene, seg_index_t align_i)
const {
178 seq_len_t getDivGeneEnd(seg_index_t dgene, seg_index_t align_i)
const {
183 seq_len_t getDivSeqStart(seg_index_t dgene, seg_index_t align_i)
const {
187 seq_len_t getDivSeqEnd(seg_index_t dgene, seg_index_t align_i)
const {
192 seq_len_t getDivLen(seg_index_t dgene, seg_index_t align_i)
const {
196 bool isDivMismatch(seg_index_t dgene, seg_index_t align_i, seq_len_t pos)
const {
200 error_num_t numDivMismatches(seg_index_t dgene, seg_index_t align_i, seq_len_t start, seq_len_t end)
const {
216 segments_storage_t _segments;
virtual ~VDJAlignment()
Move constructor for _segments, _alignments and _n_D_alignments.
Definition: vdj_alignment.h:78
Definition: nogap_alignment_vector.h:37
seq_len_t numDivAlignments(seg_index_t index) const
Get the number of D gene alignments for the given D gene.
Definition: vdj_alignment.h:209
NoGapAlignmentVector _alignments
vector of indices of segments, aligned on this clone: V1–V2–V3–J1–J2–D1–D2–...
Definition: vdj_alignment.h:219
VDJAlignment()
Definition: vdj_alignment.h:226
n_D_alignments_storage_t _n_D_alignments
Vector of alignments for segments.
Definition: vdj_alignment.h:221
seg_index_t nVar() const
Get the number of alignments for the specific gene.
Definition: vdj_alignment.h:100
seq_len_t getVarGeneStart(seg_index_t vgene) const
Get alignments for the specific gene.
Definition: vdj_alignment.h:124
seg_index_t getVar(size_t index) const
Get the index of the aligned gene segment for the specific gene.
Definition: vdj_alignment.h:112
Definition: vdj_alignment.h:36