Error in validObject(.Object) : invalid class “phyloseq” object:

A newbie to QIIME2 here!
I am using phyloseq to analyze my 16S data. I created a BIOM file for analysis in R, when I am trying to create a phyloseq object I keep getting an error in R.

Is there something wrong with my BIOM file maybe? or the tree.object? I would appreciate your kind assistance.

I have attached my BIOM file and metadata

####Here is the script I ran in R

Load the biom files

file = “C:/Users/enghalipo/OneDrive - Namibia University of Science and Technology/Documents/PhD work/Data Analysis/16S/16S_taxonomy.biom”

Load the abundace tables

abundance.table = import_biom(file, taxaPrefix=F)

Load the mapping files

map = “C:/Users/enghalipo/OneDrive - Namibia University of Science and Technology/Documents/PhD work/Data Analysis/16S/metadata3.txt”

Load the mapping tables

mapping.table=sample_data(read.table(map, header=T, sep="\t", row.names=1))

#Create the Phyloseq objects
physeq=phyloseq(otu_table(abundance.table),tax_table(abundance.table), mapping.table)
physeq=subset_samples(physeq, Groups %in% c(“Hummock_10”,“Hummock_8”,“Hummock_5”,“Hummock_4”,“Hummock_2”))

#Quality Control

#Give a colnames to separate different taxonomic levels
colnames(tax_table(physeq))=c(“Domain”, “Phylum”, “Class”, “Order”, “Family”, “Genus”, “OTU”)

Load the tree file (use the unannotated.tree)

treefile = “C:/Users/enghalipo/OneDrive - Namibia University of Science and Technology/Documents/PhD work/Data Analysis/16S/97_otus_unannotated.tree”
tree.obj = import_qiime(treefilename = treefile)

Now merge the three separate phyloseq objects into a single object

otu.table = merge_phyloseq(physeq, mapping.table, tree.obj)

####Here is the error I am getting after the last command:

Error in validObject(.Object) : invalid class “phyloseq” object:
Component taxa/OTU names do not match.
Taxa indices are critical to analysis.
Try taxa_names()

16S_taxonomy.biom (3.7 MB) metadata3.txt (3.0 KB)

###The Qiime2 version I am using in our server
Python version: 3.6.7
QIIME 2 release: 2019.7
QIIME 2 version: 2019.7.0
q2cli version: 2019.7.0

Hi there @elise_nghalipo !

I think there might be a little mixup here, QIIME 2 and phyloseq are unrelated projects, I think you might have better luck asking for phyloseq help over at their homepage: phyloseq: Explore microbiome profiles using R

Sorry, I know that isn’t much help, but we aren’t phyloseq experts here.