def alignment_is_good(record, a, arange):
    trimmed_slen = arange.end - arange.start    
    if trimmed_slen < 0:
        sys.exit("BUG: trimmed_slen bad value\n")

    qury_wiggle = record.qlen * WIGGLE_PCT

    if not fabs(a.send - a.sstart) > MIN_ALIGNMENT_SIZE:
        return False
    
    #pb read contained in utg
    if( fabs(a.send - a.sstart) >= (trimmed_slen * CONTAINED_PCT) and
        record.qlen > record.slen):
        return True
     
    #utg contained
    if( fabs(a.qend - a.qstart) > (record.qlen * CONTAINED_PCT) and
          record.slen > record.qlen):
        return True

    #else proper overlap off end of pb read
    if( (a.sstart == arange.start or arange.end == a.send) and
          (a.qstart < qury_wiggle or a.qend < qury_wiggle or
           (record.qlen - a.qstart) < qury_wiggle or qury_wiggle < (record.qlen - a.qend))):
        return True
    
    return False
dataset/ETHPy150Open jgurtowski/ectools/pre_delta_filter.py/alignment_is_good/swapped operands of `<`