Questions about running differential expression

Ok I understand the issue.

In the notebook you shared you can replace

adata.obsm["protein_expression"] = mdata["adt"].layers["counts"].A.copy()

with

adata.obsm["protein_expression"] = mdata["adt"].to_df("counts")

The issue arises due to the first line giving a numpy array, so our library generates integer based index for the protein names. This causes an issue with accessing a pandas series in your traceback.

We will push a fix soon. In the meantime, the recommended workflow is to use dataframes. Alternatively, you can use mudata throughout by following this tutorial:

Finally, it’s important to note that the differential expression function may give strange results due to cells with missing proteins. You can filter these cells and supply a custom adata to vae.differential_expression(new_adata)

Alternatively, advanced usage can alter the batchid1 and batchid2 arguments.