Skip to content

Commit 5d2792a

Browse files
committed
Addition of MLR260L
1 parent 907572b commit 5d2792a

File tree

6 files changed

+144
-15
lines changed

6 files changed

+144
-15
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[
2+
{
3+
"cochlea": "M_LR_000260_L",
4+
"image_channel": [
5+
"PV",
6+
"Prph",
7+
"Tuj1",
8+
"SGN_v2"
9+
],
10+
"segmentation_channel": "SGN_v2",
11+
"type": "sgn",
12+
"n_blocks": 6,
13+
"halo_size": [
14+
256,
15+
256,
16+
50
17+
],
18+
"component_list": [
19+
1
20+
],
21+
"crop_centers": [
22+
[
23+
969,
24+
1085,
25+
536
26+
],
27+
[
28+
996,
29+
735,
30+
535
31+
],
32+
[
33+
651,
34+
714,
35+
519
36+
],
37+
[
38+
596,
39+
808,
40+
828
41+
],
42+
[
43+
804,
44+
600,
45+
1029
46+
],
47+
[
48+
810,
49+
222,
50+
1030
51+
]
52+
],
53+
"max_edge_distance": 30
54+
}
55+
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"cochlea": "M_LR_000184_L",
4+
"image_channel": [
5+
"PV",
6+
"Prph"
7+
],
8+
"segmentation_channel": "SGN_v2b",
9+
"component_list": [
10+
1
11+
]
12+
},
13+
{
14+
"cochlea": "M_LR_000184_L",
15+
"image_channel": [
16+
"PV",
17+
"Prph"
18+
],
19+
"segmentation_channel": "SGN_v2",
20+
"component_list": [
21+
1
22+
]
23+
}
24+
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[
2+
{
3+
"cochlea": "M_LR_000184_R",
4+
"image_channel": [
5+
"PV",
6+
"Prph"
7+
],
8+
"segmentation_channel": "SGN_v2b",
9+
"component_list": [
10+
1
11+
]
12+
},
13+
{
14+
"cochlea": "M_LR_000184_R",
15+
"image_channel": [
16+
"PV",
17+
"Prph"
18+
],
19+
"segmentation_channel": "SGN_v2",
20+
"component_list": [
21+
1
22+
]
23+
}
24+
]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"cochlea": "M_LR_000260_L",
4+
"image_channel": [
5+
"Prph",
6+
"PV",
7+
"Tuj1"
8+
],
9+
"segmentation_channel": "SGN_v2",
10+
"component_list": [
11+
1
12+
]
13+
}
14+
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
{
3+
"cochlea": "M_LR_000260_L",
4+
"component_list": [
5+
1
6+
],
7+
"segmentation_channel": "SGN_v2",
8+
"type": "sgn"
9+
}
10+
]

scripts/measurements/sgn_subtypes.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,23 @@ def frequency_mapping(frequencies, values, animal="mouse", transduction_efficien
5757
COCHLEAE_FOR_SUBTYPES = {
5858
"M_LR_000099_L": ["PV", "Calb1", "Lypd1"],
5959
# "M_LR_000214_L": ["PV", "CR", "Calb1"],
60-
# "M_AMD_N62_L": ["PV", "CR", "Calb1"],
61-
# "M_AMD_N180_R": ["CR", "Ntng1", "CTBP2"],
62-
# "M_AMD_N180_L": ["CR", "Ntng1", "Lypd1"],
6360
"M_LR_000184_R": ["PV", "Prph"],
6461
"M_LR_000184_L": ["PV", "Prph"],
65-
# Mutant / some stuff is weird.
66-
# "M_AMD_Runx1_L": ["PV", "Lypd1", "Calb1"],
67-
# This one still has to be stitched:
68-
# "M_LR_000184_R": {"PV", "Prph"},
62+
"M_LR_000260_L": ["PV", "Prph", "Tuj1"],
6963
}
7064

7165
COCHLEAE = {
66+
"M_LR_000099_L": {"seg_data": "PV_SGN_v2", "subtype": ["Calb1", "Lypd1"]},
7267
"M_LR_000184_L": {"seg_data": "SGN_v2", "subtype": ["Prph"], "output_seg": "SGN_v2b"},
7368
"M_LR_000184_R": {"seg_data": "SGN_v2", "subtype": ["Prph"], "output_seg": "SGN_v2b"},
74-
"M_LR_000099_L": {"seg_data": "PV_SGN_v2", "subtype": ["Calb1", "Lypd1"]},
69+
"M_LR_000260_L": {"seg_data": "SGN_v2", "subtype": ["Prph", "Tuj1"]},
7570
# "M_LR_000214_L": {"seg_data": "PV_SGN_v2", "subtype": ["Calb1"]},
7671
}
7772

7873

7974
REGULAR_COCHLEAE = [
80-
"M_LR_000099_L", "M_LR_000184_R", "M_LR_000184_L"
75+
"M_LR_000099_L", "M_LR_000184_R", "M_LR_000184_L", "M_LR_000260_L"
8176
]
82-
# "M_LR_000214_L", "M_AMD_N62_L",
8377

8478
# For custom thresholds.
8579
THRESHOLDS = {
@@ -124,6 +118,12 @@ def stain_to_type(stain):
124118
"Calb1-/Lypd1+": "Type Ic",
125119
"Calb1-/Lypd1-": "inconclusive", # Can be Type Ia or Type II
126120

121+
# Combinations of Prph and Tuj1:
122+
"Prph+/Tuj1+": "Type II",
123+
"Prph+/Tuj1-": "Type I",
124+
"Prph-/Tuj1+": "Type I",
125+
"Prph-/Tuj1-": "inconclusive",
126+
127127
# Prph is isolated.
128128
"Prph+": "Type II",
129129
"Prph-": "Type I",
@@ -274,8 +274,8 @@ def compile_data_for_subtype_analysis():
274274
seg_source = sources[COCHLEAE[cochlea]["output_seg"]]
275275
seg_name = COCHLEAE[cochlea]["output_seg"]
276276
else:
277-
seg_source = sources[COCHLEAE[cochlea]["output_seg"]]
278-
seg_name = COCHLEAE[cochlea]["output_seg"]
277+
seg_source = sources[COCHLEAE[cochlea]["seg_data"]]
278+
seg_name = COCHLEAE[cochlea]["seg_data"]
279279
else:
280280
raise e
281281
table_folder = os.path.join(
@@ -449,6 +449,8 @@ def combined_analysis(results, show_plots):
449449
sub_freq = [frequencies[i] for i in range(len(classification))
450450
if classification[i][:classification[i].find(" (")] == c]
451451
mapping = frequency_mapping(sub_freq, [1 for _ in range(len(sub_freq))])
452+
mapping.fillna(0, inplace=True)
453+
452454
mapping = mapping.astype('float32')
453455
dic[c] = mapping
454456
bin_labels = pd.unique(mapping.index)
@@ -562,8 +564,8 @@ def analyze_subtype_data_regular(show_plots=True):
562564
seg_source = sources[COCHLEAE[cochlea]["output_seg"]]
563565
seg_name = COCHLEAE[cochlea]["output_seg"]
564566
else:
565-
seg_source = sources[COCHLEAE[cochlea]["output_seg"]]
566-
seg_name = COCHLEAE[cochlea]["output_seg"]
567+
seg_source = sources[COCHLEAE[cochlea]["seg_data"]]
568+
seg_name = COCHLEAE[cochlea]["seg_data"]
567569
else:
568570
raise e
569571
table_folder = os.path.join(
@@ -573,6 +575,7 @@ def analyze_subtype_data_regular(show_plots=True):
573575
table = pd.read_csv(table_content, sep="\t")
574576
table = table[table.component_labels == 1]
575577

578+
print(cochlea)
576579
print(f"Length of table before filtering: {len(table)}")
577580
# filter subtype table
578581
for chan in channels[1:]:
@@ -659,7 +662,6 @@ def export_for_annotation():
659662
if cochlea not in REGULAR_COCHLEAE:
660663
continue
661664

662-
print(cochlea)
663665
channels = COCHLEAE_FOR_SUBTYPES[cochlea]
664666
reference_channel = "PV"
665667
assert channels[0] == reference_channel

0 commit comments

Comments
 (0)