diffxpy.api.fit.partition(data: Union[anndata._core.anndata.AnnData, anndata._core.raw.Raw, numpy.ndarray, scipy.sparse.csr.csr_matrix, batchglm.models.base.input.InputDataBase], parts: Union[str, numpy.ndarray, list], gene_names: Optional[Union[numpy.ndarray, list]] = None, sample_description: Optional[pandas.core.frame.DataFrame] = None, dmat_loc: Optional[patsy.design_info.DesignMatrix] = None, dmat_scale: Optional[patsy.design_info.DesignMatrix] = None, size_factors: Optional[Union[numpy.ndarray, pandas.core.series.Series, str]] = None)

Perform differential expression test for each group. This class handles the partitioning of the data set, the differential test callls and the sumamry of the individual tests into one DifferentialExpressionTestMulti object. All functions the yield DifferentialExpressionTestSingle objects can be performed on each partition.

Wraps _Partition so that doc strings are nice.

  • data – Array-like or anndata.Anndata object containing observations. Input data matrix (observations x features) or (cells x genes).

  • parts

    str, array

    • column in data.obs/sample_description which contains the split of observations into the two groups.

    • array of length num_observations containing group labels

  • gene_names – optional list/array of gene names which will be used if data does not implicitly store these

  • sample_description – optional pandas.DataFrame containing sample annotations.

  • dmat_loc – Pre-built location model design matrix. This over-rides formula_loc and sample description information given in data or sample_description.

  • dmat_scale – Pre-built scale model design matrix. This over-rides formula_scale and sample description information given in data or sample_description.

  • size_factors – 1D array of transformed library size factors for each cell in the same order as in data or string-type column identifier of size-factor containing column in sample description.