simba.tl.find_target_genes
- simba.tl.find_target_genes(adata_all, adata_PM, list_tf_motif=None, list_tf_gene=None, adata_CP=None, metric='euclidean', anno_filter='entity_anno', filter_peak='peak', filter_gene='gene', n_genes=200, cutoff_gene=None, cutoff_peak=1000, use_precomputed=True)[source]
For a given TF, infer its target genes
- Parameters:
adata_all (AnnData) – Anndata object storing SIMBA embedding of all entities.
adata_PM (AnnData) – Peaks-by-motifs anndata object.
list_tf_motif (list) – A list of TF motifs. They should match TF motifs in list_tf_gene.
list_tf_gene (list) – A list TF genes. They should match TF motifs in list_tf_motif.
adata_CP (AnnData, optional (default: None)) – When
use_precomputed
is True, it can be set Nonemetric (str, optional (default: “euclidean”)) – The distance metric to use. It can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’, ‘correlation’, ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘jensenshannon’, ‘kulsinski’, ‘mahalanobis’, ‘matching’, ‘minkowski’, ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’, ‘yule’.
anno_filter (str, optional (default: None)) – The annotation of filter to use. It should be one of
adata.obs_keys()
filter_gene (str, optional (default: None)) – The filter for gene. It should be in
adata.obs[anno_filter]
filter_peak (str, optional (default: None)) – The filter for peak. It should be in
adata.obs[anno_filter]
n_genes (int, optional (default: 200)) – The number of neighbor genes to consider initially around TF gene or TF motif
cutoff_gene (float, optional (default: None)) – Cutoff of “average_rank”
cutoff_peak (int, optional (default: 1000)) – Cutoff for peaks-associated ranks, including “rank_peak_to_gene” and “rank_peak_to_TFmotif”.
use_precomputed (bool, optional (default: True)) – Distances calculated between genes, peaks, and motifs (stored in adata.uns[‘tf_targets’]) will be imported
- Returns:
dict_tf_targets (dict) – Target genes for each TF.
updates adata with the following fields.
tf_targets (dict, (adata.uns[‘tf_targets’])) – Distances calculated between genes, peaks, and motifs