opusDSD icon indicating copy to clipboard operation
opusDSD copied to clipboard

Installing using the spec file doesn't include healpy in the environment

Open jamesmkrieger opened this issue 2 years ago • 2 comments

Describe the bug Installing using the spec file doesn't include healpy in the environment. This gives the following error:

(opusdsd-0.3.2b) jkrieger@elnath ~/scipion3/software/em/opusdsd-0.3.2b (main) $ python -m cryodrgn.commands.preprocess -h
Traceback (most recent call last):
  File "/home/jkrieger/miniconda3/envs/opusdsd-0.3.2b/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/jkrieger/miniconda3/envs/opusdsd-0.3.2b/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/data/jkrieger/scipion3/software/em/opusdsd-0.3.2b/cryodrgn/commands/preprocess.py", line 12, in <module>
    from cryodrgn import utils
  File "/data/jkrieger/scipion3/software/em/opusdsd-0.3.2b/cryodrgn/utils.py", line 12, in <module>
    import healpy as hp
ModuleNotFoundError: No module named 'healpy'

To Reproduce

git clone -b main https://github.com/alncat/opusDSD opusdsd-0.3.2b && cd opusdsd-0.3.2b; eval "$(/home/jkrieger/miniconda3/bin/conda shell.bash hook)"&& conda create -y --name opusdsd-0.3.2b --file spec-file && conda activate opusdsd-0.3.2b
python -m cryodrgn.commands.preprocess -h

Expected behavior I would have expected the preprocess script to run in some way and give me help about how to use it. This happens fine when using environment.yml instead:

git clone -b main https://github.com/alncat/opusDSD opusdsd-0.3.2b && cd opusdsd-0.3.2b; eval "$(/home/jkrieger/miniconda3/bin/conda shell.bash hook)"&& conda env create -y --name opusdsd-0.3.2b --file environment.yml && conda activate opusdsd-0.3.2b
python -m cryodrgn.commands.preprocess -h
usage: preprocess.py [-h] -o MRCS [--relion31] [--datadir DATADIR] [--ind PKL] [-D D] [--uninvert-data] [--window-r WINDOW_R] [--no-window] [--no-keep-real] [-b B] [--chunk CHUNK]
                     [--no-lazy] [--max-threads MAX_THREADS]
                     mrcs

Preprocess a dataset for more streamlined cryoDRGN training

positional arguments:
  mrcs                  Input particles or volume (.mrc, .mrcs, .star, or .txt)

optional arguments:
  -h, --help            show this help message and exit
  -o MRCS               Output .mrcs
  --relion31            Flag for relion3.1 star format
  --datadir DATADIR     Optionally provide path to input .mrcs if loading from a .star or .cs file

Image preprocessing settings:
  --ind PKL             Filter particle stack by these indices
  -D D                  New box size in pixels (if downsampling), must be even
  --uninvert-data       Do not invert data sign
  --window-r WINDOW_R   Circular windowing mask inner radius (default: 0.85)
  --no-window           Turn off real space windowing of dataset
  --no-keep-real        Turn off real space windowing of dataset

Extra arguments for volume generation:
  -b B                  Batch size for processing images (default: 5000)
  --chunk CHUNK         Chunksize (in # of images) to split particle stack when saving
  --no-lazy             Load whole dataset (faster than loading in batches)
  --max-threads MAX_THREADS
                        Maximum number of CPU cores for parallelization (default: 16)

Additional context I can't think of anything else that's relevant.

jamesmkrieger avatar Nov 15 '23 17:11 jamesmkrieger

Thank you very much for reporting this! Healpy seems to be missing in the spec-file. I will correct this.

alncat avatar Nov 16 '23 06:11 alncat

You’re welcome

jamesmkrieger avatar Nov 16 '23 08:11 jamesmkrieger