vcontact2: Error in protein module computation

Issue #84 new
Former user created an issue

Hi, I ran the following and obtained the error: vcontact2: Error in protein module computation.

vcontact2 --raw-proteins filtered_phages_clean.faa --proteins-fp phages_genomes_g2g.csv --db 'ProkaryoticViralRefSeq211-Merged' --pcs-mode MCL --vcs-mode ClusterONE --c1-bin conda/envs/vContact2/bin/cluster_one-1.0.jar --output-dir /vcontact2_silage -t 14

I look around in the issues but I could not find anything similar previously report. I also recently re install the tool using conda.

can someone please point to me what I am doing wrong?

?[1;42mINFO?[1;0m:vcontact2.modules: Loading the clustering results
?[1;41mERROR?[1;0m:vcontact2: Error in protein module computation
?[1;41mERROR?[1;0m:vcontact2: Inexact indices into sparse matrices are not allowed
Traceback (most recent call last):
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 208, in isintlike
    operator.index(x)
TypeError: 'float' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/bin/vcontact2", line 724, in main
    modules = vcontact2.modules.Modules(pcp, output_dir, threshold=args.mod_sig, inflation=args.mod_inflation,
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/vcontact2/modules.py", line 65, in __init__
    self.matrix_module = self.module_in_contigs()  # Calls self.matrix, returns matrix w/ proportion of module's PCs in contig
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/vcontact2/modules.py", line 198, in module_in_contigs
    N[:, m] = matrix[:, pos].sum(1)
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_lil.py", line 332, in __setitem__
    IndexMixin.__setitem__(self, key, x)
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_index.py", line 97, in __setitem__
    row, col = self._validate_indices(key)
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_index.py", line 161, in _validate_indices
    if isintlike(col):
  File "/beegfs/work/workspace/ws/ho_kezau83-conda-0/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 216, in isintlike
    raise ValueError(msg)
ValueError: Inexact indices into sparse matrices are not allowed

Thank you for your help.

Best,

Johan Sebastián

Comments (5)

  1. Mei Mei

    I met the same problem as Johan's.

    I checked all the dependencies, and they are subject to the demands.

    Conda list:

    # Name                    Version                   Build  Channel
    _libgcc_mutex             0.1                 conda_forge    conda-forge
    _openmp_mutex             4.5                       2_gnu    conda-forge
    backports-functools-lru-cache 1.6.4                    pypi_0    pypi
    biopython                 1.79            py310h5764c6d_2    conda-forge
    blast                     2.13.0               hf3cf87c_0    bioconda
    blosc                     1.21.1               h83bc5f7_3    conda-forge
    boost-cpp                 1.74.0               h75c5d50_8    conda-forge
    bzip2                     1.0.8                h7f98852_4    conda-forge
    c-ares                    1.18.1               h7f98852_0    conda-forge
    ca-certificates           2022.6.15            ha878542_0    conda-forge
    certifi                   2022.6.15                pypi_0    pypi
    charset-normalizer        2.1.0                    pypi_0    pypi
    click                     6.7                      pypi_0    pypi
    click-log                 0.1.8                    pypi_0    pypi
    clusterone                0.15.3                   pypi_0    pypi
    colorama                  0.4.5                    pypi_0    pypi
    coreapi                   2.3.3                    pypi_0    pypi
    coreapi-cli               1.0.9                    pypi_0    pypi
    coreschema                0.0.4                    pypi_0    pypi
    curl                      7.83.1               h2283fc2_0    conda-forge
    diamond                   2.0.15               hb97b32f_1    bioconda
    distlib                   0.3.5                    pypi_0    pypi
    entrez-direct             16.2                 he881be0_1    bioconda
    enum34                    1.1.10                   pypi_0    pypi
    filelock                  3.7.1                    pypi_0    pypi
    gettext                   0.19.8.1          h73d1719_1008    conda-forge
    gitdb                     4.0.9                    pypi_0    pypi
    gitpython                 3.1.27                   pypi_0    pypi
    hdf5                      1.12.1          nompi_h4df4325_104    conda-forge
    icu                       70.1                 h27087fc_0    conda-forge
    idna                      3.3                      pypi_0    pypi
    iso8601                   1.0.2                    pypi_0    pypi
    itypes                    1.2.0                    pypi_0    pypi
    jinja2                    3.1.2                    pypi_0    pypi
    joblib                    1.1.0                    pypi_0    pypi
    keyutils                  1.6.1                h166bdaf_0    conda-forge
    krb5                      1.19.3               h08a2579_0    conda-forge
    ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
    libblas                   3.9.0           15_linux64_openblas    conda-forge
    libcblas                  3.9.0           15_linux64_openblas    conda-forge
    libcurl                   7.83.1               h2283fc2_0    conda-forge
    libedit                   3.1.20191231         he28a2e2_2    conda-forge
    libev                     4.33                 h516909a_1    conda-forge
    libffi                    3.4.2                h7f98852_5    conda-forge
    libgcc-ng                 12.1.0              h8d9b700_16    conda-forge
    libgfortran-ng            12.1.0              h69a702a_16    conda-forge
    libgfortran5              12.1.0              hdcd56e2_16    conda-forge
    libgomp                   12.1.0              h8d9b700_16    conda-forge
    libidn2                   2.3.3                h166bdaf_0    conda-forge
    liblapack                 3.9.0           15_linux64_openblas    conda-forge
    libnghttp2                1.47.0               he49606f_0    conda-forge
    libnsl                    2.0.0                h7f98852_0    conda-forge
    libopenblas               0.3.20          pthreads_h78a6416_1    conda-forge
    libssh2                   1.10.0               ha35d2d1_2    conda-forge
    libstdcxx-ng              12.1.0              ha89aaad_16    conda-forge
    libunistring              0.9.10               h7f98852_0    conda-forge
    libuuid                   2.32.1            h7f98852_1000    conda-forge
    libzlib                   1.2.12               h166bdaf_2    conda-forge
    lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
    lzo                       2.10              h516909a_1000    conda-forge
    markupsafe                2.1.1                    pypi_0    pypi
    mcl                       14.137          pl5321hec16e2b_8    bioconda
    ncurses                   6.3                  h27087fc_1    conda-forge
    networkx                  2.8.5                    pypi_0    pypi
    nomkl                     1.0                  h5ca1d4c_0    conda-forge
    numexpr                   2.8.3           py310hf05e7a9_100    conda-forge
    numpy                     1.23.1          py310h53a5b5f_0    conda-forge
    openssl                   3.0.5                h166bdaf_1    conda-forge
    packaging                 21.3                     pypi_0    pypi
    pandas                    1.4.3           py310h769672d_0    conda-forge
    pandoc                    2.19                 ha770c72_0    conda-forge
    pcre                      8.45                 h9c3ff4c_0    conda-forge
    perl                      5.32.1          2_h7f98852_perl5    conda-forge
    perl-archive-tar          2.40            pl5321hdfd78af_0    bioconda
    perl-carp                 1.50            pl5321hd8ed1ab_0    conda-forge
    perl-common-sense         3.75            pl5321hdfd78af_0    bioconda
    perl-compress-raw-bzip2   2.201           pl5321h87f3376_1    bioconda
    perl-compress-raw-zlib    2.105           pl5321h87f3376_0    bioconda
    perl-encode               3.19            pl5321hec16e2b_1    bioconda
    perl-exporter             5.74            pl5321hd8ed1ab_0    conda-forge
    perl-exporter-tiny        1.002002        pl5321hdfd78af_0    bioconda
    perl-extutils-makemaker   7.64            pl5321hd8ed1ab_0    conda-forge
    perl-io-compress          2.106           pl5321h87f3376_1    bioconda
    perl-io-zlib              1.11            pl5321hdfd78af_0    bioconda
    perl-json                 4.09            pl5321hdfd78af_0    bioconda
    perl-json-xs              2.34            pl5321h9f5acd7_5    bioconda
    perl-list-moreutils       0.430           pl5321hdfd78af_0    bioconda
    perl-list-moreutils-xs    0.430           pl5321hec16e2b_1    bioconda
    perl-parent               0.238           pl5321hd8ed1ab_0    conda-forge
    perl-pathtools            3.75            pl5321hec16e2b_3    bioconda
    perl-scalar-list-utils    1.63            pl5321h166bdaf_0    conda-forge
    perl-types-serialiser     1.01            pl5321hdfd78af_0    bioconda
    pip                       22.2.2                   pypi_0    pypi
    platformdirs              2.5.2                    pypi_0    pypi
    psutil                    5.9.1           py310h5764c6d_0    conda-forge
    py                        1.6.0                    pypi_0    pypi
    pypandoc                  1.8.1                    pypi_0    pypi
    pyparsing                 3.0.9                    pypi_0    pypi
    pytables                  3.7.0           py310hf5df6ce_0    conda-forge
    python                    3.10.5          ha86cf86_0_cpython    conda-forge
    python-dateutil           2.8.2                    pypi_0    pypi
    python_abi                3.10                    2_cp310    conda-forge
    pytz                      2022.1                   pypi_0    pypi
    pytz-deprecation-shim     0.1.0.post0              pypi_0    pypi
    raven                     6.10.0                   pypi_0    pypi
    readline                  8.1.2                h0f457ee_0    conda-forge
    requests                  2.28.1                   pypi_0    pypi
    scikit-learn              1.1.2           py310h0c3af53_0    conda-forge
    scipy                     1.9.0           py310hdfbd76f_0    conda-forge
    setuptools                63.4.2          py310hff52083_0    conda-forge
    six                       1.16.0                   pypi_0    pypi
    smmap                     5.0.0                    pypi_0    pypi
    snappy                    1.1.9                hbd366e4_1    conda-forge
    sqlite                    3.39.2               h4ff8645_0    conda-forge
    terminaltables            3.1.10                   pypi_0    pypi
    threadpoolctl             3.1.0                    pypi_0    pypi
    tk                        8.6.12               h27826a3_0    conda-forge
    tzdata                    2022.1                   pypi_0    pypi
    tzlocal                   4.2                      pypi_0    pypi
    uritemplate               4.1.1                    pypi_0    pypi
    urllib3                   1.26.11                  pypi_0    pypi
    vcontact2                 0.11.3                   pypi_0    pypi
    virtualenv                20.16.3                  pypi_0    pypi
    wget                      1.20.3               ha35d2d1_1    conda-forge
    wheel                     0.37.1                   pypi_0    pypi
    xz                        5.2.5                h516909a_1    conda-forge
    zlib                      1.2.12               h166bdaf_2    conda-forge
    zstd                      1.5.2                h8a70e8d_3    conda-forge
    

    Here’s my command:

    vcontact2 --rel-mode Diamond --pcs-mode MCL --vcs-mode ClusterONE --c1-bin /data/conda/envs/vContact2/bin/cluster_one-1.0.jar --raw-proteins prot_aa.fa.txt --proteins-fp out_map.csv --db 'ProkaryoticViralRefSeq94-Merged' --threads 10 --output-dir out_dir
    

    No generic_by_genome_overview.csv generated.

    INFO:vcontact2.modules: Loading the clustering results
    ERROR:vcontact2: Error in protein module computation
    ERROR:vcontact2: Inexact indices into sparse matrices are not allowed
    Traceback (most recent call last):
      File "/data/p302701/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 208, in isintlike
        operator.index(x)
    TypeError: 'float' object cannot be interpreted as an integer
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/data/conda/envs/vContact2/bin/vcontact2", line 724, in main
        modules = vcontact2.modules.Modules(pcp, output_dir, threshold=args.mod_sig, inflation=args.mod_inflation,
      File "/data/conda/envs/vContact2/lib/python3.10/site-packages/vcontact2/modules.py", line 65, in __init__
        self.matrix_module = self.module_in_contigs()  # Calls self.matrix, returns matrix w/ proportion of module's PCs in contig
      File "/data/conda/envs/vContact2/lib/python3.10/site-packages/vcontact2/modules.py", line 198, in module_in_contigs
        N[:, m] = matrix[:, pos].sum(1)
      File "/data/p302701/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_lil.py", line 332, in __setitem__
        IndexMixin.__setitem__(self, key, x)
      File "/data/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_index.py", line 97, in __setitem__
        row, col = self._validate_indices(key)
      File "/data/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_index.py", line 161, in _validate_indices
        if isintlike(col):
      File "/data/conda/envs/vContact2/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 216, in isintlike
        raise ValueError(msg)
    ValueError: Inexact indices into sparse matrices are not allowed
    

    It seems it’s the problem with the package, scipy. But I have no idea what’s going on.

    Looking for help. Thanks in advance!

    Greets,

    Mei

  2. Cassie S

    Hi there,

    I’m also having this problem :(

    I reinstalled scipy to 1.6.0 but still no luck. Anything else it could be?

    Thanks,

    Cassie

  3. Cassie S

    Okay update for me as well (for anyone that may also be struggling like I was) - I had to revert my python back to v2.9 (I was using the newest) and then I could revert to scipy 1.6.0 and it worked for me! woohoo

  4. Jinghong Xu

    Hi Cassie S,I met the same problem with you. Will python v2.9 makes mistake? The author said python >=3.7

  5. Log in to comment