A method of analysing a tumour sample comprising tumour cells and immune cells is described. The method comprises obtaining single
cell gene expression profiles for a plurality of cells from the tumour sample, the single
cell gene expression profiles comprising
gene expression measurements for a set of genes: using a
deep learning model to identify a respective
latent variable representation of the single
cell gene expression profiles in the sample; and identifying a respective one of one or more latent space clusters of cells that the cells in the sample belong to, wherein the clusters of cells correspond to cells from different cell types. The
deep learning algorithm is selected from
deep learning algorithms trained to identify a
latent variable representation of single cell
gene expression profiles from cells in tumour samples that have not been purified to select tumour microenvironment cells, from cells identified as non-malignant in tumour samples that have not been purified to select tumour microenvironment cells and / or cells from samples comprising purified tumour microenvironment cells, or using
cell type labels associated with clusters of cells in the latent space of the such deep
learning models. Related methods, systems and products are also described.