-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to filter non-significant odd named taxa, and only keep the significant odd named taxa? #324
Comments
What do you mean by significant? Can you give me an example? You can make a list of taxa you want to be displayed no matter what and do this: metacoder::filter_taxa(grepl(taxon_names, pattern = "^[a-zA-Z]+$") | taxon_names %in% my_taxon_name_list, reassign_obs = FALSE) |
Statistical signifiance after correcting for multiple comparisons. This is what I did: create a new column called wilcox_p_value_p.adjusted to correct for multiple comparison
create a new column in diff_table containing log2_median ratio, then mutate this to remove values where wilcox.p.adjusted value is not significant, first create this new column with identical values then mutate this new column to remove non-signif values Then I created the tree to only display significant taxa after correcting for multiple comparisons at the genus level
Let me know if I am doing anything wrong |
Ok, I understand now. Thanks for the code! I see that you set the non-significant taxa to 0 but I dont see where you are filtering them out. Either way, if you want to remove and taxa with odd names that are not significant you can do something like: metacoder::filter_taxa(! (wilcox_p_value_p.adjusted > 0.05 & ! grepl(taxon_names, pattern = "^[a-zA-Z]+$")), reassign_obs = FALSE) |
Thanks for that, but unfortunately I get this error when I replace
Error: TRUE/FALSE vector (length = 1452) must be the same length as the number of taxa (242) Oh did I do something wrong? I thought I did filter them out by having this line: set.seed(1) |
Can you send me an example data set with associated code that reproduces the issue? Its hard for me to debug without reproducing the error. |
Sorry dumb question, but how do I send an example data? My original data file is huge as it's a qza file from QIIME2 analysis and I'm not sure what I need to do to it. |
No problem, its a common question. If you can reproduce the error with a subset of the data, you can attach it to this issue to upload them. You can save the needed R objects to a file with |
Thanks, I just emailed it to you! |
Hi there!
I've been using metacoder::filter_taxa(grepl(taxon_names, pattern = "^[a-zA-Z]+$"), reassign_obs = FALSE) %>%
to remove odd taxa, but some of the odd named taxa are significant and I would like them to be displayed on the tree.
Is there a way to only display the significant odd named taxa?
The text was updated successfully, but these errors were encountered: