Skip to content

TestDataReader

TestDataReader

Bases: ConnectomeDataset

Dummy dataset used for testing webpage/graph generation. Do not assume any of these connections are correct!

Source code in cect/TestDataReader.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
class TestDataReader(ConnectomeDataset):
    """Dummy dataset used for testing webpage/graph generation. Do not assume any of these connections are correct!"""

    cells = []
    conns = []

    def __init__(self):
        ConnectomeDataset.__init__(self)

        cells, neuron_conns = self.read_data()
        for conn in neuron_conns:
            self.add_connection_info(conn)

    def read_data(self):
        self.conns.append(ConnectionInfo("PVCL", "AVBL", 7, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("PVCL", "DB4", 6, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("PVCL", "VB6", 2, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("DB4", "DD4", 2, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("DB4", "VD6", 14, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("VA6", "VD6", 6, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("VB6", "DD4", 32, "Send", "Acetylcholine"))

        self.conns.append(ConnectionInfo("VD6", "VA6", 3, "Send", "GABA"))

        self.conns.append(ConnectionInfo("VD3", "VA3", 2, "Send", "GABA"))
        self.conns.append(ConnectionInfo("VD3", "VB2", 2, "Send", "GABA"))

        self.conns.append(ConnectionInfo("DB4", "AVBL", 4, "GapJunction", "Generic_GJ"))
        self.conns.append(ConnectionInfo("VB6", "AVBL", 3, "GapJunction", "Generic_GJ"))
        self.conns.append(ConnectionInfo("VB6", "VB6", 3, "GapJunction", "Generic_GJ"))

        self.conns.append(ConnectionInfo("DVA", "PVCL", 3, "Send", "Acetylcholine"))

        self.conns.append(ConnectionInfo("ASHR", "RMGR", 6, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("AWBR", "ASHR", 2, "Send", "Acetylcholine"))

        self.conns.append(ConnectionInfo("I5", "M4", 9, "Send", "Acetylcholine"))
        self.conns.append(ConnectionInfo("M4", "M1", 9, "Send", "Acetylcholine"))

        self.conns.append(
            ConnectionInfo("ASHR", "ASKR", 1, "GapJunction", "Generic_GJ")
        )

        for c in self.conns:
            if c.pre_cell not in self.cells:
                self.cells.append(c.pre_cell)
            if c.post_cell not in self.cells:
                self.cells.append(c.post_cell)

        return self.cells, self.conns

    def read_muscle_data(self):
        conns = []
        neurons = []
        muscles = []

        return neurons, muscles, conns