scbulkde.engines.PyDESeq2Engine#

class scbulkde.engines.PyDESeq2Engine#

DESeq2 engine using PyDESeq2 (pure Python).

Attributes table#

PyDESeq2Engine.name: str = 'pydeseq2'

Methods table#

run(counts, metadata, design_matrix, ...[, ...])

Run PyDESeq2 differential expression.

Attributes#

PyDESeq2Engine.name: str = 'pydeseq2'#

Methods#

PyDESeq2Engine.run(counts, metadata, design_matrix, design_formula, alpha, correction_method, *, fit_type='mean', n_cpus=16, quiet=True)#

Run PyDESeq2 differential expression.

Parameters:
  • counts (DataFrame) – Gene expression counts (samples x genes).

  • metadata (DataFrame) – Sample metadata with design variables.

  • design_matrix (DataFrame) – For compatibility, not used.

  • design_formula (str) – Design formula (e.g., “~condition” or “~condition+batch”).

  • alpha (float) – Significance threshold for adjusted p-values.

  • correction_method (str) – Method for multiple testing correction.

  • fit_type (Literal['mean', 'parametric'] (default: 'mean')) – Type of fitting for dispersion estimation.

  • n_cpus (int (default: 16)) – Number of CPUs to use.

Return type:

DataFrame

Returns:

pd.DataFrame DE results with log2FoldChange, pvalue, padj, baseMean.