netmap.utils.tf_utils.filter_tf_names

netmap.utils.tf_utils.filter_tf_names(tf_genes, adata, tfs_only=True)[source]

Filter the transcription factor list using an AnnData object.

Parameters:
  • tf_genes (list) – List of transcription factor names.

  • adata (AnnData) – AnnData object whose var_names define the gene universe.

  • tfs_only (bool) – If True, return only transcription factors present in adata; if False, return the full set of genes from adata as pseudo-TFs.

Returns:

(tfs_indexes, tf_genes) where tfs_indexes is a list of

integer positions in adata.var and tf_genes is the filtered set of TF names.

Return type:

tuple