src/c++/include/variant/RefVar.hh
/**
 * @brief List functions making sure variants aren't pushed past each other.
 *
 * variants in the input list must be sorted by starting position
 *
 * Functions templated so they work on things derived from RefVar
 *
 */
@brief List functions making sure variants aren't pushed past each other.
variants in the input list must be sorted by starting position

Functions templated so they work on things derived from RefVar
@brief List functions making sure variants aren ' t pushed past each other . variants in the input list must be sorted by starting position Functions templated so they work on things derived from RefVar
static inline void leftShift(common::FastaFile const& f, const char* chr, std::list<RefVar>& rv, int64_t pos_min = -1)
{
    int64_t last_start = -1;
    for (RefVar& r : rv)
    {
        if (last_start > 0 && r.start < last_start)
        {
            error("Variants out of order at %s:%i", chr, last_start);
        }
        leftShift(f, chr, (RefVar&)r, pos_min);
        pos_min = r.end + 1;
        last_start = r.start;
    }
}
static inline void leftShift ( common :: FastaFile const & f , const char * chr , std :: list < RefVar > & rv , int64_t pos_min = -1 ) { int64_t last_start = -1 ; for ( RefVar & r : rv ) { if ( last_start > 0 && r . start < last_start ) { error ( " " , chr , last_start ) ; } leftShift ( f , chr , ( RefVar & ) r , pos_min ) ; pos_min = r . end + 1 ; last_start = r . start ; } }
@brief List functions making sure variants aren't pushed past each other.
@brief List functions making sure variants aren ' t pushed past each other .