I am trying to create a UMAP plot with custom data. I can use the function scanpy.pl.umap(AnnData_object, color = [“gene”]) to get a UMAP plot displaying the level of expression of “gene” per cell. I have generated a gene set expression score per cell and would like to display this score instead of the expression of a gene.
To solve this, I thought I could append an extra “gene” to the AnnData expression array and fill it with the gene set expression scores. I was doing this by iterating through each cell and adding the score to the expression array with this code: numpy.append(AnnData_object.X[cell_number,:], gene_set_expression_score). However, I don’t know how to access this data with the scanpy.pl.umap function. Specifically, what would I set color equal to? Is there a better way to do this?
Thanks very much for your time.