-
Notifications
You must be signed in to change notification settings - Fork 37
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
ranks[tax_id] in per_rank_map: Exception AttributeError #87
Comments
Hi, Did you change something in either the biom file or the default config (defaults/default_config.ini) or somewhere else in the code? If not, then maybe you can send me your python (and maybe the ete2) version so I can try to reproduce this. |
I fixed the suspicious method, but since it was working for me even without that, I am not sure whether it also resolves this issue for you. Could you pull the latest version and check please? |
I have re-downloaded CAMISIM and tried it again. However, I am still getting the same error like below: $ python metagenome_from_profile.py -p defaults/mini.biom --debug |
I have added a check which should prevent this crash, but I am not sure whether this resolves everything (since it keeps on working on my test machines). Could you please try again and thank you for your patience. |
Thank you for your quick responses. This is the error I get now: $ python metagenome_from_profile.py -p defaults/mini.biom --debug |
Okay, this is as I feared. Since I cannot reproduce the error, could you open the file
and post the resulting log? Either ete2 was not able to retrieve the lineage at all or the format might have changed |
Here is the attached error: |
@AlphaSquad, @punnettsun, Thank you both for posting, I wonder if there's any update since the last discussion? |
Oh, I wrote a comment but it got lost. Unfortunately it is hard to me to figure this out just yet.
This should print the lineage of E.coli (NCBI ID 562) and the associated ranks to all genomes in the lineage.
If this works, then the problem is the conversion of the BIOM profile and I will have to dig deeper yet. |
Hi, @AlphaSquad , i tried to test but got empty return. is that BIOM issue or database issue? |
Hm, seems to be an issue with the ete2 database. Could you try, within the interpreter, to run |
Hi @AlphaSquad, I tried and that |
Okay, thank you, it indeed seems like an issue with the database. I will try to re-write this part using the newer ete3 database to see if it resolves the issue |
@AlphaSquad Good day! I wonder if there's any update regarding the bug? |
Hey, unfortunately I didn't find the time yet to look into the code, I am very sorry. By the end of the next week I hope to have written something. |
It seems like this was a known problem in ete and they described a patch in their repository, but it triggered me to try to port CAMISIM to python3. My test cases worked but it might be unstable, if you could test the new python3 branch, that would be greatly appreciated! |
Hi, @AlphaSquad thank you, did you mean use python version 3 and keep other dependencies the same version listed? |
If you check out the |
I created a conda python2 environment before with every dependency installed in that conda environment, is there anything I can do to just update the python version there instead of creating a new conda environment? |
Of course you could try to install the new |
hi~, I've encountered the same issue when runnning CAMISIM these days. |
Unfortunately there are multiple different issues in this thread, could you post the exact error from the logfile? |
A. when applying metagenomesimulation.py debug info are: B. when applying metagenome_from_profile.py the issue was the ete2 database problem as listed above . C. Could these issues come from ramdomly assigned OTU number and novelty category ? Thanks!! |
Did you try switching to the |
Switching to the python3 branch, I got the following : Thanks for your patience ! |
That is indeed strange as - just like you said - I could find the genomes by name and by taxonomy ID. Also, the taxonomy IDs were found on my end. Your local ete3 database seems to be out of date, I added an automatic update with the latest version. ete3 should now find your taxonomy IDs. It is possible that this already resolves the rest of the issues as well. Could you please pull the latest version from the |
Hi, after update ete3, the procedure went on until Aborted, and the output files are listed as follows: 2021-03-09 09:15:23 INFO: [root] Downloading 84 genomes Output file: What could be the problems since I still could not get the final results. Thanks! |
Strange. Since all the inputs for CAMISIM are there, could you check the config file whether it looks good and then try running |
./metagenomesimulation.py ./config.ini --debug 2021-03-11 19:15:18 ERROR: [MetadataReader 78944841691] Key column is not unique! Key: 'Genome11.0.0' ################### Thanks |
Hm, that is strange indeed. Did you make sure that your output directory is empty? If you already did, would it be possible to send me the files so I can try to reproduce the problem locally? |
attached is .biom file - |
hi, may I ask if you encountered the same problem when you did the test? Thanks :) |
Hi, sorry, I didn't have the time to test this so far, I will do this as soon as possible and come back to you with results. |
hi, that's ok ! I tried it again, and there was a different error: 2021-03-22 09:32:32 ERROR: [NcbiTaxonomy] Invalid taxid: ''
ValueError: Invalid taxid This issue arises from: Must the genome has the whole rank information for each taxon level ? Thanks ! |
Hi, you are correct that CAMISIM expected the rank information of every rank to be present, I added a check to skip the ranks if no ID is present at a certain rank, so you could try if it works for you now. If it does not work, could you please comment in #103 ? |
Hello
I was trying to run metagenome_from_profile.py, but kept getting this ranks[tax_id] in per_rank_map: Exception AttributeError:
I've tried to use python debugger pdb module to debug, and got to this point where I couldn't proceed,
The error seems to me is database error or something wrong with the mini.biom file, any ideas?
Thank you!
The text was updated successfully, but these errors were encountered: