Matteopaluh / KEMET

KEGG Module Evaluation Tool
Other
23 stars 5 forks source link

[error] problems with KoFamKOALA #5

Closed ShailNair closed 2 years ago

ShailNair commented 2 years ago

Hi,

Thanks for the kemet package. The package and the article looks awesome. I installed kemet following the instructions and when i run it, i get the following error:

`python kemet.py genomes/mcs.fasta -a kofamkoala --hmm_mode kos

Traceback (most recent call last): File "kemet.py", line 2514, in if LOGflag: NameError: name 'LOGflag' is not defined`

Matteopaluh commented 2 years ago

Thank you for the kind words Shail, this one was definitely a very dull error on my side, my bad.

With the recent commit it should be fixed, as I wrote the code as if the logging option was always chosen.

I'll suggest to clone again the repository and moving your files in the new one, to try again. Feel free to reopen if the problem is not properly fixed.

Best regards, Matteo

ShailNair commented 2 years ago

i used --log option but now throws a a new error

`python kemet.py genomes/mcs.fasta -a kofamkoala --hmm_mode kos --log

Traceback (most recent call last): File "kemet.py", line 2531, in ktest, KOs = kofamXktest(file, file.rsplit(".",1)[0]+".ktest", KAnnotation_directory, ktests_directory) File "kemet.py", line 155, in kofamXktest fastaslice = spacer.index(" ",1)+1

ValueError: substring not found `

The same error occurs with the updated repository (without --log option)

i used kofamkoala ko output as kegg annotations. e.g.

g1.t1 g2.t1 K01689 g3.t1 g4.t1 K22696

Matteopaluh commented 2 years ago

Hi again, the log issue is solved then.

Regarding this other problem with kofam, I believe it is due to a wrong annotation type selection.

In the KEMET toy folder, here, there are indications on the expected format of annotation files, how those should be structured, based on the various softwares output.

From the example you added, KoFamKOALA with KO output results in a "kaas-like" annotation as the "bin1_ko.txt" file from toy folder (i.e. a tab separated file, with two fields - 1st for gene name/locus, 2nd for KEGG KO).

Therefore, I'd suggest to clean the output folders (the ones with "reports") use a different command than the one you used, as KEMET won't find any KoFamKOALA formatted files:

python kemet.py genomes/mcs.fasta -a kaas --hmm_mode kos --log

I'll also highlight the formatting rules fom other potential users! Thanks. This should resolve the issue.

ShailNair commented 2 years ago

thanks. that worked.