nextgenusfs / funannotate

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

Funannotate 1.8.9 Compare TypeError #719

Open giriarteS opened 2 years ago

giriarteS commented 2 years ago

I am using funannotate 1.8.9 version installed with conda (mamba).

"funannotate compare -i Genome_one.gbk Genome_two.gbk Genome_three.gbk -o compare --cpus 4 --outgroup botrytis_cinerea.dikarya

[Apr 19 12:22 PM]: OS: Ubuntu 20.04, 56 cores, ~ 132 GB RAM. Python: 3.8.12 [Apr 19 12:22 PM]: Running 1.8.9 [Apr 19 12:22 PM]: Now parsing 3 genomes [Apr 19 12:22 PM]: working on Genome one [Apr 19 12:22 PM]: working on Genome two [Apr 19 12:22 PM]: working on Genome three [Apr 19 12:22 PM]: No secondary metabolite annotations found [Apr 19 12:22 PM]: Summarizing PFAM domain results [Apr 19 12:22 PM]: Summarizing InterProScan results [Apr 19 12:22 PM]: Loading InterPro descriptions [Apr 19 12:22 PM]: Summarizing MEROPS protease results [Apr 19 12:22 PM]: found 4 MEROPS familes Traceback (most recent call last): File "/mnt/DATA/anaconda3/envs/funannotate/bin/funannotate", line 10, in sys.exit(main()) File "/mnt/DATA/anaconda3/envs/funannotate/lib/python3.8/site-packages/funannotate/funannotate.py", line 705, in main mod.main(arguments) File "/mnt/DATA/anaconda3/envs/funannotate/lib/python3.8/site-packages/funannotate/compare.py", line 540, in main lib.drawHeatmap(meropsplot, 'BuPu', os.path.join( File "/mnt/DATA/anaconda3/envs/funannotate/lib/python3.8/site-packages/funannotate/library.py", line 7917, in drawHeatmap cbar_ax = fig.add_axes(shrink=0.4) File "/home/gloria_broders/.local/lib/python3.8/site-packages/matplotlib/figure.py", line 619, in add_axes raise TypeError( TypeError: add_axes() missing 1 required positional argument: 'rect'"

This are my dependencies: "------------------------------------------------------- Checking dependencies for 1.8.9

You are running Python v 3.8.12. Now checking python packages... biopython: 1.79 goatools: 1.2.3 matplotlib: 3.5.1 natsort: 8.1.0 numpy: 1.22.3 pandas: 1.4.1 psutil: 5.9.0 requests: 2.27.1 scikit-learn: 0.24.1 scipy: 1.8.0 seaborn: 0.11.2 All 11 python packages installed

You are running Perl v b'5.026002'. Now checking perl modules... Carp: 1.38 Clone: 0.42 DBD::SQLite: 1.64 DBD::mysql: 4.046 DBI: 1.642 DB_File: 1.855 Data::Dumper: 2.173 File::Basename: 2.85 File::Which: 1.23 Getopt::Long: 2.5 Hash::Merge: 0.300 JSON: 4.02 LWP::UserAgent: 6.39 Logger::Simple: 2.0 POSIX: 1.76 Parallel::ForkManager: 2.02 Pod::Usage: 1.69 Scalar::Util::Numeric: 0.40 Storable: 3.15 Text::Soundex: 3.05 Thread::Queue: 3.12 Tie::File: 1.02 URI::Escape: 3.31 YAML: 1.29 threads: 2.15 threads::shared: 1.56 ERROR: Bio::Perl not installed, install with cpanm Bio::Perl

Checking Environmental Variables... $FUNANNOTATE_DB=/mnt/DATA/funannotate_db $PASAHOME=/mnt/DATA/anaconda3/envs/funannotate/opt/pasa-2.4.1 $TRINITY_HOME=/mnt/DATA/anaconda3/envs/funannotate/opt/trinity-2.8.5 $EVM_HOME=/mnt/DATA/anaconda3/envs/funannotate/opt/evidencemodeler-1.1.1 $AUGUSTUS_CONFIG_PATH=/mnt/DATA/anaconda3/envs/funannotate/config/ $GENEMARK_PATH=/mnt/DATA/gmes_linux_64/ All 6 environmental variables are set

Checking external dependencies... PASA: 2.4.1 CodingQuarry: 2.0 Trinity: 2.8.5 augustus: 3.3.3 bamtools: bamtools 2.5.1 bedtools: bedtools v2.30.0 blat: BLAT v36 diamond: 2.0.15 emapper.py: 2.1.7 ete3: 3.1.2 exonerate: exonerate 2.4.0 fasta: no way to determine glimmerhmm: 3.0.4 gmap: 2017-11-15 hisat2: 2.2.1 hmmscan: HMMER 3.3.2 (Nov 2020) hmmsearch: HMMER 3.3.2 (Nov 2020) java: 1.8.0_312 kallisto: 0.46.1 mafft: v7.505 (2022/Apr/10) makeblastdb: makeblastdb 2.2.31+ minimap2: 2.24-r1122 proteinortho: 6.0.34 pslCDnaFilter: no way to determine salmon: salmon 0.14.1 samtools: samtools 1.12 signalp: 5.0b snap: 2006-07-28 stringtie: 2.2.1 tRNAscan-SE: 2.0.9 (July 2021) tantan: tantan 31 tbl2asn: no way to determine, likely 25.X tblastn: tblastn 2.2.31+ trimal: trimAl v1.4.rev15 build[2013-12-17] trimmomatic: 0.39 ERROR: gmes_petap.pl not installed"

Originally posted by @giriarteS in https://github.com/nextgenusfs/funannotate/issues/693#issuecomment-1103019586

giriarteS commented 2 years ago

I decided to install docker and got the same error: ######################################################### Runningfunannotate compare` unit testing Downloading: https://osf.io/7s9xh/download?version=1 Bytes: 1020999 CMD: funannotate compare -i Genome_one.gbk Genome_two.gbk Genome_three.gbk -o compare --cpus 40 --outgroup botrytis_cinerea.dikarya #########################################################

[May 17 05:21 PM]: OS: Debian GNU/Linux 10, 56 cores, ~ 132 GB RAM. Python: 3.8.12 [May 17 05:21 PM]: Running 1.8.10 [May 17 05:21 PM]: Now parsing 3 genomes [May 17 05:21 PM]: working on Genome one [May 17 05:21 PM]: working on Genome two [May 17 05:21 PM]: working on Genome three [May 17 05:21 PM]: No secondary metabolite annotations found [May 17 05:21 PM]: Summarizing PFAM domain results Fontconfig error: No writable cache directories [May 17 05:21 PM]: Summarizing InterProScan results [May 17 05:21 PM]: Loading InterPro descriptions [May 17 05:21 PM]: Summarizing MEROPS protease results [May 17 05:21 PM]: found 4 MEROPS familes Traceback (most recent call last): File "/venv/bin/funannotate", line 8, in sys.exit(main()) File "/venv/lib/python3.8/site-packages/funannotate/funannotate.py", line 711, in main mod.main(arguments) File "/venv/lib/python3.8/site-packages/funannotate/compare.py", line 540, in main lib.drawHeatmap(meropsplot, 'BuPu', os.path.join( File "/venv/lib/python3.8/site-packages/funannotate/library.py", line 7893, in drawHeatmap cbar_ax = fig.add_axes(shrink=0.4) File "/venv/lib/python3.8/site-packages/matplotlib/figure.py", line 619, in add_axes raise TypeError( TypeError: add_axes() missing 1 required positional argument: 'rect' ######################################################### ERROR: funannotate compare test failed - check logfiles #########################################################

ferninfm commented 2 years ago

A solution is commenting out line 7866 in library.py

the problem is just in the drawHeatmap function

cbar_ax = fig.add_axes(shrink=0.4)

Actually cbar_ax is not used anywhere beyond that point. It looks like a leftover from previous versions(?) Heatmaps are produced and look ok

All the best

nextgenusfs commented 2 years ago

Sorry for delay. It seems to be that the old code is not working with newer matplotlib versions. So alternative solution might be to go back to older matplotlib version, ie something around v2.0.

giriarteS commented 2 years ago

Thanks @ferninfm, I followed your suggestion and it work! " ------------------------------------------------------- [Jun 02 09:47 AM]: OS: Ubuntu 20.04, 56 cores, ~ 132 GB RAM. Python: 3.8.12 [Jun 02 09:47 AM]: Running 1.8.9 [Jun 02 09:47 AM]: Now parsing 3 genomes [Jun 02 09:47 AM]: working on Genome one [Jun 02 09:47 AM]: working on Genome two [Jun 02 09:47 AM]: working on Genome three [Jun 02 09:47 AM]: No secondary metabolite annotations found [Jun 02 09:47 AM]: Summarizing PFAM domain results [Jun 02 09:47 AM]: Summarizing InterProScan results [Jun 02 09:47 AM]: Loading InterPro descriptions [Jun 02 09:47 AM]: Summarizing MEROPS protease results [Jun 02 09:47 AM]: found 4 MEROPS familes [Jun 02 09:47 AM]: Summarizing CAZyme results [Jun 02 09:47 AM]: found 5 CAZy familes [Jun 02 09:47 AM]: Summarizing COG results [Jun 02 09:47 AM]: Summarizing secreted protein results [Jun 02 09:47 AM]: Summarizing fungal transcription factors [Jun 02 09:47 AM]: Running GO enrichment for each genome WARNING: skipping Genome_one.txt as no GO terms [Jun 02 09:48 AM]: Running orthologous clustering tool, ProteinOrtho. This may take awhile... [Jun 02 09:49 AM]: Compiling all annotations for each genome [Jun 02 09:49 AM]: Inferring phylogeny using RAxML [Jun 02 09:49 AM]: Found 1 single copy BUSCO orthologs, will use all to infer phylogeny [Jun 02 09:49 AM]: Compressing results to output file: compare.tar.gz [Jun 02 09:49 AM]: Funannotate compare completed successfully!"

nextgenusfs commented 2 years ago

Okay I think this is now fixed in the main/master branch. I will release a new bug release version shortly.

splaisan commented 2 years ago

Hi Jon,

I am still learning your tool and really start to enjoy it, thanks for that great resource!

I still have the message Fontconfig error: No writable cache directories around PFAM propcessing with version 1.8.14 running from the latest docker (image downloaded 2022-10-06). Is this expected? I also notice that although I gave the command 24 threads, it seems to only use 2 (busy with GO now since quite a while) is this normal? Does it run one thread per genome by any chance (I have two here) thanks


sudo /opt/biotools/funannotate/funannotate-docker compare \
>   -i *.gbk \
>   -o compare_out \
>   --cpus 24
-------------------------------------------------------
[Oct 06 06:11 PM]: OS: Debian GNU/Linux 10, 88 cores, ~ 528 GB RAM. Python: 3.8.12
[Oct 06 06:11 PM]: Running 1.8.14
[Oct 06 06:11 PM]: Now parsing 2 genomes
[Oct 06 06:11 PM]: working on Saccharomyces cerevisiae
[Oct 06 06:11 PM]: working on Saccharomyces cerevisiae
[Oct 06 06:11 PM]: No secondary metabolite annotations found
[Oct 06 06:11 PM]: Summarizing PFAM domain results
Fontconfig error: No writable cache directories
[Oct 06 06:11 PM]: Summarizing InterProScan results
[Oct 06 06:11 PM]: Loading InterPro descriptions
[Oct 06 06:11 PM]: Summarizing MEROPS protease results
[Oct 06 06:11 PM]: found 5/64 MEROPS familes with stdev >= 1.000000
[Oct 06 06:11 PM]: Summarizing CAZyme results
[Oct 06 06:12 PM]: found 3/51 CAZy familes with stdev >= 1.000000
[Oct 06 06:12 PM]: Summarizing COG results
[Oct 06 06:12 PM]: No SignalP annotations found
[Oct 06 06:12 PM]: Summarizing fungal transcription factors
[Oct 06 06:12 PM]: Running GO enrichment for each genome
[Oct 06 08:03 PM]: Running orthologous clustering tool, ProteinOrtho.  This may take awhile...
[Oct 06 08:04 PM]: Compiling all annotations for each genome
[Oct 06 08:04 PM]: Skipping RAxML phylogeny as at least 4 taxa are required
[Oct 06 08:04 PM]: Compressing results to output file: compare_out.tar.gz
[Oct 06 08:04 PM]: Funannotate compare completed successfully!