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
 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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
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("PVCR", "AVBR", 1, "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_ELEC_SYN)
        )
        self.conns.append(
            ConnectionInfo("VB6", "AVBL", 3, "GapJunction", GENERIC_ELEC_SYN)
        )
        self.conns.append(
            ConnectionInfo("VB6", "VB6", 3, "GapJunction", GENERIC_ELEC_SYN)
        )
        self.conns.append(
            ConnectionInfo("DD4", "DD5", 3, "GapJunction", GENERIC_ELEC_SYN)
        )

        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_ELEC_SYN)
        )

        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