//This is for real octants only, pseudo-boundary octants can not be tested //using this. bool DA::isBoundaryOctant(unsigned char *flags) { #ifdef __DEBUG_DA_PUBLIC__ assert(m_bIamActive); #endif unsigned char _flags = 0; Point pt = getCurrentOffset(); unsigned int x = pt.xint(); unsigned int y = pt.yint(); unsigned int z = pt.zint(); unsigned int d = getLevel(curr())-1; unsigned int maxD = getMaxDepth()-1; unsigned int len = (unsigned int)(1u<<(maxD - d) ); unsigned int blen = (unsigned int)(1u << maxD); if (!x) _flags |= ot::TreeNode::X_NEG_BDY; if (!y) _flags |= ot::TreeNode::Y_NEG_BDY; if (!z) _flags |= ot::TreeNode::Z_NEG_BDY; if ( (x+len) == blen ) _flags |= ot::TreeNode::X_POS_BDY; if ( (y+len) == blen ) _flags |= ot::TreeNode::Y_POS_BDY; if ( (z+len) == blen ) _flags |= ot::TreeNode::Z_POS_BDY; if(flags) { *flags = _flags; } return _flags; }//end function
pair<int, unsigned long> seekToBlockStart(int ref_id, int const start_coord, int const end_coord) { bool is_transcript_start = false; pair<int,unsigned long> p = offsets_in->loadOverlappingBlock(ref_id, start_coord, end_coord, is_transcript_start); auto block_start_coord = p.first; unsigned long block_num_align = p.second; if (block_start_coord < 0) { cerr << "[ERROR] Could not navigate to the begining of the interval" << endl; exit(1); } current_multiplier = 0; current_offset = block_start_coord; delta = 0; // is delta set correctly? if (is_transcript_start) { // consumes bytes describing the transcript ID int ref_id = getNextTranscript(); // cerr << "current transcript: " << ref_id << endl; } // if actual_start_coord >= start_coord -- we did not have any alignment before this // and should start with actual_start_coord // if actual_start_coord < start_coord -- should handle this case in Decompressor and // seek to the desired coordinate along w/ other data streams (clips, quals, edits, etc) p.first = getCurrentOffset(); return p; }