Hello,
this might be a question not directly towards qiime2 but related to creating a phyloseq object in R with the output created by qiime2.
I am importing the output with qime2R:
otu <- read_qza("otutable.qza")$data
metadata <- read_q2metadata("samplemetadata_master.tsv")
tree <- read_qza("rooted_tree.qza")$data
taxonomy <- read_qza("taxonomy-silva-primer.qza")$data %>%
separate(Taxon, into = c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species"), sep = ";") %>%
column_to_rownames("Feature.ID") %>% as.matrix() %>% tax_table()
This all works fine until I want to call the phyloseq command:
ps <- phyloseq(otu_table(otu_transformed, taxa_are_rows = TRUE), taxonomy, metadata, phy_tree(tree))
which returns the following error:
Error: unable to find an inherited method for function ‘prune_samples’ for signature ‘samples = "array", x = "phyloseq"’
I am really clueless and couldn't really find a solution/ explanation online. I am using R 4.5.1
Thank you!