Skip to content

Commit

Permalink
Merge pull request #55 from aertslab/extra_dependencies
Browse files Browse the repository at this point in the history
move tangermeme dep out of optional dependencies
  • Loading branch information
LukasMahieu authored Nov 15, 2024
2 parents ff2faca + cf06aa5 commit 4d19481
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ pip install torch
pip install crested
```

3. If you plan on doing motif analysis using the tf-modisco (lite) and tangermeme's tomtom functionality inside CREsted, you will need to run the following additional install:
3. If you plan on doing motif analysis using the tf-modisco (lite) inside CREsted, you will need to run the following additional install:

```bash
pip install crested[tfmodisco]
pip install "modisco-lite>=2.2.1"
```

This requires a cmake installation on your system. If you don't have it, you can install it with:
Modiscolite may require a cmake installation on your system. If you don't have it, you can install it with:

```bash
pip install cmake
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ dependencies = [
]

[project.optional-dependencies]
tfmodisco = [
"modisco-lite>=2.2.1",
"tangermeme"
]

dev = [
"pre-commit",
"twine>=4.0.2",
Expand Down
5 changes: 4 additions & 1 deletion src/crested/tl/modisco/_modisco_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ def match_score_patterns(a: dict, b: dict) -> float:
try:
from tangermeme.tools import tomtom as tangermeme_tomtom
except ImportError as e:
raise ImportError("Please install tangermeme to use this function.") from e
raise ImportError(
"Please install tangermeme to use this function with 'pip install tangermeme'. \
Warning: tangermeme also installs torch and may cause issues with a tensorflow environment."
) from e
try:
score = tangermeme_tomtom.tomtom(Qs=[ic_a.T], Ts=[ic_b.T])[0, 0][0]
except Exception as e: # noqa: BLE001
Expand Down

0 comments on commit 4d19481

Please sign in to comment.