示例#1
0
def subjects(hits):
    return [
        classes.Subject(hits=[hits[0]],
                        ipg="1",
                        start=14044,
                        end=14641,
                        strand="-"),
        classes.Subject(hits=[hits[1]],
                        ipg="2",
                        start=11815,
                        end=13459,
                        strand="+"),
        classes.Subject(hits=[hits[2]],
                        ipg="3",
                        start=9656,
                        end=11184,
                        strand="+"),
        classes.Subject(hits=[hits[3], hits[4], hits[5]],
                        ipg="4",
                        start=1234,
                        end=5678,
                        strand="+"),
        classes.Subject(hits=[hits[3], hits[4], hits[5]],
                        ipg="4",
                        start=9656,
                        end=11184,
                        strand="+"),
    ]
示例#2
0
def subjects_clustering():
    return [
        classes.Subject(start=0, end=1000, strand="+"),
        classes.Subject(start=2000, end=3000, strand="+"),
        classes.Subject(start=5000, end=6000, strand="+"),
        classes.Subject(start=9000, end=10000, strand="+"),
        classes.Subject(start=14000, end=15000, strand="+"),
    ]
示例#3
0
def subjects(hits):
    return [
        classes.Subject(name="s1", hits=[hits[0]], ipg="1", start=0, end=1000, strand="-"),
        classes.Subject(name="s2", hits=[hits[1]], ipg="2", start=2000, end=3000, strand="+"),
        classes.Subject(name="s3", hits=[hits[2]], ipg="3", start=5000, end=6000, strand="+"),
        classes.Subject(name="s4", hits=[hits[3], hits[4], hits[5]], ipg="4", start=9000, end=10000, strand="+"),
        classes.Subject(name="s5", hits=[hits[3], hits[4], hits[5]], ipg="4", start=14000, end=15000, strand="+"),
    ]
示例#4
0
def subjects(hits):
    return [
        classes.Subject("id1", hits[:2], "subject1", "ipg1", "0", "100", -1),
        classes.Subject("id1", [hits[1], hits[0]], "subject1", "ipg1", 0, 100,
                        -1),
        classes.Subject("id2", hits[2:3], "subject2", "ipg2", 1200, 6000, 1),
        classes.Subject("id3", hits[3:4], "subject3", "ipg3", 500, "1000", 1),
        classes.Subject("id4", hits[4:5], "subject4", "ipg4", 6453, 8000, 1),
        classes.Subject("id5",
                        name="intermediate subject",
                        start=8100,
                        end=9000),
    ]
示例#5
0
def test_subject_empty_instantiation():
    assert [[], None, None, None, None, None] == [
        getattr(classes.Subject(), val)
        for val in ["hits", "ipg", "name", "start", "end", "strand"]
    ]