ovrlpy.sample_expression_at_xy

ovrlpy.sample_expression_at_xy(df, sampling_points_x, sampling_points_y, genes=None, KDE_bandwidth=1, min_expression=0)

Returns a matrix of gene expression vectors at each local maximum.

Parameters:
  • df (DataFrame) – A dataframe of coordinates that will be sampled for gene expression.

  • sampling_points_x (list) – x-coordinates to sample gene expression at.

  • sampling_points_y (list) – y-coordinates to sample gene expression at.

  • genes (list, optional) – list of genes to sample expression for. Defaults to all genes in the dataframe.

  • KDE_bandwidth (float, optional) – Bandwidth of the Gaussian smoothing function used during the KDE.

  • min_expression (float, optional) – A minimal expression threshold to report as local maximum regions of interest.

Return type:

DataFrame