NBISweden / AGAT

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

AGAT not working in perl 5.38 #416

Open kgaisser opened 10 months ago

kgaisser commented 10 months ago

Describe the bug

I am getting Undefined subroutine error messages after running agat_convert_sp_gff2gtf.pl.

General (please complete the following information):

To Reproduce

I've tried this on a variety of different genomes as well, with the same issue. I'll also add this as an attachment.

MPAO1_refseq_GCF_016107485.1.gff.gz

.gff downloaded from refseq: https://www.ncbi.nlm.nih.gov/datasets/genome/GCF_016107485.1/

input

I also tried running the line without the -o mpao1.gtf portion.

agat_convert_sp_gff2gtf.pl --gff MPAO1_refseq_GCF_016107485.1.gff -o mpao1.gtf

Output

GTF version relax selected from the agat config file. Undefined subroutine &main::prepare_gffout called at /usr/bin/vendor_perl/agat_convert_sp_gff2gtf.pl line 68.

When I check line 68 it says the following. Admittedly, I am pretty new to perl, and I am not sure how to evaluate this line. I'll add this file as an attachment.)

my $gffout = prepare_gffout($config, $opt_output);

agat_convert_sp_gff2gtf.pl.txt

Additional context My issue is possibly related to https://github.com/NBISweden/AGAT/issues/392. I have not yet tried a different Perl version, however. I will see if that works next.

Happy to provide other files/info, but I am not sure what would be helpful.

Thank you for your time!

Juke34 commented 9 months ago

prepare_gffout is a function coming with AGAT. If it cannot access it, it means the installation didn't went as expected (The lib does not live where it is expected and cannot be accessed)

starsareintherose commented 8 months ago

@kbipinkumar Could you follow this issue?

kbipinkumar commented 8 months ago

(The lib does not live where it is expected and cannot be accessed)

could you please elaborate which file provides this library? i am attaching the list of files as installed by archlinux package of agat

$  pacman -Ql agat
agat /usr/
agat /usr/bin/
agat /usr/bin/vendor_perl/
agat /usr/bin/vendor_perl/agat
agat /usr/bin/vendor_perl/agat_convert_bed2gff.pl
agat /usr/bin/vendor_perl/agat_convert_embl2gff.pl
agat /usr/bin/vendor_perl/agat_convert_genscan2gff.pl
agat /usr/bin/vendor_perl/agat_convert_mfannot2gff.pl
agat /usr/bin/vendor_perl/agat_convert_minimap2_bam2gff.pl
agat /usr/bin/vendor_perl/agat_convert_sp_gff2bed.pl
agat /usr/bin/vendor_perl/agat_convert_sp_gff2gtf.pl
agat /usr/bin/vendor_perl/agat_convert_sp_gff2tsv.pl
agat /usr/bin/vendor_perl/agat_convert_sp_gff2zff.pl
agat /usr/bin/vendor_perl/agat_convert_sp_gxf2gxf.pl
agat /usr/bin/vendor_perl/agat_sp_Prokka_inferNameFromAttributes.pl
agat /usr/bin/vendor_perl/agat_sp_add_attribute_shortest_exon_size.pl
agat /usr/bin/vendor_perl/agat_sp_add_attribute_shortest_intron_size.pl
agat /usr/bin/vendor_perl/agat_sp_add_intergenic_regions.pl
agat /usr/bin/vendor_perl/agat_sp_add_introns.pl
agat /usr/bin/vendor_perl/agat_sp_add_splice_sites.pl
agat /usr/bin/vendor_perl/agat_sp_add_start_and_stop.pl
agat /usr/bin/vendor_perl/agat_sp_alignment_output_style.pl
agat /usr/bin/vendor_perl/agat_sp_clipN_seqExtremities_and_fixCoordinates.pl
agat /usr/bin/vendor_perl/agat_sp_compare_two_BUSCOs.pl
agat /usr/bin/vendor_perl/agat_sp_compare_two_annotations.pl
agat /usr/bin/vendor_perl/agat_sp_complement_annotations.pl
agat /usr/bin/vendor_perl/agat_sp_ensembl_output_style.pl
agat /usr/bin/vendor_perl/agat_sp_extract_attributes.pl
agat /usr/bin/vendor_perl/agat_sp_extract_sequences.pl
agat /usr/bin/vendor_perl/agat_sp_filter_by_ORF_size.pl
agat /usr/bin/vendor_perl/agat_sp_filter_by_locus_distance.pl
agat /usr/bin/vendor_perl/agat_sp_filter_by_mrnaBlastValue.pl
agat /usr/bin/vendor_perl/agat_sp_filter_feature_by_attribute_presence.pl
agat /usr/bin/vendor_perl/agat_sp_filter_feature_by_attribute_value.pl
agat /usr/bin/vendor_perl/agat_sp_filter_feature_from_keep_list.pl
agat /usr/bin/vendor_perl/agat_sp_filter_feature_from_kill_list.pl
agat /usr/bin/vendor_perl/agat_sp_filter_gene_by_intron_numbers.pl
agat /usr/bin/vendor_perl/agat_sp_filter_gene_by_length.pl
agat /usr/bin/vendor_perl/agat_sp_filter_incomplete_gene_coding_models.pl
agat /usr/bin/vendor_perl/agat_sp_filter_record_by_coordinates.pl
agat /usr/bin/vendor_perl/agat_sp_fix_cds_phases.pl
agat /usr/bin/vendor_perl/agat_sp_fix_features_locations_duplicated.pl
agat /usr/bin/vendor_perl/agat_sp_fix_fusion.pl
agat /usr/bin/vendor_perl/agat_sp_fix_longest_ORF.pl
agat /usr/bin/vendor_perl/agat_sp_fix_overlaping_genes.pl
agat /usr/bin/vendor_perl/agat_sp_fix_small_exon_from_extremities.pl
agat /usr/bin/vendor_perl/agat_sp_flag_premature_stop_codons.pl
agat /usr/bin/vendor_perl/agat_sp_flag_short_introns.pl
agat /usr/bin/vendor_perl/agat_sp_functional_statistics.pl
agat /usr/bin/vendor_perl/agat_sp_keep_longest_isoform.pl
agat /usr/bin/vendor_perl/agat_sp_kraken_assess_liftover.pl
agat /usr/bin/vendor_perl/agat_sp_list_short_introns.pl
agat /usr/bin/vendor_perl/agat_sp_load_function_from_protein_align.pl
agat /usr/bin/vendor_perl/agat_sp_manage_IDs.pl
agat /usr/bin/vendor_perl/agat_sp_manage_UTRs.pl
agat /usr/bin/vendor_perl/agat_sp_manage_attributes.pl
agat /usr/bin/vendor_perl/agat_sp_manage_functional_annotation.pl
agat /usr/bin/vendor_perl/agat_sp_manage_introns.pl
agat /usr/bin/vendor_perl/agat_sp_merge_annotations.pl
agat /usr/bin/vendor_perl/agat_sp_move_attributes_within_records.pl
agat /usr/bin/vendor_perl/agat_sp_prokka_fix_fragmented_gene_annotations.pl
agat /usr/bin/vendor_perl/agat_sp_sensitivity_specificity.pl
agat /usr/bin/vendor_perl/agat_sp_separate_by_record_type.pl
agat /usr/bin/vendor_perl/agat_sp_statistics.pl
agat /usr/bin/vendor_perl/agat_sp_webApollo_compliant.pl
agat /usr/bin/vendor_perl/agat_sq_add_attributes_from_tsv.pl
agat /usr/bin/vendor_perl/agat_sq_add_hash_tag.pl
agat /usr/bin/vendor_perl/agat_sq_add_locus_tag.pl
agat /usr/bin/vendor_perl/agat_sq_count_attributes.pl
agat /usr/bin/vendor_perl/agat_sq_filter_feature_from_fasta.pl
agat /usr/bin/vendor_perl/agat_sq_list_attributes.pl
agat /usr/bin/vendor_perl/agat_sq_manage_IDs.pl
agat /usr/bin/vendor_perl/agat_sq_manage_attributes.pl
agat /usr/bin/vendor_perl/agat_sq_mask.pl
agat /usr/bin/vendor_perl/agat_sq_remove_redundant_entries.pl
agat /usr/bin/vendor_perl/agat_sq_rename_seqid.pl
agat /usr/bin/vendor_perl/agat_sq_repeats_analyzer.pl
agat /usr/bin/vendor_perl/agat_sq_reverse_complement.pl
agat /usr/bin/vendor_perl/agat_sq_rfam_analyzer.pl
agat /usr/bin/vendor_perl/agat_sq_split.pl
agat /usr/bin/vendor_perl/agat_sq_stat_basic.pl
agat /usr/share/
agat /usr/share/man/
agat /usr/share/man/man1/
agat /usr/share/man/man1/agat_convert_bed2gff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_embl2gff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_genscan2gff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_mfannot2gff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_minimap2_bam2gff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_sp_gff2bed.pl.1p.gz
agat /usr/share/man/man1/agat_convert_sp_gff2gtf.pl.1p.gz
agat /usr/share/man/man1/agat_convert_sp_gff2tsv.pl.1p.gz
agat /usr/share/man/man1/agat_convert_sp_gff2zff.pl.1p.gz
agat /usr/share/man/man1/agat_convert_sp_gxf2gxf.pl.1p.gz
agat /usr/share/man/man1/agat_sp_Prokka_inferNameFromAttributes.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_attribute_shortest_exon_size.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_attribute_shortest_intron_size.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_intergenic_regions.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_introns.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_splice_sites.pl.1p.gz
agat /usr/share/man/man1/agat_sp_add_start_and_stop.pl.1p.gz
agat /usr/share/man/man1/agat_sp_alignment_output_style.pl.1p.gz
agat /usr/share/man/man1/agat_sp_clipN_seqExtremities_and_fixCoordinates.pl.1p.gz
agat /usr/share/man/man1/agat_sp_compare_two_BUSCOs.pl.1p.gz
agat /usr/share/man/man1/agat_sp_compare_two_annotations.pl.1p.gz
agat /usr/share/man/man1/agat_sp_complement_annotations.pl.1p.gz
agat /usr/share/man/man1/agat_sp_ensembl_output_style.pl.1p.gz
agat /usr/share/man/man1/agat_sp_extract_attributes.pl.1p.gz
agat /usr/share/man/man1/agat_sp_extract_sequences.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_by_ORF_size.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_by_locus_distance.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_by_mrnaBlastValue.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_feature_by_attribute_presence.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_feature_by_attribute_value.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_feature_from_keep_list.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_feature_from_kill_list.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_gene_by_intron_numbers.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_gene_by_length.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_incomplete_gene_coding_models.pl.1p.gz
agat /usr/share/man/man1/agat_sp_filter_record_by_coordinates.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_cds_phases.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_features_locations_duplicated.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_fusion.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_longest_ORF.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_overlaping_genes.pl.1p.gz
agat /usr/share/man/man1/agat_sp_fix_small_exon_from_extremities.pl.1p.gz
agat /usr/share/man/man1/agat_sp_flag_premature_stop_codons.pl.1p.gz
agat /usr/share/man/man1/agat_sp_flag_short_introns.pl.1p.gz
agat /usr/share/man/man1/agat_sp_functional_statistics.pl.1p.gz
agat /usr/share/man/man1/agat_sp_keep_longest_isoform.pl.1p.gz
agat /usr/share/man/man1/agat_sp_kraken_assess_liftover.pl.1p.gz
agat /usr/share/man/man1/agat_sp_list_short_introns.pl.1p.gz
agat /usr/share/man/man1/agat_sp_load_function_from_protein_align.pl.1p.gz
agat /usr/share/man/man1/agat_sp_manage_IDs.pl.1p.gz
agat /usr/share/man/man1/agat_sp_manage_UTRs.pl.1p.gz
agat /usr/share/man/man1/agat_sp_manage_attributes.pl.1p.gz
agat /usr/share/man/man1/agat_sp_manage_functional_annotation.pl.1p.gz
agat /usr/share/man/man1/agat_sp_manage_introns.pl.1p.gz
agat /usr/share/man/man1/agat_sp_merge_annotations.pl.1p.gz
agat /usr/share/man/man1/agat_sp_move_attributes_within_records.pl.1p.gz
agat /usr/share/man/man1/agat_sp_prokka_fix_fragmented_gene_annotations.pl.1p.gz
agat /usr/share/man/man1/agat_sp_sensitivity_specificity.pl.1p.gz
agat /usr/share/man/man1/agat_sp_separate_by_record_type.pl.1p.gz
agat /usr/share/man/man1/agat_sp_statistics.pl.1p.gz
agat /usr/share/man/man1/agat_sp_webApollo_compliant.pl.1p.gz
agat /usr/share/man/man1/agat_sq_add_attributes_from_tsv.pl.1p.gz
agat /usr/share/man/man1/agat_sq_add_hash_tag.pl.1p.gz
agat /usr/share/man/man1/agat_sq_add_locus_tag.pl.1p.gz
agat /usr/share/man/man1/agat_sq_count_attributes.pl.1p.gz
agat /usr/share/man/man1/agat_sq_filter_feature_from_fasta.pl.1p.gz
agat /usr/share/man/man1/agat_sq_list_attributes.pl.1p.gz
agat /usr/share/man/man1/agat_sq_manage_IDs.pl.1p.gz
agat /usr/share/man/man1/agat_sq_manage_attributes.pl.1p.gz
agat /usr/share/man/man1/agat_sq_mask.pl.1p.gz
agat /usr/share/man/man1/agat_sq_remove_redundant_entries.pl.1p.gz
agat /usr/share/man/man1/agat_sq_rename_seqid.pl.1p.gz
agat /usr/share/man/man1/agat_sq_repeats_analyzer.pl.1p.gz
agat /usr/share/man/man1/agat_sq_reverse_complement.pl.1p.gz
agat /usr/share/man/man1/agat_sq_rfam_analyzer.pl.1p.gz
agat /usr/share/man/man1/agat_sq_split.pl.1p.gz
agat /usr/share/man/man1/agat_sq_stat_basic.pl.1p.gz
agat /usr/share/man/man3/
agat /usr/share/man/man3/AGAT::AGAT.3pm.gz
agat /usr/share/man/man3/AGAT::BioperlGFF.3pm.gz
agat /usr/share/man/man3/AGAT::Config.3pm.gz
agat /usr/share/man/man3/AGAT::Levels.3pm.gz
agat /usr/share/man/man3/AGAT::OmniscientI.3pm.gz
agat /usr/share/man/man3/AGAT::OmniscientO.3pm.gz
agat /usr/share/man/man3/AGAT::OmniscientStat.3pm.gz
agat /usr/share/man/man3/AGAT::OmniscientTool.3pm.gz
agat /usr/share/man/man3/AGAT::PlotR.3pm.gz
agat /usr/share/man/man3/AGAT::Utilities.3pm.gz
agat /usr/share/perl5/
agat /usr/share/perl5/vendor_perl/
agat /usr/share/perl5/vendor_perl/AGAT/
agat /usr/share/perl5/vendor_perl/AGAT/AGAT.pm
agat /usr/share/perl5/vendor_perl/AGAT/AppEaser.pm
agat /usr/share/perl5/vendor_perl/AGAT/BioperlGFF.pm
agat /usr/share/perl5/vendor_perl/AGAT/Config.pm
agat /usr/share/perl5/vendor_perl/AGAT/Levels.pm
agat /usr/share/perl5/vendor_perl/AGAT/OmniscientI.pm
agat /usr/share/perl5/vendor_perl/AGAT/OmniscientO.pm
agat /usr/share/perl5/vendor_perl/AGAT/OmniscientStat.pm
agat /usr/share/perl5/vendor_perl/AGAT/OmniscientToGTF.pm
agat /usr/share/perl5/vendor_perl/AGAT/OmniscientTool.pm
agat /usr/share/perl5/vendor_perl/AGAT/PlotR.pm
agat /usr/share/perl5/vendor_perl/AGAT/Utilities.pm
agat /usr/share/perl5/vendor_perl/auto/
agat /usr/share/perl5/vendor_perl/auto/share/
agat /usr/share/perl5/vendor_perl/auto/share/dist/
agat /usr/share/perl5/vendor_perl/auto/share/dist/AGAT/
agat /usr/share/perl5/vendor_perl/auto/share/dist/AGAT/agat_config.yaml
agat /usr/share/perl5/vendor_perl/auto/share/dist/AGAT/feature_levels.yaml
agat /usr/share/perl5/vendor_perl/auto/share/dist/AGAT/so.obo 

please note /usr/share/perl5/vendor_perl/ is valid location for installing perl modules as per arch packaging guidelines of perl packages. /usr/lib/perl5/$version/vendor_perl/ is also a valid path.

i have built packages for using either path but the error still persists.

Juke34 commented 7 months ago

Thank you @kbipinkumar for your help. The problem occurs since perl version 5.36 see #392 Script in .pl in /usr/bin/vendor_perl seems to not be able to access the libraries .pm here located /usr/share/perl5/vendor_perl/AGAT

Juke34 commented 5 months ago

Dear perl Master @viklund, Would you have some insight to help? Are you aware of any update since perl version 5.36 that may have mess up installation procedure? i.e. expected location of the lib, or in import procedure?

viklund commented 1 month ago

Sorry for late reply.

Yes, there seems to be something going on with the perl versions.

Using the docker images of perl:5.34 and perl:5.36 and following the instructions in the repository, it succeeds for 5.34 but fails for 5.36. Check this dockerfile and just change the perl version and the build will fail for 5.36 but succeed for 5.34:

From perl:5.36

RUN cpanm install BioPerl Graph::Directed LWP::UserAgent Carp Sort::Naturally File::Share File::ShareDir::Install Moose YAML LWP::Protocol::https Term::ProgressBar
RUN git clone https://github.com/NBISweden/AGAT.git
WORKDIR /usr/src/app/AGAT
RUN perl Makefile.PL
RUN make
RUN make test
RUN make install

I don't know what to make of this right now. I might get some time to look into it more, I might not. But at least now it's easy to reproduce.

Juke34 commented 1 month ago

@viklund Thank you for your feedback. Cheers