Errors:
Error in validObject(.Object) : invalid class “phyloseq” object:
Component sample names do not match.
Try sample_names()
Error in validObject(.Object) :
invalid class “sample_data” object: Sample Data must have non-zero dimensions.
I tried a lot from changing metadata file from tsv file to csv but still the errors stands.
I checked over all the other topics which is similar, but none of it gave a positive result. I am unable to figure out where is the mistake. Kindly help.
This is pretty common when importing data with phyloseq:
This means that the sample names inside your maytable.qza and sample-metadatamay.tsv are different, so phyloseq does not know how to make them match.
As suggested, the sample_names() function is helpful here, because it lets you see what sample name are inside those files so you can edit them to match.
Here, I'm importing the feature table and metadata table separately, then using the sample_names() to see how the names are different. The difference is probably something small like Sample1 vs sample1 or Sample-1.
Once you edit your sample-metadatamay.tsv file so the sample names match, try importing this again and let me know how it goes! That should also solve the 'non-zero dimensions' error!