scRNAseq#

scRNA-seq data analysis calculating gene expression, genetic noise

class scRNAseq.CountsAnalysis(counts_file_path, genes=None)#

Analyse scRNA-seq counts data

get_counts()#

Returns the counts

Returns#

counts: pd.DataFrame

The single cell counts for genes (rows) and cells (columns)

get_expression(cell_populations, genes=None)#

Returns the calculated gene expression

Parameters#

cell_populations: dict

The cell populations with the lists or arrays of cells as values and arbitrary cell population keys as keys

genes: list(str)

The list of genes to be used as indices of the counts, if None then all genes are used

Returns#

x_mean: pd.DataFrame

The mean gene expression for genes (rows) and cell populations (columns)

x_std: pd.DataFrame

The standard deviation of gene expression for genes (rows) and cell populations (columns)

x_n: pd.DataFrame

The number of cells in the cell population for genes (rows) and cell populations (columns)

x_cell_populations: dict

The used cell populations, which may differ from cell_populations if some cell keys are not found in the counts columns

get_expression_noise(cell_populations, genes=None)#

Returns the calculated gene expression and genetic noise

Parameters#

cell_populations: dict

The cell populations with the lists or arrays of cells as values and arbitrary cell population keys as keys

genes: list(str)

The list of genes to be used as indices of the counts, if None then all genes are used

Returns#

x_mean: pd.DataFrame

The mean gene expression for genes (rows) and cell populations (columns)

x_std: pd.DataFrame

The standard deviation of gene expression for genes (rows) and cell populations (columns)

x_n: pd.DataFrame

The number of cells in the cell population for genes (rows) and cell populations (columns)

x_cell_populations: dict

The used cell populations, which may differ from cell_populations if some cell keys are not found in the counts columns

noise: pd.DataFrame

The genetic noise for genes (rows) and cell populations (columns)

noise_std: pd.DataFrame

The estimated error on genetic noise for genes (rows) and cell populations (columns)

get_genes()#

Returns the genes

Returns#

genes: pd.Series

The genes in the counts with names as values and Ensembl gene IDs as keys (index)

get_noise(cell_populations, genes=None)#

Returns the calculated genetic noise

Parameters#

cell_populations: dict

The cell populations with the lists or arrays of cells as values and arbitrary cell population keys as keys

genes: list(str)

The list of genes to be used as indices of the counts, if None then all genes are used

Returns#

noise: pd.DataFrame

The genetic noise for genes (rows) and cell populations (columns)

noise_std: pd.DataFrame

The estimated error on genetic noise for genes (rows) and cell populations (columns)

x_n: pd.DataFrame

The number of cells in the cell population for genes (rows) and cell populations (columns)

x_cell_populations: dict

The used cell populations, which may differ from cell_populations if some cell keys are not found in the counts columns

scRNAseq.get_expression_noise(counts, cell_populations, genes=None, do_noise=True)#

Returns the calculated gene expression and genetic noise

Parameters#

counts: pd.DataFrame

The single cell counts for genes (rows) and cells (columns)

cell_populations: dict

The cell populations with the lists or arrays of cells as values and arbitrary cell population keys as keys

genes: list(str)

The list of genes to be used as indices of the counts, if None then all genes are used

do_noise: bool

If the genetic noise and its estimated error shall be calculated and returned

Returns#

x_mean: pd.DataFrame

The mean gene expression for genes (rows) and cell populations (columns)

x_std: pd.DataFrame

The standard deviation of gene expression for genes (rows) and cell populations (columns)

x_n: pd.DataFrame

The number of cells in the cell population for genes (rows) and cell populations (columns)

x_cell_populations: dict

The used cell populations, which may differ from cell_populations if some cell keys are not found in the counts columns

noise: pd.DataFrame

The genetic noise for genes (rows) and cell populations (columns)

noise_std: pd.DataFrame

The estimated error on genetic noise for genes (rows) and cell populations (columns)