Closed bylam closed 1 month ago
For quick solutions you could use the microbiome package function aggregate_taxa which will just paste all the ranks above genus together to give you unique but long names, or use the force = TRUE argument in the microViz tax_agg function, which will discard higher rank information, possibly leading to misleading aggregations if you have e.g. g__ or similar "classifications" in your tax table.
A better solution in my opinion (if discrepancies at higher ranks are unavoidable) would be to paste a few ranks together intentionally, with e.g. tax_mutate(class_family_genus = paste(class, family, genus), genus = NULL, family = NULL) to disambiguate any genus level features inconsistently assigned to family or class level groups, but keep manageable length of feature names.
hope this helps
assuming this issue is resolved, feel free to open new issue if not :)
I have been facing significant challenges with the "Taxa cannot be aggregated at rank: Genus tax_agg" issue, especially when inconsistencies at the previous taxonomic level are unavoidable, particularly during denovo analysis. I would like to prevent this error from occurring when aggregating data and only aggregate the abundance at the current taxonomic level. I prefer not to modify the original annotation file. Your assistance in resolving this matter would be greatly appreciated.
Thank you for your support and help. I look forward to your response.