Commit ·
d6cf594
1
Parent(s): 4e795a7
solve bug update
Browse files
app.py
CHANGED
|
@@ -108,15 +108,7 @@ class MERFISH_viz(param.Parameterized):
|
|
| 108 |
pn.Param(self.param['subclass_selector'])
|
| 109 |
)
|
| 110 |
|
| 111 |
-
@
|
| 112 |
-
def view(self):
|
| 113 |
-
return pn.Column(
|
| 114 |
-
f'Selected dataset: {self.dataset_selector}',
|
| 115 |
-
f'Brain Section Index: {self.brain_section_index}',
|
| 116 |
-
f'Selected Gene: {self.gene_selector}',
|
| 117 |
-
f'Selected Classes: {self.class_selector}, {self.subclass_selector}')
|
| 118 |
-
|
| 119 |
-
@pn.depends("filter_by_class_subclass", "gene_selector", "brain_section_index", "filter_by_class_subclass")
|
| 120 |
def plot_expr_across_slices(self):
|
| 121 |
curve_data = self.filtered_data[self.filtered_data[self.gene_selector] > 0].groupby('brain_section_label')[
|
| 122 |
self.gene_selector].mean()
|
|
@@ -145,7 +137,7 @@ class MERFISH_viz(param.Parameterized):
|
|
| 145 |
|
| 146 |
return hv.Layout([(ratio_cells * vline), (curve * vline), (percentage_curve * vline)]).cols(1)
|
| 147 |
|
| 148 |
-
@pn.depends("filter_by_class_subclass", "gene_selector", "brain_section_index"
|
| 149 |
def plot_bar(self):
|
| 150 |
color_map = self.section.groupby('parcellation_structure')['parcellation_structure_color'].first().to_dict()
|
| 151 |
|
|
@@ -193,7 +185,7 @@ class MERFISH_viz(param.Parameterized):
|
|
| 193 |
|
| 194 |
return (plot1 + plot2).opts(common_opts)
|
| 195 |
|
| 196 |
-
@param.depends("brain_section_index", watch=True)
|
| 197 |
def get_section(self):
|
| 198 |
brain_section = self.current_data['brain_section_label'].unique()[self.brain_section_index]
|
| 199 |
section = self.filtered_data[self.filtered_data['brain_section_label'] == brain_section]
|
|
|
|
| 108 |
pn.Param(self.param['subclass_selector'])
|
| 109 |
)
|
| 110 |
|
| 111 |
+
@pn.depends("filter_by_class_subclass", "gene_selector", "brain_section_index")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
def plot_expr_across_slices(self):
|
| 113 |
curve_data = self.filtered_data[self.filtered_data[self.gene_selector] > 0].groupby('brain_section_label')[
|
| 114 |
self.gene_selector].mean()
|
|
|
|
| 137 |
|
| 138 |
return hv.Layout([(ratio_cells * vline), (curve * vline), (percentage_curve * vline)]).cols(1)
|
| 139 |
|
| 140 |
+
@pn.depends("filter_by_class_subclass", "gene_selector", "brain_section_index")
|
| 141 |
def plot_bar(self):
|
| 142 |
color_map = self.section.groupby('parcellation_structure')['parcellation_structure_color'].first().to_dict()
|
| 143 |
|
|
|
|
| 185 |
|
| 186 |
return (plot1 + plot2).opts(common_opts)
|
| 187 |
|
| 188 |
+
@param.depends("brain_section_index",'class_selector', 'subclass_selector', watch=True)
|
| 189 |
def get_section(self):
|
| 190 |
brain_section = self.current_data['brain_section_label'].unique()[self.brain_section_index]
|
| 191 |
section = self.filtered_data[self.filtered_data['brain_section_label'] == brain_section]
|