Error message in qiime2R for taxonomy.qza file

Good day,

When trying to run the cl for importing QIIME2 outputs into R using the tutorial on the forum, I get this error message

taxtable<-taxonomy$data %>% as.tibble() %>% separate(Taxon, sep=";", c("Kingdom","Phylum","Class","Order","Family","Genus","Species"))
Error in taxonomy$data %>% as.tibble() %>% separate(Taxon, sep = ";", :
could not find function "%>%"

IS there a package I may be missing that would lead to this error message? Any advice is much welcomed.

After loading the purr package now I'm getting this error

taxtable<-taxonomy$data %>% as.tibble() %>% separate(Taxon,sep="; ", c("Kingdom","Phylum","Class","Order","Family","Genus","Species"))
Error in separate(., Taxon, sep = "; ", c("Kingdom", "Phylum", "Class", :
could not find function "separate"

Cheers
nyflo

loading the tidyverse should fix your issues ‘library(tidyverse)’

Hello,

Assuming your data is correctly formatted (its probably easier to modify the code if it isn’t rather than change every single file), then saving the whole text file with a .R file type is probably the easiest way of using it. Just activate your conda environment (if you’re doing it that way) move to the directory above the ‘Data’ directory with all your fastq.gz files in and also move the .R file there also, then you can just run it like:

Rscript filename.R