Skip to content

Commit

Permalink
fix overflow number of reference contig Illumina@0327981
Browse files Browse the repository at this point in the history
  • Loading branch information
gambalab committed Aug 14, 2024
1 parent b55468e commit 9b71c11
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/include/align/Alignment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ struct AlignmentHeader {
MapqType mapq_ = -1;
FlagType flags_ = -1;
int position_ = -1;
short reference_ = -1;
int reference_ = -1;
int nextPosition_ = -1;
short nextReference_ = -1;
int nextReference_ = -1;
int templateLength_ = -1;
int32_t mateCoordinate_ = -1;
bool smithWatermanDone_ = false;
Expand Down Expand Up @@ -88,12 +88,12 @@ struct AlignmentHeader {
bool isSupplementaryAlignment() const { return flags_ & SUPPLEMENTARY_ALIGNMENT; }
int getPosition() const { return position_; }
void setPosition(const int position) { position_ = position; }
short getReference() const { return reference_; }
void setReference(unsigned short reference) { reference_ = reference; }
int getReference() const { return reference_; }
void setReference(unsigned int reference) { reference_ = reference; }
int getNextPosition() const { return nextPosition_; }
void setNextPosition(const int nextPosition) { nextPosition_ = nextPosition; }
short getNextReference() const { return nextReference_; }
void setNextReference(unsigned short nextReference) { nextReference_ = nextReference; }
int getNextReference() const { return nextReference_; }
void setNextReference(unsigned int nextReference) { nextReference_ = nextReference; }
int getTemplateLength() const { return templateLength_; }
void setTemplateLength(const int templateLength) { templateLength_ = templateLength; }
int32_t getMateCoordinate() const { return mateCoordinate_; }
Expand Down Expand Up @@ -314,7 +314,7 @@ class Alignment : public AlignmentHeader {

struct SerializedSaTag {
struct Header {
short reference_ = 0;
int reference_ = 0;
int position_ = 0;
bool reverse_ = 0;
MapqType mapq_ = 0;
Expand All @@ -341,7 +341,7 @@ struct SerializedSaTag {

std::size_t getByteSize() const { return sizeof(*this) + cigar_.getByteSize() - sizeof(cigar_); }

short getReference() const { return header_.reference_; }
int getReference() const { return header_.reference_; }
int getPosition() const { return header_.position_; }
bool reverse() const { return header_.reverse_; }
MapqType getMapq() const { return header_.mapq_; }
Expand Down

0 comments on commit 9b71c11

Please sign in to comment.