mrVI and groupby=None

Hi,

I am fairly new to data analysis and therefore there might be an obvious answer to this, but I hope you can help me figure this out.

I have a dataset of immune cells with samples from many different predefined disease “states” within the same disease. I want to figure out of the unsupervised approach mrVI offers is able to group the samples based on these states, or if rather there are other biological groupings that appear instead. But I don’t want to get one clustermap per cell type as the tutorial examplifies, I would like to get one clustermap for the entire dataset, and therefore have set dists = model.get_local_sample_distances(keep_cell=False, groupby=None). However, I then get the error “ValueError: Undefined computation because not keep_cell and no groupby”. And it seems I do not have access to enough computational resources to run with keep_cell=True. Is there a way to run this without grouping per cell type or other group to get one global clustermap? If so, are there other adjustments you would do to the rest of the script to allow it to run?

Thank you!

Thanks for your interest in MrVI. There is some confusion here (keep_cell keeps the values for each single cell, while groupby defines the summary groups). We provided some evidence in the manuscript that sample stratification of different cell-types can be meaningful and I would recommend to first check the per cell-type stratification. To get a single summary statistic, you can pass in a cell-type key with a unique value for all cells.

1 Like

Thank you for the clarification and quick response! I will try out your suggestions!