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

NA in Relative abundance graph #389

Open
AnnaMarizzi opened this issue Jul 22, 2024 · 3 comments
Open

NA in Relative abundance graph #389

AnnaMarizzi opened this issue Jul 22, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@AnnaMarizzi
Copy link

Hello,

when I do a graph on the relative abundance for the genus of my data, NA appears on the x axis.

Is there a function to eliminate the NA from the graph? Or do I have to filter my data differently?

Thank you in advance :)

Problem

@ChiLiubio
Copy link
Owner

Hi. I guess the reason is the taxonomic table is not tidied. Try to run this:

library(magrittr)
your_microtable$tax_table %<>% tidy_taxonomy
your_microtable$tidy_dataset()
your_microtable$cal_abund()

Then re-perform your analysis.

@AnnaMarizzi
Copy link
Author

Thank you very much, it has solved the problem. Can you explain shortly what this function does. I have seen that it doesnt remove rows from the tax_table. From what I have read it replaces NA with " ", is that correct? And I guess it does that at any taxonomic level?

Should I run this always at the begining when I do the data filtering?

Thank you,
Anna

@ChiLiubio
Copy link
Owner

Yes. This function can replace all the so-called useless thing (NA, unknown, unclassified, ......) with "" and add the prefix (e.g. p__) for each taxonomic level. The reason we create this function is the taxonomic table we often got is chotic. I have seen many wired things in that. So unifying the table generally is necessary. So add it into your pipeline (before creating microtable), just once. It is enough.

Best,
Chi

@ChiLiubio ChiLiubio added the documentation Improvements or additions to documentation label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants