Qiime2R-Phyloseq Taxonomy import error

Hello,

I have a quick question in regards to using Qiime2R to create a phyloseq object. I have previously used Qiime2R to create a phyloseq object using my fungal data, but when I use it for my bacteria data, I get an error.

The error occurs when I try to read_qza the taxonomy file.
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1596 did not have 3 elements

This is the code I ran:

Metadata<-read_tsv(“Bacteria-Metadata-Lib1-4-Clean-Rare.tsv”)
Table<-read_qza(“rarefied_table.qza”, tmp = “C:/tmp”)
Tree<-read_qza(“Bacteria-rooted-tree.qza”,tmp = “C:/tmp” )
Taxonomy<-read_qza(“Bacteria-taxonomy132.qza”,tmp = “C:/tmp”)
Taxtable<-Taxonomy$data %>% as_tibble() %>% separate(Taxon, sep = “;”, c(“Kingdom”,“Phylum”,“Class”,“Order”,“Family”,“Genus”,“Species”)

When I look at the Bacteria-taxonomy132.qzv I see the following:I believe I am looking at the correct line, but I am not 100% sure.

D_0__Bacteria;D_1__Bacteroidetes;D_2__Ignavibacteria;D_3__OPB56;D_4__uncultured bacterium #0319-6E22;D_5__uncultured bacterium #0319-6E22;D_6__uncultured bacterium #0319-6E22 0.7843554630

I noticed that this line has multiple #(hashtags) and not sure if this is what is causing the error, but if it is, could you please let me know how I can address it.

  1. Can I edit the .qza file, if so, how?
  2. Or can I import it but somehow avoid this error?

If you could please let me know, I would really appreciate it?

The # were certainly the issue, thanks for doing thorough check! I have made an update to allow #s in the taxonomy string. Please reinstall from github and let me know if it works for you.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.