nextgenusfs / funannotate

Eukaryotic Genome Annotation Pipeline
http://funannotate.readthedocs.io
BSD 2-Clause "Simplified" License
320 stars 85 forks source link

test run fails with "AttributeError: module 'numpy' has no attribute 'float' ". #903

Closed webbchen closed 1 year ago

webbchen commented 1 year ago

Are you using the latest release? If you are not using the latest release of funannotate, please upgrade, if bug persists then report here.

Describe the bug

The test run after installation with mamba (today, should be fairly new) fails at the retrieval of PFAM results.

also, as you can see in the check-dependencies output below, an error turns up when checking deps:

 ERROR: pslDnaFiler found but error running: pslCDnaFilter: pslCDnaFilter: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

Although I don't think the test run tripped over that one.

[Apr 24 02:10 PM]: OS: Rocky Linux 8.7, 64 cores, ~ 197 GB RAM. Python: 3.8.15
[Apr 24 02:10 PM]: Running 1.8.15
[Apr 24 02:10 PM]: Now parsing 3 genomes
[Apr 24 02:10 PM]: working on Genome one
[Apr 24 02:10 PM]: working on Genome two
[Apr 24 02:10 PM]: working on Genome three
[Apr 24 02:10 PM]: No secondary metabolite annotations found
[Apr 24 02:10 PM]: Summarizing PFAM domain results
Traceback (most recent call last):
  File "/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/funannotate", line 10, in <module>
    sys.exit(main())
  File "/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/lib/python3.8/site-packages/funannotate/funannotate.py", line 716, in main
    mod.main(arguments)
  File "/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/lib/python3.8/site-packages/funannotate/compare.py", line 429, in main
    lib.distance2mds(
  File "/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/lib/python3.8/site-packages/funannotate/library.py", line 10163, in distance2mds
    from sklearn.manifold import MDS
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/manifold/__init__.py", line 5, in <module>
    from ._locally_linear import locally_linear_embedding, LocallyLinearEmbedding
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/manifold/_locally_linear.py", line 17, in <module>
    from ..neighbors import NearestNeighbors
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/neighbors/__init__.py", line 17, in <module>
    from ._nca import NeighborhoodComponentsAnalysis
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/neighbors/_nca.py", line 22, in <module>
    from ..decomposition import PCA
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/decomposition/__init__.py", line 17, in <module>
    from .dict_learning import dict_learning
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/decomposition/dict_learning.py", line 4, in <module>
    from . import _dict_learning
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/decomposition/_dict_learning.py", line 21, in <module>
    from ..linear_model import Lasso, orthogonal_mp_gram, LassoLars, Lars
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/linear_model/__init__.py", line 12, in <module>
    from ._least_angle import (Lars, LassoLars, lars_path, lars_path_gram, LarsCV,
  File "/home/awebb/.local/lib/python3.8/site-packages/sklearn/linear_model/_least_angle.py", line 30, in <module>
    method='lar', copy_X=True, eps=np.finfo(np.float).eps,
  File "/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
#########################################################
ERROR: `funannotate compare` test failed - check logfiles
#########################################################

What command did you issue?

funannotate test -t all --cpus 6

Logfiles content of test-compare_79c5ee21-1077-4713-bac6-d0c1bebbfa4f/compare/funannotate-compare.log: (the step the test got stuck at)

[04/24/23 14:10:47]: /mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/funannotate compare -i Genome_one.gbk Genome_two.gbk Genome_three.gbk -o compare --cpus 6 --ml_model LG+G4 --outgroup botrytis_cinerea.dikarya

[04/24/23 14:10:47]: OS: Rocky Linux 8.7, 64 cores, ~ 197 GB RAM. Python: 3.8.15
[04/24/23 14:10:47]: Running 1.8.15
[04/24/23 14:10:47]: find_enrichment.py version=NA path=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/find_enrichment.py
[04/24/23 14:10:47]: mafft version=v7.520 (2023/Mar/22) path=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/mafft
[04/24/23 14:10:47]: trimal version=trimAl v1.4.rev15 build[2013-12-17] path=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/trimal
[04/24/23 14:10:47]: proteinortho version=6.2.3 path=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/proteinortho
[04/24/23 14:10:47]: iqtree version=NA path=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/bin/iqtree
[04/24/23 14:10:47]: Input files/folders: ['Genome_one.gbk', 'Genome_two.gbk', 'Genome_three.gbk']

[04/24/23 14:10:47]: Now parsing 3 genomes
[04/24/23 14:10:47]: working on Genome one
[04/24/23 14:10:48]: working on Genome two
[04/24/23 14:10:48]: working on Genome three
[04/24/23 14:10:48]: No secondary metabolite annotations found
[04/24/23 14:10:48]: Summarizing PFAM domain results

OS/Install Information

You are running Perl v b'5.032001'. Now checking perl modules... Carp: 1.50 Clone: 0.46 DBD::SQLite: 1.72 DBD::mysql: 4.046 DBI: 1.643 DB_File: 1.855 Data::Dumper: 2.183 File::Basename: 2.85 File::Which: 1.24 Getopt::Long: 2.54 Hash::Merge: 0.302 JSON: 4.10 LWP::UserAgent: 6.67 Logger::Simple: 2.0 POSIX: 1.94 Parallel::ForkManager: 2.02 Pod::Usage: 1.69 Scalar::Util::Numeric: 0.40 Storable: 3.15 Text::Soundex: 3.05 Thread::Queue: 3.14 Tie::File: 1.06 URI::Escape: 5.12 YAML: 1.30 local::lib: 2.000029 threads: 2.25 threads::shared: 1.61 All 27 Perl modules installed

Checking Environmental Variables... $FUNANNOTATE_DB=/mnt/shared/scratch/awebb/apps/funannotate_db/funannotate_db $PASAHOME=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/opt/pasa-2.5.2 $TRINITY_HOME=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/opt/trinity-2.8.5 $EVM_HOME=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/opt/evidencemodeler-1.1.1 $AUGUSTUS_CONFIG_PATH=/mnt/shared/scratch/awebb/apps/conda/envs/funannotate/config/ ERROR: GENEMARK_PATH not set. export GENEMARK_PATH=/path/to/dir

Checking external dependencies... ERROR: pslDnaFiler found but error running: pslCDnaFilter: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

PASA: 2.5.2 CodingQuarry: 2.0 Trinity: 2.8.5 augustus: 3.5.0 bamtools: bamtools 2.5.1 bedtools: bedtools v2.30.0 blat: BLAT v35 diamond: 2.1.6 ete3: 3.1.2 exonerate: exonerate 2.4.0 fasta: 36.3.8g glimmerhmm: 3.0.4 gmap: 2021-08-25 gmes_petap.pl: 4.68_lic hisat2: 2.2.1 hmmscan: HMMER 3.3.2 (Nov 2020) hmmsearch: HMMER 3.3.2 (Nov 2020) java: 17.0.3-internal kallisto: 0.46.1 mafft: v7.520 (2023/Mar/22) makeblastdb: makeblastdb 2.13.0+ minimap2: 2.24-r1122 pigz: 2.6 proteinortho: 6.2.3 salmon: salmon 0.14.1 samtools: samtools 1.17 snap: 2006-07-28 stringtie: 2.2.1 tRNAscan-SE: 2.0.11 (Oct 2022) tantan: tantan 40 tbl2asn: 25.8 tblastn: tblastn 2.13.0+ trimal: trimAl v1.4.rev15 build[2013-12-17] trimmomatic: 0.39 ERROR: emapper.py not installed ERROR: pslCDnaFilter not installed ERROR: signalp not installed

nextgenusfs commented 1 year ago

Downgrade numpy in your environment.

webbchen commented 1 year ago

Hah, yes, numpy 1.20 did work, numpy 1.19.5 did not. Even though the error message refers to orig. offender np.float being deprecated from 1.20 onwards. Might need stating explicitly. Thanks for your help, problem sorted.