singleCellHaystack.haystack

Contents

singleCellHaystack.haystack#

singleCellHaystack.haystack(x, coord, features=None, layer=None, dims=None, scale_coord=True, ngrid_points=100, n_genes_to_randomize=100, select_genes_randomize_method='heavytails', genes_to_randomize=None, spline_method='bs', n_randomizations=100, grid_points=None, pseudo=1e-300, random_state=None, verbose=True, kld_method='original')#

Runs singleCellHaystack.

Parameters:
  • x – AnnData, numpy array or scipy sparse matrix.

  • coord – a numpy array with 1D pseudotime, 2D or 3D spatial coordinates or an embedding with any number of dimensions.

  • features – a list of strings with feature names. If None for AnnData objects is adata.var_names and a numeric index for arrays.

  • layer – layer to use for AnnData objects. If None then adata.X is used.

  • scale_coord – whether to scale input coordinates.

  • ngrid_points – number of grid points.

  • n_genes_to_randomize – number of genes to use for randomization.

  • select_genes_randomize_method – method used to select genes for randomization. One of “heavytails” (default) or uniform.

  • genes_to_randomize – list of genes to randomize.

  • spline_method – spline method used for randomizations. One of bs (default) or ns.

  • n_randomizations – number of randomizations.

  • grid_points – array with grid coordinates.

  • pseudo – pseudo count added to counts.

  • random_state – random seed or random state.

  • verbose – whether to output messages when running haystack.

  • kld_method – method used to compute KLD.

Returns:

A list with singleCellHaystack results.

Return type:

list