pydeseq2.dispersions.fit_rough_dispersions#

fit_rough_dispersions(normed_counts, design_matrix)#

Rough dispersion estimates from linear model, as per the R code.

Used as initial estimates in DeseqDataSet.fit_genewise_dispersions().

Parameters:
normed_counts ndarray

Array of deseq2-normalized read counts. Rows: samples, columns: genes.

design_matrix DataFrame

A DataFrame with experiment design information (to split cohorts). Indexed by sample barcodes. Unexpanded, with intercept.

Return type:

ndarray

Returns:

Estimated dispersion parameter for each gene.