@@ -445,7 +445,7 @@ def plot_coclustering_matrix_sorted_by_cluster_size(coclustering_matrices, clust
445445 fig , ax = plt .subplots (figsize = figsize )
446446 ax = sns .heatmap (sorted_coclustering_matrix , cmap = "Greys" , ax = ax , square = True ,
447447 cbar = True , cbar_kws = {"drawedges" : False , "label" : 'probability of\n co-clustering' , 'shrink' : 0.7 , },)
448- ax .set_title (get_cell_type_for_cre_line (cre_line , cluster_meta ))
448+ ax .set_title (processing . get_cre_line_map (cre_line ))
449449 ax .set_title ('' )
450450 ax .set_yticks ((0 , sorted_coclustering_matrix .shape [0 ]))
451451 ax .set_yticklabels ((0 , sorted_coclustering_matrix .shape [0 ]), fontsize = 20 )
@@ -502,7 +502,7 @@ def plot_umap_for_clusters(cluster_meta, feature_matrix, label_col='cluster_id',
502502
503503 label_col: column in cluster_meta to colorize points by
504504 """
505- import umap
505+ # import umap
506506 figsize = (15 , 4 )
507507 fig , ax = plt .subplots (1 , 3 , figsize = figsize )
508508 for i , cre_line in enumerate (get_cre_lines (cluster_meta )):
@@ -2003,7 +2003,7 @@ def plot_gap_statistic(gap_statistic, cre_lines=None, n_clusters_cre=None, tag='
20032003 n_clusters = n_clusters_cre [cre_line ]
20042004 x = len (gap_statistic [cre_line ]['gap' ])
20052005
2006- figsize = (10 , 4 )
2006+ figsize = (8 , 4 )
20072007 fig , ax = plt .subplots (1 , 2 , figsize = figsize )
20082008
20092009 ax [0 ].plot (np .arange (1 , x + 1 ), gap_statistic [cre_line ]['reference_inertia' ], 'o-' )
@@ -2017,6 +2017,7 @@ def plot_gap_statistic(gap_statistic, cre_lines=None, n_clusters_cre=None, tag='
20172017 ax [1 ].set_ylabel ('Gap statistic' )
20182018 ax [1 ].set_xlabel ('Number of clusters' )
20192019 ax [1 ].axvline (x = n_clusters , ymin = 0 , ymax = 1 , linestyle = '--' , color = 'gray' )
2020+ ax [1 ].set_ylim ([0 ,0.3 ])
20202021
20212022 title = processing .get_cre_line_map (cre_line ) # get a more interpretable cell type name
20222023 plt .suptitle (title )
0 commit comments