jbisanz/qiime2R

Getting an error while trying to creat a phyloseq object in R

Closed this issue · 3 comments

Hello all,

I am trying to create a phyloseq object but I am getting an error. I have searched different pages and forums but I couldn't find a solution for my problem. I would really appreciate it if anyone could help me out, please.

The codes that I am running in R are the following:

physeq <- qza_to_phyloseq( features = "table.qza", tree = "rooted_tree.qza", taxonomy = "taxonomy.qza", metadata = "metadata.tsv" )

And the error that I get is:

Error in methods::as(data[[i]], colClasses[i]) : no method or default for coercing “character” to “Categorical”

The metadata that I am using is the following:
Screenshot from 2020-10-12 11-27-15

Thank you all.

Hmm, this is likely related to read_q2metadata(). I think the problem is that you have used a capital C on "Character". Looking at the [qiime2 metadata standards]((https://docs.qiime2.org/2020.8/tutorials/metadata/) I see that these column names are case insensitive and I will fix this in a future update. In the meanwhile, just switch to character and I suspect your problem will be solved.

Hmm, this is likely related to read_q2metadata(). I think the problem is that you have used a capital C on "Character". Looking at the [qiime2 metadata standards]((https://docs.qiime2.org/2020.8/tutorials/metadata/) I see that these column names are case insensitive and I will fix this in a future update. In the meanwhile, just switch to character and I suspect your problem will be solved.

Thanks very much. It worked.