edgraham / GhostKoalaParser

Parser for Ghost Koala
9 stars 5 forks source link

KEGG-to-anvio error: got an unexpected keyword argument "axis" #7

Closed Smitdere closed 6 years ago

Smitdere commented 6 years ago

I am trying to run the parser KEGG-to-anvio to import GhostKoala annotations into my anvio contigs database. When running the script with python 2 I get the following error message:

Traceback (most recent call last): File "KEGG-to-anvio", line 38, in extracted= extracted.rename({'description':'function'},axis='columns') File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 2834, in rename **kwargs) File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 650, in rename 'argument "{0}"'.format(list(kwargs.keys())[0])) TypeError: rename() got an unexpected keyword argument "axis"

Below is the command that I am running: python KEGG-to-anvio --KeggDB KO_Orthology_ko00001.txt -i user_ko.fixed.txt -o KeggAnnotations-AnviImportable.txt

Attached is my GhostKoala output.

I am getting this error despite removing the first two rows which have no Kegg annotation in the second column, as recommended in other posts that I've read on the github.

Thanks, Derek user_ko.txt

edgraham commented 6 years ago

Hello,

I just ran this through the parsing step on our server and it seems to be working so it’s possibly a versioning issue. What version of pandas and numpy are your running? We just need to pinpoint what’s different in your distribution vs mine.

Regards, Elaina

On Jul 7, 2018, at 7:05 PM, Smitdere notifications@github.com wrote:

I am trying to run the parser KEGG-to-anvio to import GhostKoala annotations into my anvio contigs database. When running the script with python 2 I get the following error message:

Traceback (most recent call last): File "KEGG-to-anvio", line 38, in extracted= extracted.rename({'description':'function'},axis='columns') File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 2834, in rename **kwargs) File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 650, in rename 'argument "{0}"'.format(list(kwargs.keys())[0])) TypeError: rename() got an unexpected keyword argument "axis"

Below is the command that I am running: python KEGG-to-anvio --KeggDB KO_Orthology_ko00001.txt -i user_ko.fixed.txt -o KeggAnnotations-AnviImportable.txt

Attached is my GhostKoala output.

I am getting this error despite removing the first two rows which have no Kegg annotation in the second column, as recommended in other posts that I've read on the github.

Thanks, Derek user_ko.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Smitdere commented 6 years ago

Hi Robert,

This is related to the issue I was already discussing with you. I consulted the author via github and they seem to think it is an issue of not having the right versions of either pandas or numpy. Can you check what versions we have in the singularity omics -i bio.img?

Thanks!

On Mon, Jul 9, 2018 at 8:42 AM, Elaina notifications@github.com wrote:

Hello,

I just ran this through the parsing step on our server and it seems to be working so it’s possibly a versioning issue. What version of pandas and numpy are your running? We just need to pinpoint what’s different in your distribution vs mine.

Regards, Elaina

On Jul 7, 2018, at 7:05 PM, Smitdere notifications@github.com wrote:

I am trying to run the parser KEGG-to-anvio to import GhostKoala annotations into my anvio contigs database. When running the script with python 2 I get the following error message:

Traceback (most recent call last): File "KEGG-to-anvio", line 38, in extracted= extracted.rename({'description':'function'},axis='columns') File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 2834, in rename **kwargs) File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 650, in rename 'argument "{0}"'.format(list(kwargs.keys())[0])) TypeError: rename() got an unexpected keyword argument "axis"

Below is the command that I am running: python KEGG-to-anvio --KeggDB KO_Orthology_ko00001.txt -i user_ko.fixed.txt -o KeggAnnotations-AnviImportable.txt

Attached is my GhostKoala output.

I am getting this error despite removing the first two rows which have no Kegg annotation in the second column, as recommended in other posts that I've read on the github.

Thanks, Derek user_ko.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/edgraham/GhostKoalaParser/issues/7#issuecomment-403465546, or mute the thread https://github.com/notifications/unsubscribe-auth/AYUGFx_TlTMtRyd5rkydx7pPY87xoF5tks5uE0_EgaJpZM4VGhft .

-- Derek Smith PhD Candidate University of Michigan Department of Earth and Environmental Sciences smitdere@umich.edu

edgraham commented 6 years ago

It may also be helpful to look at the KeggDB file your using. If there’s in issue with that file you’d get a similar error.

On Jul 9, 2018, at 10:42 AM, Smitdere notifications@github.com wrote:

Hi Robert,

This is related to the issue I was already discussing with you. I consulted the author via github and they seem to think it is an issue of not having the right versions of either pandas or numpy. Can you check what versions we have in the singularity omics -i bio.img?

Thanks!

On Mon, Jul 9, 2018 at 8:42 AM, Elaina notifications@github.com wrote:

Hello,

I just ran this through the parsing step on our server and it seems to be working so it’s possibly a versioning issue. What version of pandas and numpy are your running? We just need to pinpoint what’s different in your distribution vs mine.

Regards, Elaina

On Jul 7, 2018, at 7:05 PM, Smitdere notifications@github.com wrote:

I am trying to run the parser KEGG-to-anvio to import GhostKoala annotations into my anvio contigs database. When running the script with python 2 I get the following error message:

Traceback (most recent call last): File "KEGG-to-anvio", line 38, in extracted= extracted.rename({'description':'function'},axis='columns') File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 2834, in rename **kwargs) File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 650, in rename 'argument "{0}"'.format(list(kwargs.keys())[0])) TypeError: rename() got an unexpected keyword argument "axis"

Below is the command that I am running: python KEGG-to-anvio --KeggDB KO_Orthology_ko00001.txt -i user_ko.fixed.txt -o KeggAnnotations-AnviImportable.txt

Attached is my GhostKoala output.

I am getting this error despite removing the first two rows which have no Kegg annotation in the second column, as recommended in other posts that I've read on the github.

Thanks, Derek user_ko.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/edgraham/GhostKoalaParser/issues/7#issuecomment-403465546, or mute the thread https://github.com/notifications/unsubscribe-auth/AYUGFx_TlTMtRyd5rkydx7pPY87xoF5tks5uE0_EgaJpZM4VGhft .

-- Derek Smith PhD Candidate University of Michigan Department of Earth and Environmental Sciences smitdere@umich.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Smitdere commented 6 years ago

Hi Elaina,

We have pandas v 0.19 on our servers. We also found that the following edit at line 38 in KEGG-to-anvio seemed to fix the issue as well:

change:

extracted= extracted.rename({'description':'function'},axis='columns')

to:

extracted= extracted.rename(columns={'description':'function'})

Cheers,

On Mon, Jul 9, 2018 at 10:55 AM, Elaina notifications@github.com wrote:

It may also be helpful to look at the KeggDB file your using. If there’s in issue with that file you’d get a similar error.

On Jul 9, 2018, at 10:42 AM, Smitdere notifications@github.com wrote:

Hi Robert,

This is related to the issue I was already discussing with you. I consulted the author via github and they seem to think it is an issue of not having the right versions of either pandas or numpy. Can you check what versions we have in the singularity omics -i bio.img?

Thanks!

On Mon, Jul 9, 2018 at 8:42 AM, Elaina notifications@github.com wrote:

Hello,

I just ran this through the parsing step on our server and it seems to be working so it’s possibly a versioning issue. What version of pandas and numpy are your running? We just need to pinpoint what’s different in your distribution vs mine.

Regards, Elaina

On Jul 7, 2018, at 7:05 PM, Smitdere notifications@github.com wrote:

I am trying to run the parser KEGG-to-anvio to import GhostKoala annotations into my anvio contigs database. When running the script with python 2 I get the following error message:

Traceback (most recent call last): File "KEGG-to-anvio", line 38, in extracted= extracted.rename({'description':'function'},axis= 'columns') File "/usr/lib/python2.7/dist-packages/pandas/core/frame.py", line 2834, in rename **kwargs) File "/usr/lib/python2.7/dist-packages/pandas/core/generic.py", line 650, in rename 'argument "{0}"'.format(list(kwargs.keys())[0])) TypeError: rename() got an unexpected keyword argument "axis"

Below is the command that I am running: python KEGG-to-anvio --KeggDB KO_Orthology_ko00001.txt -i user_ko.fixed.txt -o KeggAnnotations-AnviImportable.txt

Attached is my GhostKoala output.

I am getting this error despite removing the first two rows which have no Kegg annotation in the second column, as recommended in other posts that I've read on the github.

Thanks, Derek user_ko.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/edgraham/GhostKoalaParser/issues/7# issuecomment-403465546, or mute the thread https://github.com/notifications/unsubscribe-auth/AYUGFx_ TlTMtRyd5rkydx7pPY87xoF5tks5uE0_EgaJpZM4VGhft .

-- Derek Smith PhD Candidate University of Michigan Department of Earth and Environmental Sciences smitdere@umich.edu — You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/edgraham/GhostKoalaParser/issues/7#issuecomment-403507722, or mute the thread https://github.com/notifications/unsubscribe-auth/AYUGF3GZkenkzCd0PyOFg2gnI3sUUhOYks5uE27mgaJpZM4VGhft .

-- Derek Smith PhD Candidate University of Michigan Department of Earth and Environmental Sciences smitdere@umich.edu

edgraham commented 6 years ago

Hello,

thanks for the information, I am running pandas v.0.22. They must have changed the functionality of pandas.rename because removing the 'axis='columns'' causes the script to become non-functional.

-Elaina