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

Mapping eggnogs - code snippet #65

Closed
ivanferrreira opened this issue Feb 16, 2022 · 1 comment
Closed

Mapping eggnogs - code snippet #65

ivanferrreira opened this issue Feb 16, 2022 · 1 comment

Comments

@ivanferrreira
Copy link

ivanferrreira commented Feb 16, 2022

Hi,

Thank you for developing such awesome tool, samap has been working by far the best compared to several other tools for integration across species

I have struggled with mapping paralogues, orthologues and substitutions in my data using the current eggnog tutorial though. It seems like the input dataframe I am providing is formatted as it should to be used in function convert_eggnog_to_homologs

Could you please provide a little code snippet showing how to get the eggnog input file for usage in samap?

For instance, I have tried running this to get my eggnogs, from Ciona in this example:
emapper.py -m diamond --itype proteins --dmnd_db /users/ivan/devel/ivybridge/python3-venv-ivybridge-3.8.2/lib/python3.8/site-packages/eggnog_mapper-2.1.6-py3.8.egg/data/chordata.dmnd -i Ciona.fa --target_orthologs all -o Ciona

Thank you,
Ivan

@ivanferrreira
Copy link
Author

Figured it out, it was an issue with the format of the eggNOG_OGs output (OG@tax_id|tax_name); using this output directly into samap causes a bug.

Removing the taxa names and the "|" resolves the issue
i.e.:
Ciona['eggNOG_OGs'] = Ciona['eggNOG_OGs'].replace(list,"", regex=True) #list is a comma separated list of strings to be replaced in the column eggNOG_OGs
Ciona['eggNOG_OGs'] = Ciona['eggNOG_OGs'].str.replace(r'|', '', regex=True)

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

1 participant