jbisanz/qiime2R

PR2 Taxonomy does not fit "; " or Kingdom, Phylum... parsing

Closed this issue · 1 comments

When running the qza_to_phyloseq, I am able to join the otu_table, tree, taxonomy, and metadata into a phyloseq file, but the taxonomic hierarchy is not parsed because the PR2 database uses ";" not "; ". I did try to build all the components separately. Then, I could parse the taxonomy qza file into a a taxa_file(taxtable):

taxtable<-taxonomy$data %>% as_tibble() %>% separate(Taxon, sep=";", c("Kingdom","Supergroup","Division","Class","Order","Family", "Genus", "Species")) #convert the table into a tabular split version
taxtable<-taxtable[-1,]#remove the second line that specifies the data type
taxtable$Confidence<-NULL #remove the Confidence column

The table looks correct and all other components (otu_table, metadata) are parsed correctly.

When I went to combine all using qzq_to_phyloseq, I get “Error in unzip(file, exdir = tmp) : invalid zip name argument”

I am running R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Qza files are from Qiime2-2019.1 version.

Any help would be wonderful.
Thank you,
Chris

Hi Chris, thanks for this information. The lack of consistent formatting in taxonomy strings makes this a little difficult to predict and I will have to do some additional work to detect the delimiter. In the meanwhile, when building a phyloseq object using qza_to_phyloseq, it is expecting to be passed the qza files themselves. You will need to separately import the individual qza files and then build a phyloseq object manually using the standard method in phyloseq which would be yourobj<-phyloseq(otu_table(),tax_table(), sample_data(), phy_tree()). More information is here.