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

ImportError: cannot import name 'default_motifs' from 'gimmemotifs.motif' #214

Open
chuyaowang opened this issue Aug 31, 2024 · 2 comments

Comments

@chuyaowang
Copy link

I have encountered this error:

ImportError: cannot import name 'default_motifs' from 'gimmemotifs.motif' (/opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/gimmemotifs/motif/__init__.py)

This happened after I ran pip uninstall gimmemotifs and conda install -c bioconda gimmemotifs in an attempt to resolve the killed kernel issue. The installation was smooth, but gimmemotifs no longer works.

The killed kernel issue happened when I was running tfi.scan(fpr=0.02, motifs=None, verbose=True). The progress bar stayed at 0 for about 1 hour. I checked my CPU usage and found it very low, so I thought my kernel must have been killed. On my machine I have 16 GB of RAM and 16 GB of swap disk, could it be a memory issue? My data have about 17000 peaks and uses the hg38 reference genome and the default vertebrate motifs.

Here is full error report:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 import celloracle as co
      2 from celloracle import motif_analysis as ma
      3 from celloracle.utility import save_as_pickled_object

File /opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/celloracle/__init__.py:8
      5 import warnings
      6 import logging
----> 8 from . import utility, network, network_analysis, go_analysis, data, data_conversion, oracle_utility
      9 from .trajectory.oracle_core import Oracle
     10 from .network import Net

File /opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/celloracle/utility/__init__.py:18
      7 from .make_log import makelog
      9 from .utility import (save_as_pickled_object, load_pickled_object,
     10                       intersect,
     11                       exec_process,
   (...)
     16                       knn_data_transferer,
     17                       update_adata)
---> 18 from .load_hdf5 import load_hdf5
     20 from .pandas_utility_for_jupyternotebook import init_datatable_mode
     22 from .package_version_checker import check_python_requirements

File /opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/celloracle/utility/load_hdf5.py:8
      6 from ..network import load_net
      7 from ..trajectory.oracle_core import load_oracle
----> 8 from ..motif_analysis.tfinfo_core import load_TFinfo
      9 from ..applications.differentiation_flow import load_gradient
     11 def load_hdf5(file_path, object_class_name=None):

File /opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/celloracle/motif_analysis/__init__.py:13
     11 from .motif_analysis_utility import is_genome_installed
     12 from .process_bed_file import peak2fasta, read_bed, remove_zero_seq, check_peak_format
---> 13 from .tfinfo_core import (load_TFinfo, load_TFinfo_from_parquets,
     14                           make_TFinfo_from_scanned_file, TFinfo, scan_dna_for_motifs)
     15 from .reference_genomes import SUPPORTED_REF_GENOME
     16 from .tss_annotation import get_tss_info

File /opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/celloracle/motif_analysis/tfinfo_core.py:36
     33 from genomepy import Genome
     35 from gimmemotifs.motif import Motif
---> 36 from gimmemotifs.motif import default_motifs
     37 from gimmemotifs.scanner import Scanner
     39 from ..utility.hdf5_processing import dump_hdf5, load_hdf5

ImportError: cannot import name 'default_motifs' from 'gimmemotifs.motif' (/opt/miniconda3/envs/celloracle/lib/python3.10/site-packages/gimmemotifs/motif/__init__.py)
@PedroMBarcelos
Copy link

Hello, I am having the same problem.
I downgraded to gimmemotifs 0.14.4 and it was able to import, but the kernel problem persisted.
Did you find a solution?

@baoa2ta
Copy link

baoa2ta commented Oct 20, 2024

Hi I am having the same issue where python keeps killing the process when running tfi.scan(fpr=0.02, motifs=None, verbose=True). My process bar runs to 100% then gets killed. I'm using the default motif set and have 25k peaks. Anyone has the solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants