moducomp 0.7.12__py3-none-any.whl → 0.7.13__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.12"
5
+ __version__ = "0.7.13"
6
6
  __author__ = "Juan C. Villada"
7
7
  __email__ = "jvillada@lbl.gov"
8
8
  __title__ = "moducomp"
moducomp/moducomp.py CHANGED
@@ -3762,7 +3762,19 @@ def download_eggnog_data(
3762
3762
  data_dir.mkdir(parents=True, exist_ok=True)
3763
3763
  logger.info("Downloading eggNOG data into %s", data_dir)
3764
3764
 
3765
- downloader = shutil.which("download_eggnog_data.py")
3765
+ downloader = None
3766
+ for path_entry in os.environ.get("PATH", "").split(os.pathsep):
3767
+ candidate = Path(path_entry) / "download_eggnog_data.py"
3768
+ if not candidate.is_file() or not os.access(candidate, os.X_OK):
3769
+ continue
3770
+ try:
3771
+ wrapper_text = candidate.read_text(encoding="utf-8", errors="ignore")
3772
+ except OSError:
3773
+ wrapper_text = ""
3774
+ if "moducomp.moducomp" in wrapper_text and "download_eggnog_data_cli" in wrapper_text:
3775
+ continue
3776
+ downloader = str(candidate)
3777
+ break
3766
3778
  if downloader is None:
3767
3779
  message = (
3768
3780
  "download_eggnog_data.py not found in PATH. "
@@ -3883,9 +3895,10 @@ def download_eggnog_data(
3883
3895
 
3884
3896
 
3885
3897
  def download_eggnog_data_cli() -> None:
3886
- """Entry point for the download-eggnog-data script."""
3898
+ """Entry point for download-eggnog-data/download_eggnog_data.py scripts."""
3899
+ prog = Path(sys.argv[0]).name if sys.argv else "download-eggnog-data"
3887
3900
  app(
3888
- prog_name="download-eggnog-data",
3901
+ prog_name=prog,
3889
3902
  args=["download-eggnog-data", *sys.argv[1:]],
3890
3903
  )
3891
3904
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moducomp
3
- Version: 0.7.12
3
+ Version: 0.7.13
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>
@@ -60,16 +60,16 @@ pixi global install \
60
60
 
61
61
  ## Setup data (required)
62
62
 
63
- `moducomp` needs the eggNOG-mapper database to run. Download it once:
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
65
  ```bash
66
66
  export EGGNOG_DATA_DIR="/path/to/eggnog-data"
67
- moducomp download-eggnog-data --eggnog-data-dir "$EGGNOG_DATA_DIR"
68
- # or the standalone script:
69
- # download_eggnog_data.py
67
+ download_eggnog_data.py --eggnog-data-dir "$EGGNOG_DATA_DIR"
68
+ # equivalent:
69
+ # moducomp download-eggnog-data --eggnog-data-dir "$EGGNOG_DATA_DIR"
70
70
  ```
71
71
 
72
- If `EGGNOG_DATA_DIR` is not set, `moducomp download-eggnog-data` defaults to `${XDG_DATA_HOME:-~/.local/share}/moducomp/eggnog`.
72
+ If `EGGNOG_DATA_DIR` is not set, the downloader defaults to `${XDG_DATA_HOME:-~/.local/share}/moducomp/eggnog`.
73
73
 
74
74
  ### Quick test
75
75
 
@@ -260,7 +260,7 @@ moducomp validate /path/to/output --strict
260
260
  You can override the bundled data location with `MODUCOMP_DATA_DIR`.
261
261
  When working from source, the bundled test genomes live at `moducomp/data/test_genomes`.
262
262
 
263
- `download_eggnog_data.py` is provided by eggnog-mapper and is available in the Pixi environment (or via `pixi global` installs).
263
+ `download_eggnog_data.py` is exposed by `moducomp` as a convenience wrapper for the eggnog-mapper downloader and is available in the Pixi environment (including `pixi global` installs).
264
264
 
265
265
  Pixi task (supports passing a custom location):
266
266
 
@@ -0,0 +1,11 @@
1
+ moducomp/__init__.py,sha256=4JZhb_CRk2p0sYjkmp2gH__rAKsrR1CdZshT9XGbXEg,659
2
+ moducomp/__main__.py,sha256=1O2pv6IGjUgqnbqsiMLtVqjxWQpRtZUjp8LDljZ1bsI,185
3
+ moducomp/moducomp.py,sha256=ntC6RHC1yb5Pa3WFFEASfkvG6z_fSc0q12PDbjGxsLQ,178488
4
+ moducomp/data/test_genomes/IMG2562617132.faa,sha256=gZPh-08pMRdAWJRr3__TbnU1F68CdkDb3gxtpaCLTTc,356863
5
+ moducomp/data/test_genomes/IMG2568526683.faa,sha256=PxFJwe-68UGw7il1hGlNhZt4-2WzzxXxGE1GTskDnow,343109
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,,
@@ -1,4 +1,5 @@
1
1
  [console_scripts]
2
2
  download-eggnog-data=moducomp.moducomp:download_eggnog_data_cli
3
+ download_eggnog_data.py=moducomp.moducomp:download_eggnog_data_cli
3
4
  moducomp=moducomp.moducomp:app
4
5
 
@@ -1,11 +0,0 @@
1
- moducomp/__init__.py,sha256=P0sHK6IWgEersAkHlDWWFlWULUH_C-ytp5vStZDJqiY,659
2
- moducomp/__main__.py,sha256=1O2pv6IGjUgqnbqsiMLtVqjxWQpRtZUjp8LDljZ1bsI,185
3
- moducomp/moducomp.py,sha256=9eLxngLe0zRcevy6x9a-80-MGUjIEOYLTCQr6crnYRM,177904
4
- moducomp/data/test_genomes/IMG2562617132.faa,sha256=gZPh-08pMRdAWJRr3__TbnU1F68CdkDb3gxtpaCLTTc,356863
5
- moducomp/data/test_genomes/IMG2568526683.faa,sha256=PxFJwe-68UGw7il1hGlNhZt4-2WzzxXxGE1GTskDnow,343109
6
- moducomp/data/test_genomes/IMG2740892217.faa,sha256=WsId4sIPxENbqF6tYFouAgDCy6T0SXNY6TywxBNe-3E,548954
7
- moducomp-0.7.12.dist-info/entry_points.txt,sha256=dwt0_w7Ex9p1vhfp2fl4WXJLBh50u9fXTRNlAOJkAd4,114
8
- moducomp-0.7.12.dist-info/licenses/LICENSE.txt,sha256=pt0cfIq9Wop21KDZYyQgP0M1YWYvKG0PomA5cUDC4TI,1536
9
- moducomp-0.7.12.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
10
- moducomp-0.7.12.dist-info/METADATA,sha256=L7JsOoEk8dYNWZcCWmmQXy1ZPow3iRb_d7XrSsanOAg,21146
11
- moducomp-0.7.12.dist-info/RECORD,,