diffxpy.api.test.partition

diffxpy.api.test.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)

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.

Parameters
  • 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