def compute_delta(orig_pos, new_pos, strand):
    """ Given a starting position and a new position, compute the distance
        between them. The sign indicates whether the second point is 
        upstream or downstream of the original with respect to strand. """

    abs_dist = abs(orig_pos - new_pos)
    if strand == "+":
        if new_pos < orig_pos:
            return -1*abs_dist
        else:
            return abs_dist
    elif strand == "-":
        if new_pos < orig_pos:
            return abs_dist
        else:
            return -1*abs_dist
    else:
        raise ValueError("Strand must be either + or -")