You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make some heatmaps with the microViz package, and I am running into some difficulties with selecting taxa with assigned taxonomy. I am working with a metabarcoding project, so many of the taxa do not have taxonomy assigned even to the order or phylum level. However, when I am trying to make figures, those information will all be included. I was wondering if there is an (possibly elegant) way to select or filter taxa with taxonomy assigned to a specific level?
Below is the code I used first to fix the tax_table. merged_ps is simply a phyloseq object I created for other analyses. After this steps, many of the unassigned taxa will simply have a "taxonomy" of the sequence name for all taxonomic level. For example, "zotu.12" for everything between phylum and species.
Below is the code I used to make the heatmap. I was thinking about adding some filtering or selecting codes after tax_agg, but was not having much luck.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello David!
I am trying to make some heatmaps with the microViz package, and I am running into some difficulties with selecting taxa with assigned taxonomy. I am working with a metabarcoding project, so many of the taxa do not have taxonomy assigned even to the order or phylum level. However, when I am trying to make figures, those information will all be included. I was wondering if there is an (possibly elegant) way to select or filter taxa with taxonomy assigned to a specific level?
Below is the code I used first to fix the
tax_table
.merged_ps
is simply aphyloseq
object I created for other analyses. After this steps, many of the unassigned taxa will simply have a "taxonomy" of the sequence name for all taxonomic level. For example, "zotu.12" for everything between phylum and species.Below is the code I used to make the heatmap. I was thinking about adding some filtering or selecting codes after
tax_agg
, but was not having much luck.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions