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

anvi-push & Anvio Server Error #5

Open
jarrodscott opened this issue Apr 6, 2018 · 5 comments
Open

anvi-push & Anvio Server Error #5

jarrodscott opened this issue Apr 6, 2018 · 5 comments

Comments

@jarrodscott
Copy link

jarrodscott commented Apr 6, 2018

Hi all,

In brief, I am using anvi-push to push pangenomic data to anviserver and I get this error:

Anvio Server Error: module 'anvio.dbops' has no attribute 'TablesForCollections'
The problem seems obvious? TablesForCollections is not in 'anvio.dbops', which it is not. I tried amending the source code by adding from anvio.tables.collections import TablesForCollections to 'anvio.dbops' but that did not work--worth a shot

I did the following:
anvi-export-collection -p genomes_min_occ_2-PAN.db -C default -O genomes --include-unbinned which generated bins-info & bins files.
then
anvi-export-table genomes_min_occ_2-PAN.db to generate the rest of the needed files (gene_cluster_presence_absence.txt, layer_orders.txt,layer_additionaldata.txt,item_additional_data.txt)

finally:
anvi-push --user MYUSERNAME --api-url https://anvi-server.org/ -n Genomes_Pan -t newick.txt -d gene_cluster_presence_absence.txt -R layer_orders.txt -D layer_additional_data.txt --delete-if-exists -A item_additional_data.txt --bins genomes_bins.txt -s states.txt --bins-info genomes_bins-info.txt

and I get this:
`Enter your password for the server:

  • Successfully logged into anvi-server.
    Anvio Server Error: module 'anvio.dbops' has no attribute 'TablesForCollections'
    But...if I leave off --bins-info genomes_bins-info.txt` it runs just fine:

`Enter your password for the server:

  • Successfully logged into anvi-server.
  • Project 'Genomes_Pan' pushed successfully.`

I do not see anything strange looking about genomes_bins-info.txt.

Clade_I anvi-interactive #778899
Clade_II anvi-interactive #778899
Clade_III anvi-interactive #778899
Clades_II-V anvi-interactive #778899
Core anvi-interactive #778899
SCG anvi-interactive #924900
Core_22 anvi-interactive #778899
UNBINNED_ITEMS_BIN anvi-interactive #000000

System Specifics:
(anvio-4) Js-MacBook-Pro-3:anvi-interactive-pan J$ python --version
Python 3.6.3 :: Anaconda, Inc.`

Anvi'o version ...............................: 4-master
Profile DB version ...........................: 23
Contigs DB version ...........................: 11
Pan DB version ...............................: 8
Genome data storage version ..................: 6
Auxiliary data storage version ...............: 2

mac osx 10.10.5

@jarrodscott
Copy link
Author

oh, and let me know if you need the files and I can pass them along

@ozcan
Copy link
Contributor

ozcan commented Apr 6, 2018

Hey @jarrodscott,
Thanks for the heads up. I have partly fixed this issue, the import error was coming from the server codebase. So now you can push projects with a collection. But there is another issue on anvi-server, it should load collection automatically and draw the tree but it does not. I will try to address that issue too.
Thank you again for detailed error report!

@jarrodscott
Copy link
Author

Hi @ozcan
sweet success! thanks for the fast fix.

@jarrodscott
Copy link
Author

except it never actually loads on https://anvi-server.org/
I can see it on My Projects page and also download the data.

@ozcan
Copy link
Contributor

ozcan commented Apr 6, 2018

Hey @jarrodscott, you are right. I have inspected error logs and looked at the files and noticed couple issues.

anvi-export-table exports all the contents of the table but sometimes those tables do not match the format anvi-server wants, for example in your state.json file there are columns for last_modified and name like in the table. but the server only needs one content field.

In additional data file, the first column is entry_id which is a just unique number for each record in the database but anvi-server does not want in that format. The first column needs to match with split/item names in your tree.

Easier solution would be opening your files with anvi-interactive --manual flag on your machine. And using Upload to server button, Purpose of anvi-push is more like automation.

image

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