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 have microbial classification data that was generated using Sourmash, and now I would like to visualize with metacoder. I am struggling to read in the taxmap object file based on the input csv file format. The data I am trying to read in as a taxmap object has the following format (sample_id, superkingdom, phylum, class, order, family, genus, species).
What I wish to do is count the number of observations for each level of taxonomic classification across all of my samples and visualize the number of observations for each classification level within my population of sequenced microbial isolates.
Is there a way to use metacoder and taxa to parse the sourmash classification data I have described to generate counts that can be visualized as a heat tree, or do I need to somehow generate counts first?
The text was updated successfully, but these errors were encountered:
library(metacoder)
library(readr)
raw_data<- read_csv(file="my/file/path")
obj<- parse_tax_data(raw_data, class_cols=2:8)
n_obs(obj, "tax_data") # Count number of rows in table for each taxon
heat_tree(obj,
node_label=taxon_names,
node_size=n_obs,
node_color=n_obs)
Thank you very much @zachary-foster ! I now have a beautiful starting point for the plot. I will continue to use and explore the features of this package!
Hello @zachary-foster,
I have microbial classification data that was generated using Sourmash, and now I would like to visualize with metacoder. I am struggling to read in the taxmap object file based on the input
csv
file format. The data I am trying to read in as a taxmap object has the following format (sample_id, superkingdom, phylum, class, order, family, genus, species).Here are two example lines within my output file:
What I wish to do is count the number of observations for each level of taxonomic classification across all of my samples and visualize the number of observations for each classification level within my population of sequenced microbial isolates.
I have been trying to learn by following your https://cran.r-project.org/web/packages/metacoder/vignettes/introduction.html, but my data does not seem to be in the same format as the
hmp_otus
file.Is there a way to use
metacoder
andtaxa
to parse the sourmash classification data I have described to generate counts that can be visualized as a heat tree, or do I need to somehow generate counts first?The text was updated successfully, but these errors were encountered: