vg
tools for working with variation graphs
Macros | Enumerations
dozeu_interface.cpp File Reference
#include <cstdio>
#include <assert.h>
#include <utility>
#include "dozeu_interface.hpp"
#include <dozeu/dozeu.h>

Macros

#define DZ_FULL_LENGTH_BONUS
 
#define DZ_CIGAR_OP   0x04030201
 
#define _add_edit(_from_len, _to_len, _subseq)
 
#define _push_mapping(_id)
 
#define _push_op(_m, _op, _len)
 
#define _append_op(_m, _op, _init)
 
#define _flush_op(_m, _next_op)
 

Enumerations

enum  { MISMATCH = 1, MATCH = 2, INS = 3, DEL = 4 }
 

Macro Definition Documentation

◆ _add_edit

#define _add_edit (   _from_len,
  _to_len,
  _subseq 
)
Value:
{ \
Edit *e = mapping->add_edit(); \
e->set_from_length((_from_len)); \
e->set_to_length((_to_len)); \
/* expect a branch dependent on a compile-time NULL will be eliminated */ \
if((_subseq) != nullptr) { e->set_sequence((char const *)(_subseq), (size_t)(_to_len)); } \
}

◆ _append_op

#define _append_op (   _m,
  _op,
  _init 
)
Value:
{ \
if((state & 0xff) == (_op)) { state += 0x100; } \
else { _push_op(_m, state & 0xff, state>>8); state = (_op) | ((_init)<<8); } \
}

◆ _flush_op

#define _flush_op (   _m,
  _next_op 
)
Value:
{ \
_push_op(_m, state & 0xff, state>>8); state = (_next_op); \
}

◆ _push_mapping

#define _push_mapping (   _id)
Value:
({ \
handle_t n = graph.order[(_id)]; \
Mapping *mapping = path->add_mapping(); \
mapping->set_rank(path->mapping_size()); \
Position *position = mapping->mutable_position(); \
position->set_node_id(graph.graph.get_id(n)); \
position->set_is_reverse(graph.graph.get_is_reverse(n)); \
position->set_offset(ref_offset); ref_offset = 0; \
mapping; \
})

◆ _push_op

#define _push_op (   _m,
  _op,
  _len 
)
Value:
{ \
query_offset += push_edit(_m, (_op), &query[query_offset], (_len)); \
}

◆ DZ_CIGAR_OP

#define DZ_CIGAR_OP   0x04030201

◆ DZ_FULL_LENGTH_BONUS

#define DZ_FULL_LENGTH_BONUS

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MISMATCH 
MATCH 
INS 
DEL 
_push_op
#define _push_op(_m, _op, _len)