Skip to content

Commit

Permalink
chore: Import 'update_dict' inside function to fix circular import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chansigit committed Jul 3, 2024
1 parent d77e7f9 commit 52f9542
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dynamo/preprocessing/cell_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def group_corr(adata: anndata.AnnData, layer: Union[str, None], gene_list: list)
the mean expression of all genes in the list.
"""
from ..tools.utils import einsum_correlation, log1p_

# returns list of correlations of each gene within a list of genes with the total expression of the group
tmp = adata.var_names.intersection(gene_list)
# get the location of gene names
Expand Down Expand Up @@ -106,6 +107,7 @@ def group_score(adata: anndata.AnnData, layer: Union[str, None], gene_list: List
The Z-scored expression data.
"""
from ..tools.utils import log1p_

tmp = adata.var_names.intersection(gene_list)
# use indices
intersect_genes = [adata.var_names.get_loc(i) for i in tmp]
Expand Down
2 changes: 1 addition & 1 deletion dynamo/preprocessing/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
main_info_insert_adata_obsm,
main_warning,
)
from ..tools.utils import update_dict
from ..utils import copy_adata
from .cell_cycle import cell_cycle_scores
from .gene_selection import calc_dispersion_by_svr
Expand Down Expand Up @@ -1785,6 +1784,7 @@ def _select_genes_monocle_legacy(
for downstream analysis. adata will be subsetted with only the genes pass filter if keep_unflitered is set to be
False.
"""
from ..tools.utils import update_dict

filter_bool = (
adata.var["pass_basic_filter"]
Expand Down

0 comments on commit 52f9542

Please sign in to comment.