moducomp 0.7.13__py3-none-any.whl → 0.7.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
moducomp/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
  moducomp: metabolic module completeness and complementarity for microbiomes.
3
3
  """
4
4
 
5
- __version__ = "0.7.13"
5
+ __version__ = "0.7.14"
6
6
  __author__ = "Juan C. Villada"
7
7
  __email__ = "jvillada@lbl.gov"
8
8
  __title__ = "moducomp"
moducomp/moducomp.py CHANGED
@@ -145,15 +145,23 @@ def require_eggnog_data_dir(eggnog_data_dir: Optional[str], logger: Optional[log
145
145
  if eggnog_data_dir:
146
146
  os.environ["EGGNOG_DATA_DIR"] = eggnog_data_dir
147
147
 
148
- env_value = os.environ.get("EGGNOG_DATA_DIR", "")
149
- if not env_value.strip():
150
- message = (
151
- "EGGNOG_DATA_DIR is required to run eggNOG-mapper. "
152
- "Set the EGGNOG_DATA_DIR environment variable or pass --eggnog-data-dir. "
153
- "Download the data with: download_eggnog_data.py or moducomp download-eggnog-data"
154
- )
155
- emit_error(message, logger)
156
- raise typer.Exit(1)
148
+ env_value = os.environ.get("EGGNOG_DATA_DIR", "").strip()
149
+ if not env_value:
150
+ default_dir = default_eggnog_data_dir()
151
+ if default_dir.exists() and default_dir.is_dir() and any(default_dir.iterdir()):
152
+ os.environ["EGGNOG_DATA_DIR"] = str(default_dir)
153
+ env_value = str(default_dir)
154
+ if logger:
155
+ logger.info("EGGNOG_DATA_DIR not set; using default %s", env_value)
156
+ else:
157
+ message = (
158
+ "EGGNOG_DATA_DIR is required to run eggNOG-mapper. "
159
+ "Set the EGGNOG_DATA_DIR environment variable or pass --eggnog-data-dir. "
160
+ f"Default location is {default_dir}. "
161
+ "Download the data with: download_eggnog_data.py or moducomp download-eggnog-data"
162
+ )
163
+ emit_error(message, logger)
164
+ raise typer.Exit(1)
157
165
 
158
166
  data_dir = Path(env_value).expanduser().resolve()
159
167
  if not data_dir.exists() or not data_dir.is_dir():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moducomp
3
- Version: 0.7.13
3
+ Version: 0.7.14
4
4
  Summary: moducomp: metabolic module completeness and complementarity for microbiomes.
5
5
  Keywords: bioinformatics,microbiome,metabolic,kegg,genomics
6
6
  Author-email: "Juan C. Villada" <jvillada@lbl.gov>
@@ -62,6 +62,14 @@ pixi global install \
62
62
 
63
63
  `moducomp` needs the eggNOG-mapper database to run. The primary (recommended) way to download it is using the `download_eggnog_data.py` wrapper, which mirrors the upstream downloader behavior. For upstream details, see the eggNOG-mapper setup guide: [eggNOG-mapper database setup](https://github.com/eggnogdb/eggnog-mapper/wiki/eggNOG-mapper-v2.1.5-to-v2.1.13#user-content-Setup).
64
64
 
65
+ ```bash
66
+ download_eggnog_data.py
67
+ ```
68
+
69
+ By default, the data are stored in `${XDG_DATA_HOME:-~/.local/share}/moducomp/eggnog`, and `moducomp` will auto-detect that location without needing `EGGNOG_DATA_DIR`.
70
+
71
+ To use a custom location:
72
+
65
73
  ```bash
66
74
  export EGGNOG_DATA_DIR="/path/to/eggnog-data"
67
75
  download_eggnog_data.py --eggnog-data-dir "$EGGNOG_DATA_DIR"
@@ -69,8 +77,6 @@ download_eggnog_data.py --eggnog-data-dir "$EGGNOG_DATA_DIR"
69
77
  # moducomp download-eggnog-data --eggnog-data-dir "$EGGNOG_DATA_DIR"
70
78
  ```
71
79
 
72
- If `EGGNOG_DATA_DIR` is not set, the downloader defaults to `${XDG_DATA_HOME:-~/.local/share}/moducomp/eggnog`.
73
-
74
80
  ### Quick test
75
81
 
76
82
  Small test data sets ship with `moducomp`. After installation you can confirm the pipeline by running:
@@ -1,11 +1,11 @@
1
- moducomp/__init__.py,sha256=4JZhb_CRk2p0sYjkmp2gH__rAKsrR1CdZshT9XGbXEg,659
1
+ moducomp/__init__.py,sha256=X6clbSkbbep0QQrY0sh9zG3HV2dI9AErsPMaQ5342hM,659
2
2
  moducomp/__main__.py,sha256=1O2pv6IGjUgqnbqsiMLtVqjxWQpRtZUjp8LDljZ1bsI,185
3
- moducomp/moducomp.py,sha256=ntC6RHC1yb5Pa3WFFEASfkvG6z_fSc0q12PDbjGxsLQ,178488
3
+ moducomp/moducomp.py,sha256=Xdtjsx-BAmhZ3LXZgfuGUTzF46Q4bHSjMfvYTrkjLOY,178931
4
4
  moducomp/data/test_genomes/IMG2562617132.faa,sha256=gZPh-08pMRdAWJRr3__TbnU1F68CdkDb3gxtpaCLTTc,356863
5
5
  moducomp/data/test_genomes/IMG2568526683.faa,sha256=PxFJwe-68UGw7il1hGlNhZt4-2WzzxXxGE1GTskDnow,343109
6
6
  moducomp/data/test_genomes/IMG2740892217.faa,sha256=WsId4sIPxENbqF6tYFouAgDCy6T0SXNY6TywxBNe-3E,548954
7
- moducomp-0.7.13.dist-info/entry_points.txt,sha256=oIUiacp53fiOCWDXpc2rpq5hS4wDdpasx24EXit3daE,181
8
- moducomp-0.7.13.dist-info/licenses/LICENSE.txt,sha256=pt0cfIq9Wop21KDZYyQgP0M1YWYvKG0PomA5cUDC4TI,1536
9
- moducomp-0.7.13.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
10
- moducomp-0.7.13.dist-info/METADATA,sha256=Aj9sjpYv4eFd1dbRJsyot2NKp_-RMi3x1K2SlXy9wYg,21520
11
- moducomp-0.7.13.dist-info/RECORD,,
7
+ moducomp-0.7.14.dist-info/entry_points.txt,sha256=oIUiacp53fiOCWDXpc2rpq5hS4wDdpasx24EXit3daE,181
8
+ moducomp-0.7.14.dist-info/licenses/LICENSE.txt,sha256=pt0cfIq9Wop21KDZYyQgP0M1YWYvKG0PomA5cUDC4TI,1536
9
+ moducomp-0.7.14.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
10
+ moducomp-0.7.14.dist-info/METADATA,sha256=rvBZ2J1n1NDC05UMDB4NE6jq4IG3QRqMqk5plIsfm-4,21640
11
+ moducomp-0.7.14.dist-info/RECORD,,