Sample (Patient) Level Analysis#

SamplePipeline is a pipeline for analysis and visualization of the GOI’s expression across the samples in the current VEO-IBD dataset.

class sample_pipeline.SamplePipeline(wdir, adata)#
__init__(wdir, adata)#

Initialize the SamplePipeline class. This class is used to generate plots for the GOI across different samples (patients).

Parameters:
  • wdir (str) – The working directory.

  • adata (AnnData) – The AnnData object.

pl_sample_celltype(GOI, standard_scale=1, z_score=False)#

Generate a clustermap of GOI expression data across patients and cell types. The clustermap is accompanied by a barplot showing the number of cells per cell type.

Parameters:

GOI (str) – The gene of interest.

pl_violin(GOI, celltype=None)#

Generate a violin plot of gene of interest expression across all or a specific cell type of interest.

Parameters:
  • GOI (str) – The gene of interest.

  • celltype (str, optional) – The cell type of interest, defaults to None.

sample_v_celltype(GOI) DataFrame#

Get expression data for a gene of interest (GOI), calculate mean expression per celltype and sample, and count the number of cells for each cell type.

Parameters:

GOI (str) – The gene of interest.

Returns:

DataFrame with mean expression per celltype and sample, and cell counts.

Return type:

DataFrame