Skip to content

Commit 9b1f47f

Browse files
author
xfchen0912
committed
Fix motif_data bugs
1 parent 002da4b commit 9b1f47f

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ._plot1cell import plot1cell
1+
# from ._plot1cell import plot1cell
22
from .liana import LianaVisualizer
33

4-
__all__ = ["LianaVisualizer", "plot1cell"]
4+
__all__ = ["LianaVisualizer"]

src/scmagnify/tools/_func_enrich.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
from rich.table import Table
1313

1414
# Import your package to get its file path
15-
import scmagnify as scm
1615
from scmagnify import logging as logg
16+
from scmagnify.settings import settings
1717

1818
if TYPE_CHECKING:
1919
from typing import Any
2020

2121
__all__ = ["FuncEnrich"]
2222

2323
# Define the default directory for gene sets within the package
24-
GENESET_DIR = os.path.join(os.path.dirname(scm.__file__), "data", "genesets")
24+
if os.path.exists(settings.scm_data):
25+
GENESET_DIR = os.path.join(settings.scm_data, "genesets")
26+
else:
27+
GENESET_DIR = None
2528

2629

2730
# ==============================================================================

src/scmagnify/tools/_motif_scan.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
]
4141

4242
_BACKGROUND = Literal["subject", "genome", "even"]
43-
MOTIF_DIR = os.path.join(settings.scm_data, "motifs")
43+
if os.path.exists(settings.scm_data):
44+
MOTIF_DIR = os.path.join(settings.scm_data, "motifs")
45+
else:
46+
MOTIF_DIR = None
4447

4548

4649
def _add_peak_seq(

src/scmagnify/tools/_tensor_decomp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
self.filtered_network = self.network.copy()
8585
for attri in self.network.columns[2:-1]:
8686
self.filtered_network[attri] = filter_network(
87-
self.network, attri=attri, method=filter[0], param=filter[1], binarize=filter[2], verbose=False
87+
self.network, attri=attri, method=filter[0], param=filter[1], binarize=filter[2], verbose=True
8888
)[attri]
8989

9090
logg.info(f"Filtering Network: \n Method: {filter[0]} \n Parameter: {filter[1]} \n Binarize: {filter[2]}")

0 commit comments

Comments
 (0)