Exemple #1
0
def test_compare(allele1, allele2, allele3, allele4, allele5, allele6):
    assert allele1 == Allele('contig1776', 2468, 2469, 'A', refrseq='G')
    assert allele3 < allele4
    for _ in range(5):
        alleles = [allele2, allele4, allele3, allele1, allele6, allele5]
        shuffle(alleles)
        sa = sorted(alleles)
        print([a.slug for a in sa])
        assert sa == [allele6, allele1, allele2, allele5, allele3, allele4]
Exemple #2
0
def test_bad_coord():
    with pytest.raises(InvalidGenomicCoordinateError) as e:
        a = Allele('scaffold1492', 3000, 2999, 'C')
    assert 'allele end cannot be before allele start' in str(e)
Exemple #3
0
def test_indel(allele2):
    assert allele2.refrlength == 1
    assert len(allele2) == 3
    assert allele2.refr == 'G'
    assert allele2 < Allele('contig1776', 2468, 2500, 'ATG')
Exemple #4
0
def allele6():
    return Allele('chr17', 1944, 1945, 'GATTACA')
Exemple #5
0
def allele5():
    return Allele('contig1776', 123456788, 123456789, 'T')
Exemple #6
0
def allele4():
    return Allele('contig1812', 13579, 13580, 'G', refrseq='T')
Exemple #7
0
def allele2():
    return Allele('contig1776', 2468, 2469, 'CAT', refrseq='G')
Exemple #8
0
def allele1():
    return Allele('contig1776', 2468, 2469, 'A')