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-inspect does not show splits without genes #2391

Open
katysloz opened this issue Jan 28, 2025 · 0 comments
Open

[BUG] anvi-inspect does not show splits without genes #2391

katysloz opened this issue Jan 28, 2025 · 0 comments
Labels

Comments

@katysloz
Copy link

katysloz commented Jan 28, 2025

Short description of the problem

anvi-inspect does not show splits without genes

anvi'o version

development version

Detailed description of the issue

I wanted to use anvi-inspect to visualise a specific split, but the split cannot be visualised because the code relies on the genes_in_splits table. The split I want to see has no genes so cannot be visualised because it relies on the gene table info from the contigs.db. I wanted to see the split jsut to see what was happening and didn't realise it didn't have any genes on it until the debug error

Files / commands to reproduce the issue

anvi-inspect -c /fs/dss/groups/agecodatasci/RESOURCES/PUBLIC/METAGENOMES/OCEAN/TARA/03_CONTIGS/SAMEA2620505-contigs.db -p ../06_MERGED/SAMEA2620505/PROFILE.db --split-name SAMEA2620505_000000001329_split_00001 --debug
/fs/dss/groups/agecodatasci/PEOPLE/Katy/anvio-katy/lib/python3.10/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.24.0 when using version 1.2.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(
/fs/dss/groups/agecodatasci/PEOPLE/Katy/anvio-katy/lib/python3.10/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.24.0 when using version 1.2.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(
[28 Jan 25 10:45:18 Loading the contigs DB] Reading **SOME** data from `genes in splits` table :)
Traceback for debugging
================================================================================
  File "/fs/dss/groups/agecodatasci/PEOPLE/Katy/github/anvio/bin/anvi-inspect", line 60, in <module>
    d = interactive.Interactive(args)
  File "/fs/dss/groups/agecodatasci/PEOPLE/Katy/github/anvio/anvio/interactive.py", line 234, in __init__
    ContigsSuperclass.__init__(self, self.args)
  File "/fs/dss/groups/agecodatasci/PEOPLE/Katy/github/anvio/anvio/dbops.py", line 178, in __init__
    self.genes_in_splits = contigs_db.db.smart_get(t.genes_in_splits_table_name, 'split', self.split_names_of_interest, progress=self.progress)
  File "/fs/dss/groups/agecodatasci/PEOPLE/Katy/github/anvio/anvio/db.py", line 868, in smart_get
    return self.get_some_rows_from_table_as_dict(table_name, where_clause=f"{column} IN ({items})", string_the_key=string_the_key, error_if_no_data=error_if_no_data)
  File "/fs/dss/groups/agecodatasci/PEOPLE/Katy/github/anvio/anvio/db.py", line 1152, in get_some_rows_from_table_as_dict
    raise ConfigError("Query on %s with the where clause of '%s' did not return anything." % (table_name, where_clause))
================================================================================


Config Error: Query on genes_in_splits with the where clause of 'split IN
              ('SAMEA2620505_000000001329_split_00001')' did not return anything.

The files are available on ROSA :)

@katysloz katysloz added the bug label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant