-
Notifications
You must be signed in to change notification settings - Fork 28
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
Phyloseq heat tree doesn't see taxon_id or supertaxon_id when trying filter_taxa? #359
Comments
These two warngings are to be expected for the reasons you say:
Just a result of trying to force all the data in the I think the issue might be that ranks are not named "p", by maybe something like "Phylum" in your data set? What does
I really should add a better error message for this case. Take a look at |
Yes, there are "no taxa" according to the code you suggested, but these rank names as I used qiime2 to assign taxonomy (but then input the files into R to make graphs with): d__Bacteria;p__Proteobacteria;c__Gammaproteobacteria;o__Burkholderiales;f__Comamonadaceae;g__Rhodoferax However, I'm able to get heat trees made using the code as long as I don't ask it to filter taxa. So that's what's confusing me, I expected it to either not work or fully work, not half-work, haha. I'll attach a pic of what I was able to get from this dataset. |
I am guessing that there is no taxon rank information in the
This, or something like it, should make the rank information available and then the filter should work. |
Thanks for your help Zachary When I do that, I get this error: Error in parse_tax_data(tax_data = tax_data, datasets = datasets, class_cols = tax_cols, : |
What does |
When I run it with the standard settings for parse_phyloseq obj <- parse_phyloseq(phyR, class_regex = "(.*)", class_key = "taxon_name") |
Ok, so it should be parsing the rank information correctly. What does this return?
|
You got it!! I was filtering based on 'p' because that's what the original data had, but if I filter by "Phylum" it works. Thank you so much for your help. PS: The same errors are thrown about Dataset 3/Dataset 4, but the plot does filter by Phylum. obj <- parse_phyloseq(phyR, class_regex = "(.*)", class_key = "taxon_name") |
No problem! |
Apologies if this has been discussed before or is an easy fix!
I've just been introduced to metacoder and I want to be able to use a phyloseq object as an entry. I can get the code to work pretty well, but as mentioned in the documentation, a pretty large and hard to read heat tree is produced. One suggestion is to filter_taxa by a taxon rank to cut it down a bit, but my object (sourced from standard physique object) won't work to filter by supertaxon. It throws the following error:
Warning messages:
1: There is no "taxon_id" column in the data set "3", so there are no taxon IDs.
2: The data set "4" is named, but not named by taxon ids.
3: In heat_tree.default(taxon_id = character(0), supertaxon_id = character(0), :
'taxon_id' and 'supertaxon_id' are empty. Returning NULL.
Data set 3 is my sample data so it makes sense that there is no taxon id. Data set 4 is the physeq tree that comes with the physique object.
How can I tell the filter_taxa function of the heat map to look in Data set 1 (out_table) or Data set 2 (taxa_data) for this? I know it's because I'm inputting a physeq, but it's much easier for me to do so in my workflow.
As is, I only have it as one line in the heat_tree code as so:
Thank you!!
The text was updated successfully, but these errors were encountered: