Closed david-barnett closed 1 year ago
Hi @hank00000 The behaviour you report is surprising, and might be a bug:
Could you check the following things for me?
# Get example phyloseq object data
data("dietswap", package = "microbiome")
pSeq <- dietswap
a <- pSeq %>% tax_select(tax_list = "Bif", n_typos = 0, ranks_searched = "Genus")
a
physeq
actually don't match "Meth" at family level? I guess this should be pretty obvious from a quick scan of tax_table(physeq) but if a lot of them are matching you could check tax_fix_interactive(physeq)
packageVersion("microViz")
Hi David,
I'll note that when I first tried this, no error message popped up but I just noticed that no change occurred, but now after re-starting, updating, troubleshooting a bit, trying different taxa levels, it still doesn't work but says "Error in tax_select(physeq, tax_list = "meth", n_typos = 0, ranks_searched = "Family") : No taxa matched."
Hi Hank, thanks for checking those things:
The matching is case-sensitive, so "Meth" and "meth" should give different results. Lowercase "meth" probably shouldn't match any families, so the new error would be expected.
Does "Meth", with a capital letter, still match every taxon after your updating/restarting?
If so, could you try a slightly different search, just to check the behaviour, e.g. try "Methylomir"
Haha, thanks David. Now I feel silly. I had set my tax_list to 'Capital M' Meth, but not my tax_select command.
ps <- physeq tax_list <- c("Meth") physeqMETH <- (tax_select(physeq, tax_list = "Meth", n_typos = 0, ranks_searched = "Order"))
phyloseq-class experiment-level object otu_table() OTU Table: [ 79 taxa and 68 samples ] sample_data() Sample Data: [ 68 samples by 4 sample variables ] tax_table() Taxonomy Table: [ 79 taxa by 7 taxonomic ranks ] phy_tree() Phylogenetic Tree: [ 79 tips and 77 internal nodes ]
Thanks!
No problem, I'm glad to have helped! :) and glad it's not a bug
Raised in https://github.com/david-barnett/microViz/discussions/101