Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jamesmkrieger opened this issue Nov 15, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jamesmkrieger
Copy link
Contributor

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.

@alncat
Copy link
Owner

alncat commented Nov 16, 2023

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

@jamesmkrieger
Copy link
Contributor Author

You’re welcome

@alncat alncat added bug Something isn't working good first issue Good for newcomers labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants