Skip to content
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

Update parse_taxonomy.R #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adossantos1
Copy link

@adossantos1 adossantos1 commented Jun 27, 2024

Add option for adding custom ranks and trimming when importing taxa. Also add a warning when dropping ranks.
For phyloseq import use could be:

ps <- qiime2R::qza_to_phyloseq(features = features_path, tree = tree_path, metadata = metadata_path)
tax_table(ps) <- parse_taxonomy_custom(read_qza(taxonomy_path, tmp=tmp)$data) %>% as.matrix

For PR2 database with 9 ranks:

ps <- qiime2R::qza_to_phyloseq(features = features_path, tree = tree_path, metadata = metadata_path)
tax_table(ps) <- parse_taxonomy_custom(read_qza(taxonomy_path, tmp=tmp)$data, ranks = c("Domain", "Supergroup", "Division", "Subdivision", 
            "Class", "Order", "Family", "Genus", "Species")) %>% as.matrix

Fixes #66
Includes changes from bingli2019 and jthmiller pull requests

Custom ranks and trimming for parsing taxa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update parse_taxonomy for new PR2v5 (April 2023) nine level taxonomy
1 participant