Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] anvi-summarize fails with flag '--init-gene-coverages' #2062

Closed
FlorianTrigodet opened this issue Mar 27, 2023 · 1 comment
Closed

Comments

@FlorianTrigodet
Copy link
Contributor

FlorianTrigodet commented Mar 27, 2023

Short description of the problem

I was running the anvio self test when I found an error with anvi-summarize.

anvi'o version

Main dev version.

Detailed description of the issue

I ran the mini self test:

anvi-self-test --suite mini

And I got this error:

:: Summarizing CONCOCT results ...

Contigs DB ...................................: Initialized: /Users/ftrigodet/toto/CONTIGS.db (v. 20)

WARNING
===============================================
ProfileSuperClass found a collection focus, which means it will be initialized
using only the splits in the profile database that are affiliated with the
collection CONCOCT and all bins it describes.


WARNING
===============================================
A subset of splits (35 of 35, to be precise) are requested to initiate gene-
level coverage stats for. No need to worry, this is just a warning in case you
are as obsessed as wanting to know everything there is to know.

[27 Mar 23 11:16:48 Computing gene-level coverage stats in STANDARD mode...] 10 of 35 splits ...                                                                                 Traceback (most recent call last):
  File "/Users/ftrigodet/github/anvio/bin/anvi-summarize", line 123, in <module>
    main(args)
  File "/Users/ftrigodet/github/anvio/bin/anvi-summarize", line 64, in main
    summary = summarizer.ProfileSummarizer(args)
  File "/Users/ftrigodet/github/anvio/anvio/summarizer.py", line 707, in __init__
    DatabasesMetaclass.__init__(self, self.args, self.run, self.progress)
  File "/Users/ftrigodet/github/anvio/anvio/dbops.py", line 3771, in __init__
    ProfileSuperclass.__init__(self, self.args, self.run, self.progress)
  File "/Users/ftrigodet/github/anvio/anvio/dbops.py", line 3009, in __init__
    init_split_coverage_values_per_nt=init_split_coverage_values_per_nt)
  File "/Users/ftrigodet/github/anvio/anvio/dbops.py", line 3199, in init_gene_level_coverage_stats_dicts
    gene_level_coverage_stats, failed_gene_caller_ids = self.get_gene_level_coverage_stats(split_name, contigs_db, **parameters)
ValueError: not enough values to unpack (expected 2, got 0)

Traceback for debugging
================================================================================
  File "/Users/ftrigodet/github/anvio/bin/anvi-self-test", line 118, in <module>
    main(args)
  File "/Users/ftrigodet/github/anvio/bin/anvi-self-test", line 83, in main
    raise ConfigError(f"According to the exit code ('{exitcode}'), anvi'o suspects that something may have gone wrong while "
================================================================================


Config Error: According to the exit code ('1'), anvi'o suspects that something may have gone
              wrong while running your tests :/ We hope that the reason is clear to you from
              the lines above. But if you don't see anything obvious, and especially if the
              test ended up running until the end with reasonable looking final results, you
              shouldn't worry too much about this error. Life is short and we all can worry
              just a bit less.

Files to reproduce

Here are a contigs.db and a merged profile.db to reproduce the error rapidly:
test_summarize.tar.gz

anvi-summarize -c CONTIGS.db -p SAMPLES-MERGED/PROFILE.db -C CONCOCT -o summary --init-gene-coverage
@meren meren closed this as completed in e7616c0 Mar 28, 2023
@meren
Copy link
Member

meren commented Mar 28, 2023

There is no AUXILIARY-DATA.db in the test directory, so it is not quite reproducible :) But I did find the bug and fixed it. Thank you very much, Florian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants