Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7459dbe

Browse files
committedNov 12, 2020
Make cell type percent out of total rather than mean, hide unlabeled subject cells from t-SNE
1 parent 9e145c2 commit 7459dbe

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
 

‎capblood_seq_viz/figures/summary.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_cell_tSNE_figure(group_by=data.Cell_Grouping.SUBJECT):
2828
cell_coordinates = cell_coordinates_by_group[group_name]
2929

3030
if group_name is None:
31-
group_name = "Other"
31+
continue
3232

3333
scatter = graph_objects.Scattergl(
3434
x=cell_coordinates[:, 0],

‎notebooks/Cell Type Counts.ipynb

+5-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
" cell_percentage = num_cells/num_subject_cells\n",
6464
" cell_type_percentages[cell_type].append(cell_percentage)\n",
6565
" cell_type_errors[cell_type] = numpy.std(cell_type_percentages[cell_type])\n",
66-
" cell_type_percentages[cell_type] = numpy.mean(cell_type_percentages[cell_type])\n",
66+
"\n",
67+
"for cell_type in config.CELL_TYPES:\n",
68+
" cell_type_percentages[cell_type] = cell_type_num_cells[cell_type]/sum(cell_type_num_cells.values())\n",
6769
"\n",
6870
"# Repeat for each subtype\n",
6971
"cell_subtype_percentages = {}\n",
@@ -87,7 +89,7 @@
8789
" cell_percentage = num_cells/num_subject_cells\n",
8890
" cell_subtype_percentages[cell_type][cell_subtype].append(cell_percentage)\n",
8991
" cell_subtype_errors[cell_type][cell_subtype] = numpy.std(cell_subtype_percentages[cell_type][cell_subtype])\n",
90-
" cell_subtype_percentages[cell_type][cell_subtype] = numpy.mean(cell_subtype_percentages[cell_type][cell_subtype])"
92+
" cell_subtype_percentages[cell_type][cell_subtype] = cell_subtype_num_cells[cell_type][cell_subtype]/sum(cell_type_num_cells.values())"
9193
]
9294
},
9395
{
@@ -163,7 +165,7 @@
163165
"name": "python",
164166
"nbconvert_exporter": "python",
165167
"pygments_lexer": "ipython3",
166-
"version": "3.6.9"
168+
"version": "3.6.12"
167169
}
168170
},
169171
"nbformat": 4,

‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='capblood-seq-viz',
5-
version='1.0.1',
5+
version='1.0.2',
66
description='Interactive visualization web app for capillary blood data',
77
url='https://github.com/ThomsonLab/capblood-seq-viz',
88
author='David Brown',

0 commit comments

Comments
 (0)
Please sign in to comment.