Skip to content

Commit

Permalink
WhiteDataReader
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinthanvickneswaran committed Feb 22, 2024
1 parent 3dbf9c8 commit 5f119dc
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions c302/WhiteDataReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from c302 import print_

def get_all_muscle_prefixes():
return ["pm", "vm", "um", "BWM-D", "BWM-V"]
return ["pm", "vm", "um", "BWM-D", "BWM-V", "LegacyBodyWallMuscles"]


def get_body_wall_muscle_prefixes():
return ["BWM-D", "BWM-V"]
return ["BWM-D", "BWM-V", "LegacyBodyWallMuscles"]


def is_muscle(cell):
Expand Down Expand Up @@ -90,6 +90,7 @@ class White_A:
spreadsheet_location = os.path.dirname(os.path.abspath(__file__))+"/data/"
filename = "%saconnectome_white_1986_A.csv" % spreadsheet_location


def read_data(include_nonconnected_cells=False):
conns = []
cells = []
Expand Down Expand Up @@ -232,6 +233,10 @@ def main2():
class White_whole:
spreadsheet_location = os.path.dirname(os.path.abspath(__file__))+"/data/"
filename = "%saconnectome_white_1986_whole.csv" % spreadsheet_location

BODYWALLMUSCLE_ENDPOINT = "LegacyBodyWallMuscles"


def read_data(include_nonconnected_cells=False):

conns = []
Expand All @@ -248,7 +253,6 @@ def read_data(include_nonconnected_cells=False):

if not is_neuron(pre) or not is_neuron(post):
continue # pre or post is not a neuron

pre = remove_leading_index_zero(pre)
post = remove_leading_index_zero(post)

Expand Down Expand Up @@ -276,17 +280,18 @@ def read_muscle_data():
print_("Opened file: " + White_whole.filename)
f.readline()


for line in f:
pre, post, num, syntype, synclass = parse_line(line)

if not is_body_wall_muscle(post):
continue

if is_neuron(pre):
pre = remove_leading_index_zero(pre)
post = get_old_muscle_name(post)
post = get_old_muscle_name(post)

conns.append(ConnectionInfo(pre, post, num, syntype, synclass))
conns.append(ConnectionInfo(pre, post, num, syntype, synclass))

if is_neuron(pre) and pre not in neurons:
neurons.append(pre)
Expand Down

0 comments on commit 5f119dc

Please sign in to comment.