eggnogdb / eggnog-mapper

Fast genome-wide functional annotation through orthology assignment
http://eggnog-mapper.embl.de
GNU Affero General Public License v3.0
556 stars 105 forks source link

Cannot include both --query_cover and --subject_cover in my search. #514

Open KPapac opened 3 months ago

KPapac commented 3 months ago

Hi there,

I have installed eggnog through conda and I have made a custom database with Drosophilidae proteins to annotate against. To do that I execute:

emapper.py --output_dir . -o testing_unclustered --decorate_gff yes --go_evidence non-electronic --itype CDS -i unclustered.fna --cpu 30 --dmnd_db /space/Software/eggnog_5.0_drosophilids_DB/myDrosophila.dmnd --decorate_gff longest_func_annotI15_noWil_noLowGCAllIsoforms.gff3 --evalue 0.000001,

which works as expected. Now I want to make this search more strict by requiring that both the query and the subject coverages are more than 80%.

If I run: emapper.py --output_dir . -o testing_unclustered --decorate_gff yes --go_evidence non-electronic --itype CDS -i unclustered.fna --cpu 30 --dmnd_db /space/Software/eggnog_5.0_drosophilids_DB/myDrosophila.dmnd --decorate_gff longest_func_annotI15_noWil_noLowGCAllIsoforms.gff3 --evalue 0.000001 --query_cover 80.0,

I get outputs as expected. I also get outputs if I use --subject_cover 80.0 instead of the --query_cover 80.0.

But when I add both flags in my command, like: emapper.py --output_dir . -o testing_unclustered --decorate_gff yes --go_evidence non-electronic --itype CDS -i unclustered.fna --cpu 30 --dmnd_db /space/Software/eggnog_5.0_drosophilids_DB/myDrosophila.dmnd --decorate_gff longest_func_annotI15_noWil_noLowGCAllIsoforms.gff3 --evalue 0.000001 --query_cover 80.0 --subject_cover 80.0

I get this error: Error running diamond: Error: vector::_M_range_check: __n (which is 8547) >= this->size() (which is 4095)

4095 is the number of fasta sequences I have in my query file "unclustered.fna", but I don't recognise the 8547 number.

I googled a bit and this error shows up in programs written in C++, which I am not familiar with. Does anyone have any idea what is going on?

I have Python 3.12.3, diamond v2.1.9.163, emapper-2.1.12.

Cantalapiedra commented 3 months ago

Dear @KPapac ,

Among the output messages of eggnog-mapper you may have a command calling diamond. If it is the case, could you try running the diamond command to see if that one works?

You may also try with the same diamond version that is bundled with eggnog-mapper, which I think is 2.0.11.

Thank you.

Best, Carlos

KPapac commented 3 months ago

Hey Carlos,

Thanks for the quick reply!

Yes there is a message with the diamond command. I execute: /space/Software/eggnog/bin/diamond blastx -d '/space/Software/eggnog_5.0_drosophilids_DB/myDrosophila.dmnd' -q '/space/no_backup/Kostas/annotating_fly_genomes/unclustered.fna' --threads 30 -o '/space/no_backup/Kostas/annotating_fly_genomes/testing_unclustered.emapper.hits' --sensitive --iterate -e 1e-06 --query-cover 80.0 --subject-cover 80.0 --top 3 --outfmt 6 qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qcovhsp scovhsp

and I get the same error: Error: vector::_M_range_check: __n (which is 8547) >= this->size() (which is 4095). This is diamond bundled with eggnog via conda.

You may also try with the same diamond version that is bundled with eggnog-mapper, which I think is 2.0.11.

Do you mean to get the previous version of emapper v2.0.11 and try the diamond that comes with that?

Cheers, Kostas

Cantalapiedra commented 3 months ago

No, sorry, I meant with diamond 2.0.11. Maybe you could try something like: mamba install -c bioconda diamond=2.0.11 (or conda instead of mamba)

KPapac commented 3 months ago

Hey there, using diamond 2.0.11 works! Thanks for your help. I also made an issue on this in the diamond github, so maybe someone makes a fix for v2.1.9.163.

Cantalapiedra commented 2 months ago

Just as a reminder. We should probably fix the bioconda recipe, limiting the diamond version to the tested ones:

https://github.com/bioconda/bioconda-recipes/blob/master/recipes/eggnog-mapper/meta.yaml