This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bigwigAverage

I'm trying to use bigwigAverage with deepTools version 3.5.4, but I get the error "ModuleNotFoundError: No module named '_struct'...any advice on which python versions and deepTools versions work for bigwigAverage?

deeptools

As noted below this is not an error related to deepTools per se. If you have the ability to install programs then you could follow the instructions below. deepTools should work with python v.2.7 and v.3.x. If you are running an older version of python (or if the system default version is not one of the supported versions) then that could be the issue.

1 answer

Odd. It seems like a problem with the Python installation/environment rather than with bigwigAverage specifically. How did you install deepTools? Have you changed the codebase at all? Have you mixed packages from different installation methods? Have you installed additional packages in a single environment since installing deepTools, potentially perturbing deepTools’ dependencies?

To avoid issues like this, I recommend installing deepTools in its own clean environment or container (or perhaps a separate environment/container just for these kinds of programs—after making sure there aren’t dependency/package conflicts).

For example, a straightforward way to do this is with miniforge (if needed, see the link for installation instructions and more details):

conda create -n deeptools -c conda-forge -c bioconda deeptools  # Using 'mamba' rather than 'conda' here is faster; you may need to install it first, e.g., in your base environment or another one that you use to run env installations (e.g., 'conda install conda-forge::mamba')
conda activate deeptools                                        # Activate the newly created env 'deeptools' to use it; depending on how your system is set up, you could do 'source activate deeptools' too

If the environment already exists and it’s activated, then run

conda activate environment_to_put_deeptools_in  # Run if not already activated
conda install -c conda-forge -c bioconda deeptools

I can’t remember, but I think mamba is part of the Miniforge installation out of the box—so you may be able to just use it in place of conda.

Log in to answer this question.