Especially when we visualize large datasets with multiple categorical variables (e.g. patient, disease, cell type) using sc.pl.dotplot, and we use a sequence in the groupby argument (e.g. sc.pl.dotplot(ad, 'genex', groupby=['individual', 'disease_status', 'cell type'])), sometimes we end up with too few cells in some rows, in which summary statistics like fraction of nonzero expressors or mean expression are not very robust.
To avoid that, I think it'd be cool to have a minimum observation cutoff in the function, where e.g. min_cells=5 would show groupby combinations with at least 5 cells. Without this option, this sort of filtering becomes an annoying pandas exercise (which some might enjoy but possibly not everyone).
sc.tools?sc.pl?sc.external.*?Especially when we visualize large datasets with multiple categorical variables (e.g. patient, disease, cell type) using
sc.pl.dotplot, and we use a sequence in thegroupbyargument (e.g. sc.pl.dotplot(ad, 'genex', groupby=['individual', 'disease_status', 'cell type'])), sometimes we end up with too few cells in some rows, in which summary statistics like fraction of nonzero expressors or mean expression are not very robust.To avoid that, I think it'd be cool to have a minimum observation cutoff in the function, where e.g.
min_cells=5would showgroupbycombinations with at least 5 cells. Without this option, this sort of filtering becomes an annoying pandas exercise (which some might enjoy but possibly not everyone).