Beispiel #1
0
def test_choose_annotation_contained1():
    # same size, better score
    a = Annotation(start=1, end=10, bitscore=10)
    b = Annotation(start=1, end=10, bitscore=15)
    assert choose_annotation(a, b) == a
Beispiel #2
0
def test_choose_annotation_none2():
    # overlap lower than the limits
    a = Annotation(start=1, end=10, bitscore=10)
    b = Annotation(start=9, end=12, bitscore=10)
    assert choose_annotation(a, b, overlap=2) is None
Beispiel #3
0
def test_choose_annotation_none1():
    # no overlap
    a = Annotation(start=1, end=10, bitscore=10)
    b = Annotation(start=11, end=12, bitscore=10)
    assert choose_annotation(a, b, overlap=4) is None
Beispiel #4
0
def test_choose_annotation_overlap2():
    # overlapping, same score, choose longer
    a = Annotation(start=1, end=11, bitscore=10)
    b = Annotation(start=5, end=11, bitscore=10)
    assert choose_annotation(a, b, overlap=4) == b
Beispiel #5
0
def test_choose_annotation_overlap1():
    # overlapping, better score
    a = Annotation(start=1, end=10, bitscore=10)
    b = Annotation(start=5, end=11, bitscore=15)
    assert choose_annotation(a, b, overlap=4) == a
Beispiel #6
0
def test_choose_annotation_contained2():
    # same score, longer
    a = Annotation(start=1, end=10, bitscore=10)
    b = Annotation(start=5, end=10, bitscore=10)
    assert choose_annotation(a, b) == b