dynamo.pp.filter_genes_by_clusters

dynamo.pp.filter_genes_by_clusters(adata, cluster, min_avg_U=0.02, min_avg_S=0.08, size_limit=40)[source]

Prepare filtering genes on the basis of cluster-wise expression threshold.

This function is taken from velocyto in order to reproduce velocyto’s DentateGyrus notebook.

Parameters:
  • adata (AnnData) – an Anndata object.

  • cluster (str) – a column name in the adata.obs attribute which will be used for cluster specific expression filtering.

  • min_avg_U (float) – include genes that have unspliced average bigger than min_avg_U in at least one of the clusters. Defaults to 0.02.

  • min_avg_S (float) – include genes that have spliced average bigger than min_avg_U in at least one of the clusters. Defaults to 0.08.

  • size_limit (int) – the max number of members to be considered in a cluster during calculation. Defaults to 40.

Return type:

ndarray

Returns:

A boolean array corresponding to genes selected.