NBISweden / AGAT

Another Gtf/Gff Analysis Toolkit
GNU General Public License v3.0
459 stars 56 forks source link

AGAT not working/not installed properly #480

Closed vaneet-lotay closed 2 months ago

vaneet-lotay commented 2 months ago

Describe the bug Hi,

I am unable to run the desired agat script that I want to: /agat_convert_sp_gff2gtf.pl This could mean that agat is not succesfully installed or something in my work environment as a prerequisite is not properly setup to allow the AGAT tools to run properly. I haven't even run the script with any input files, I was simply calling the script as a test to see if it works, something I frequently do after installing a new tool. This is the error I see:

Attempt to reload Clone.pm aborted. Compilation failed in require at /usr/local/share/perl/5.34.0/AGAT/OmniscientI.pm line 15. BEGIN failed--compilation aborted at /usr/local/share/perl/5.34.0/AGAT/OmniscientI.pm line 15. Compilation failed in require at /usr/local/share/perl/5.34.0/AGAT/AGAT.pm line 9. BEGIN failed--compilation aborted at /usr/local/share/perl/5.34.0/AGAT/AGAT.pm line 9. Compilation failed in require at /home/kermit/bin/agat_convert_sp_gff2gtf.pl line 7. BEGIN failed--compilation aborted at /home/kermit/bin/agat_convert_sp_gff2gtf.pl line 7.

General (please complete the following information): I have just pulled the latest AGAT from git today, so I would imagine that's AGAT v1.4? I am installing this tool on Ubuntu v22.04.4 LTS

I installed the perl modules using the 'cpanm' method and I believe all installed with no noticeable errors. I followed the instructions to download the latest AGAT from Github and installed it on my Ubuntu server using root access. When I run 'make test', all the tests fail with what seems to be the same problem related to the Clone.pm module:

.... Failed 83/83 subtests t/unitest.t .......... Attempt to reload Clone.pm aborted. Compilation failed in require at /home/kermit/AGAT/blib/lib/AGAT/OmniscientI.pm line 15. BEGIN failed--compilation aborted at /home/kermit/AGAT/blib/lib/AGAT/OmniscientI.pm line 15. Compilation failed in require at /home/kermit/AGAT/blib/lib/AGAT/AGAT.pm line 9. BEGIN failed--compilation aborted at /home/kermit/AGAT/blib/lib/AGAT/AGAT.pm line 9. Compilation failed in require at t/unitest.t line 7. BEGIN failed--compilation aborted at t/unitest.t line 7.

Looks like your test exited with 255 before it could output anything.

t/unitest.t .......... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 15/15 subtests

Test Summary Report

t/config.t (Wstat: 512 (exited 2) Tests: 3 Failed: 2) Failed tests: 1, 3 Non-zero exit status: 2 t/gff_other.t (Wstat: 2048 (exited 8) Tests: 8 Failed: 8) Failed tests: 1-8 Non-zero exit status: 8 t/gff_syntax.t (Wstat: 11520 (exited 45) Tests: 45 Failed: 45) Failed tests: 1-45 Non-zero exit status: 45 t/gff_version.t (Wstat: 65280 (exited 255) Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output t/level_missing.t (Wstat: 3328 (exited 13) Tests: 13 Failed: 13) Failed tests: 1-13 Non-zero exit status: 13 t/scripts_compile.t (Wstat: 19968 (exited 78) Tests: 78 Failed: 78) Failed tests: 1-78 Non-zero exit status: 78 t/scripts_output.t (Wstat: 21248 (exited 83) Tests: 83 Failed: 83) Failed tests: 1-83 Non-zero exit status: 83 t/unitest.t (Wstat: 65280 (exited 255) Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 15 tests but ran 0. Files=8, Tests=230, 24 wallclock secs ( 0.09 usr 0.03 sys + 18.83 cusr 4.65 csys = 23.60 CPU) Result: FAIL Failed 8/8 test programs. 229/230 subtests failed. make: *** [Makefile:1726: test_dynamic] Error 255

However when I run 'make install', it seems to have installed succesfully ( but perhaps not obviously):

..... Installing /usr/local/man/man1/agat_sp_add_start_and_stop.pl.1p Installing /usr/local/man/man1/agat_sp_filter_feature_from_keep_list.pl.1p Installing /usr/local/man/man3/AGAT::Utilities.3pm Installing /usr/local/man/man3/AGAT::OmniscientStat.3pm Installing /usr/local/man/man3/AGAT::Config.3pm Installing /usr/local/man/man3/AGAT::BioperlGFF.3pm Installing /usr/local/man/man3/AGAT::Levels.3pm Installing /usr/local/man/man3/AGAT::PlotR.3pm Installing /usr/local/man/man3/AGAT::OmniscientTool.3pm Installing /usr/local/man/man3/AGAT::OmniscientO.3pm Installing /usr/local/man/man3/AGAT::OmniscientI.3pm Installing /usr/local/man/man3/AGAT::AGAT.3pm Appending installation info to /usr/lib/x86_64-linux-gnu/perl/5.34/perllocal.pod

To diagnose and fix the issue, I tried removing all traces of the Clone.pm perl module from every location on my server, then reinstalling the perl module from scratch using cpan but the same error reappears. So I'm not sure if that's the problem. I'm hoping this is an error that you have heard of or encountered before and there's possibly something obvious I'm missing. In case my installation of the perl modules was faulty, I tried to also install them via conda, but I ran into issues on that path as well:

│ │ └─ perl-extutils-makemaker [7.24|7.34|7.36] would require │ │ └─ perl [>=5.26.2,<5.26.3.0a0 |>=5.26.2,<5.27.0a0 ], which can be installed; │ └─ perl-file-sharedir-install with the potential options │ ├─ perl-file-sharedir-install 0.13 would require │ │ └─ perl-carp with the potential options │ │ ├─ perl-carp 1.38, which cannot be installed (as previously explained); │ │ ├─ perl-carp 1.38, which can be installed (as previously explained); │ │ └─ perl-carp 1.38, which can be installed (as previously explained); │ ├─ perl-file-sharedir-install 0.10 would require │ │ └─ perl >=5.22.0,<5.23.0 , which does not exist (perhaps a missing channel); │ ├─ perl-file-sharedir-install 0.10 would require │ │ └─ perl 5.22.0 , which does not exist (perhaps a missing channel); │ └─ perl-file-sharedir-install [0.10|0.13] would require │ └─ perl [>=5.26.2,<5.26.3.0a0 |>=5.26.2,<5.27.0a0 ], which can be installed; ├─ conda-libmamba-solver is installable with the potential options │ ├─ conda-libmamba-solver 23.12.0 would require │ │ └─ libmambapy >=1.5.3 with the potential options │ │ ├─ libmambapy 1.5.3 would require │ │ │ └─ openssl >=3.0.12,<4.0a0 , which conflicts with any installable versions previously reported; │ │ ├─ libmambapy 1.5.8 would require │ │ │ └─ openssl >=3.0.13,<4.0a0 , which conflicts with any installable versions previously reported; │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8] would require │ │ │ └─ python >=3.10,<3.11.0a0 , which can be installed; │ │ ├─ libmambapy [1.5.3|1.5.6|1.5.8] would require │ │ │ └─ python >=3.11,<3.12.0a0 , which can be installed; │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8] would require │ │ │ └─ python >=3.8,<3.9.0a0 , which can be installed; │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8] would require │ │ │ └─ python >=3.9,<3.10.0a0 , which can be installed; │ │ └─ libmambapy 1.5.6 would require │ │ └─ libmamba 1.5.6 hfe524e5_0, which does not exist (perhaps a missing channel); │ ├─ conda-libmamba-solver [24.1.0|24.7.0] would require │ │ └─ libmambapy [>=1.5.6 |>=1.5.6,<2.0.0a0 |>=1.5.6,<2.0a0 ] with the potential options │ │ ├─ libmambapy 1.5.8, which cannot be installed (as previously explained); │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ │ ├─ libmambapy [1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ │ └─ libmambapy 1.5.6, which cannot be installed (as previously explained); │ ├─ conda-libmamba-solver [22.12.0|22.8.1|...|23.9.3] would require │ │ └─ python >=3.10,<3.11.0a0 , which can be installed; │ ├─ conda-libmamba-solver [22.12.0|22.8.1|23.1.0] would require │ │ └─ python >=3.7,<3.8.0a0 , which can be installed; │ ├─ conda-libmamba-solver [22.12.0|22.8.1|...|23.9.3] would require │ │ └─ python >=3.8,<3.9.0a0 , which can be installed; │ ├─ conda-libmamba-solver [22.12.0|22.8.1|...|23.9.3] would require │ │ └─ python >=3.9,<3.10.0a0 , which can be installed; │ ├─ conda-libmamba-solver [23.1.0|23.11.0|...|23.9.3] would require │ │ └─ python >=3.11,<3.12.0a0 , which can be installed; │ └─ conda-libmamba-solver [22.3.0|22.3.1|22.6.0] would require │ ├─ conda >=4.13,<22.11.0a with the potential options │ │ ├─ conda [22.9.0|4.13.0|4.14.0] would require │ │ │ └─ python >=3.10,<3.11.0a0 , which can be installed; │ │ ├─ conda [22.9.0|4.13.0|4.14.0] would require │ │ │ └─ python >=3.7,<3.8.0a0 , which can be installed; │ │ ├─ conda [22.9.0|4.13.0|4.14.0] would require │ │ │ └─ python >=3.8,<3.9.0a0 , which can be installed; │ │ └─ conda [22.9.0|4.13.0|4.14.0] would require │ │ └─ python >=3.9,<3.10.0a0 , which can be installed; │ └─ libmambapy 0.22. with the potential options │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ ├─ libmambapy [0.22.1|1.5.3|1.5.6|1.5.8], which can be installed (as previously explained); │ └─ libmambapy 0.22.1 would require │ └─ python >=3.7,<3.8.0a0 , which can be installed; └─ pin-1 is not installable because it requires └─ python 3.12.* , which conflicts with any installable versions previously reported.

For reference my version of python is v3.12.4. My version of perl is v5.34.0.

Thank you!

Vaneet

Juke34 commented 2 months ago

What does it says when you do perl Makefile.PL and make ?

vaneet-lotay commented 2 months ago

Actually the results seem interesting for perl Makefile.PL:

(base) root@xenbase-bio1:/home/kermit# cd AGAT (base) root@xenbase-bio1:/home/kermit/AGAT# perl Makefile.PL Have /usr/lib/x86_64-linux-gnu/perl-base Want /usr/lib/x86_64-linux-gnu/perl/5.34 Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [perl-base] Config says: [x86_64-linux-gnu-thread-multi] This may or may not cause problems. Please check your installation of perl if you have problems building this extension. Generating a Unix-style Makefile Writing Makefile for AGAT Writing MYMETA.yml and MYMETA.json

After running 'make':

... "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_manage_functional_annotation.pl cp bin/agat_sp_manage_introns.pl blib/script/agat_sp_manage_introns.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_manage_introns.pl cp bin/agat_sp_merge_annotations.pl blib/script/agat_sp_merge_annotations.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_merge_annotations.pl cp bin/agat_sp_move_attributes_within_records.pl blib/script/agat_sp_move_attributes_within_records.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_move_attributes_within_records.pl cp bin/agat_sp_prokka_fix_fragmented_gene_annotations.pl blib/script/agat_sp_prokka_fix_fragmented_gene_annotations.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_prokka_fix_fragmented_gene_annotations.pl cp bin/agat_sp_sensitivity_specificity.pl blib/script/agat_sp_sensitivity_specificity.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_sensitivity_specificity.pl cp bin/agat_sp_separate_by_record_type.pl blib/script/agat_sp_separate_by_record_type.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_separate_by_record_type.pl cp bin/agat_sp_statistics.pl blib/script/agat_sp_statistics.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_statistics.pl cp bin/agat_sp_webApollo_compliant.pl blib/script/agat_sp_webApollo_compliant.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sp_webApollo_compliant.pl cp bin/agat_sq_add_attributes_from_tsv.pl blib/script/agat_sq_add_attributes_from_tsv.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_add_attributes_from_tsv.pl cp bin/agat_sq_add_hash_tag.pl blib/script/agat_sq_add_hash_tag.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_add_hash_tag.pl cp bin/agat_sq_add_locus_tag.pl blib/script/agat_sq_add_locus_tag.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_add_locus_tag.pl cp bin/agat_sq_count_attributes.pl blib/script/agat_sq_count_attributes.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_count_attributes.pl cp bin/agat_sq_filter_feature_from_fasta.pl blib/script/agat_sq_filter_feature_from_fasta.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_filter_feature_from_fasta.pl cp bin/agat_sq_list_attributes.pl blib/script/agat_sq_list_attributes.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_list_attributes.pl cp bin/agat_sq_manage_IDs.pl blib/script/agat_sq_manage_IDs.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_manage_IDs.pl cp bin/agat_sq_manage_attributes.pl blib/script/agat_sq_manage_attributes.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_manage_attributes.pl cp bin/agat_sq_mask.pl blib/script/agat_sq_mask.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_mask.pl cp bin/agat_sq_remove_redundant_entries.pl blib/script/agat_sq_remove_redundant_entries.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_remove_redundant_entries.pl cp bin/agat_sq_rename_seqid.pl blib/script/agat_sq_rename_seqid.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_rename_seqid.pl cp bin/agat_sq_repeats_analyzer.pl blib/script/agat_sq_repeats_analyzer.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_repeats_analyzer.pl cp bin/agat_sq_reverse_complement.pl blib/script/agat_sq_reverse_complement.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_reverse_complement.pl cp bin/agat_sq_rfam_analyzer.pl blib/script/agat_sq_rfam_analyzer.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_rfam_analyzer.pl cp bin/agat_sq_split.pl blib/script/agat_sq_split.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_split.pl cp bin/agat_sq_stat_basic.pl blib/script/agat_sq_stat_basic.pl "/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/agat_sq_stat_basic.pl Manifying 28 pod documents Manifying 26 pod documents Manifying 23 pod documents Manifying 10 pod documents

Juke34 commented 2 months ago

Sounds like you have two perl installations that interfere between each other. Could you try to install AGAT via conda/Mamba in a fresh environment following the steps:

conda create -n agat_again agat 
activate agat_again

use also -c bioconda if agat is not found (means your channels are not set properly)

vaneet-lotay commented 2 months ago

Thanks....I had access to a fresh new server, where presumably the Perl installation was stable and the commands you gave work. I'm able to run the script I need without any error. I guess I'll need to fix the perl installations on the original environment to get it working there. Thank you so much!!!!

vaneet-lotay commented 1 week ago

Hi there, I am trying to get AGAT working on my original environment but it's still not working there. I'm not sure if you can reopen this issue temporarily to help me. I used the commands you stated before using conda:

conda create -n agat_again agat activate agat_again

I get this error again even in this 'agat_again' environment:

Attempt to reload Clone.pm aborted. Compilation failed in require at /home/kermit/miniconda3/envs/agat_again/lib/site_perl/5.26.2/AGAT/OmniscientI.pm line 16. BEGIN failed--compilation aborted at /home/kermit/miniconda3/envs/agat_again/lib/site_perl/5.26.2/AGAT/OmniscientI.pm line 16. Compilation failed in require at /home/kermit/miniconda3/envs/agat_again/lib/site_perl/5.26.2/AGAT/Omniscient.pm line 9. BEGIN failed--compilation aborted at /home/kermit/miniconda3/envs/agat_again/lib/site_perl/5.26.2/AGAT/Omniscient.pm line 9. Compilation failed in require at /home/kermit/miniconda3/envs/agat_again/bin/agat_convert_sp_gff2gtf.pl line 9. BEGIN failed--compilation aborted at /home/kermit/miniconda3/envs/agat_again/bin/agat_convert_sp_gff2gtf.pl line 9.

You were mentioning before that this may be because of two different perl installations before I used conda, however now it seems clear it's trying to run Perl within my new agat_again environment. When I check the $PATH now, one of the first environments listed is the agat_again environment:

/home/kermit/bin:/home/kermit/miniconda3/envs/agat_again/bin:/home/kermit/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

When I check which 'perl' it's using, it seems to be the one in the new environment too within my home directory:

/home/kermit/miniconda3/envs/agat_again/bin/perl

So that's why I'm still confused why it's not working here. If this just always fails, I can always try AGAT on a fresh new server like before but it would be nice to get it working here as all my other supporting tools are located here too.

Thanks, any help you can provide would be appreciated! I was very grateful for your feedback last time.

Vaneet