MicrobiotaProcess: invalid zip name argument

Hello! I am attempting to integrate some files from qiime2 into a package called MicrobiotaProcess. I've been using qiime2R to read my table.qza and taxonomy.qza file. But when I try to integrate it into MPSE (like one would do with phyloseq), it gives me this unzip error.

When I open up asvtable$table, I can see the data in the correct format... So shouldn't it already be unzipped? I usually use command line for qiime2 so this is a naive question!

Here is my script:

library(MicrobiotaProcess)
library(phyloseq)
library(BiocManager)
library(qiime2R)

# importing qiime2 files
asvtable <- read_qza("microbiotaprocess/table.qza")
taxonomy <- read_qza("microbiotaprocess/taxonomy.qza")
mapfile <- read.table("microbiotaprocess/mappingfile.txt", header = TRUE)

# viewing data
asvtable$data
taxonomy$data

mpse2 <- mp_import_qiime2(otuqza=asvtable, taxaqza=taxonomy, mapfilename=mapfile)
mpse2

Here is the error:

mpse2 <- mp_import_qiime2(otuqza=asvtable, taxaqza=taxonomy, mapfilename=mapfile)
Error in unzip(qzafile, exdir = tmpdir) : invalid zip name argument

Thank you!

Hi @zahra ,

If you search for the function that raises the error (mp_import_qiime2) in the corresponding tool documentation (you can also type ?mp_import_qiime2 within your R session):

As you can see, the function is expecting file paths, not data already in R. This makes sense, since you can have data within R in a lot of different formats, while QIIME 2 files always follow the same standard and it is easier for a import function to handle files with a consistent format.

This error message is indeed a good clue. The function is expecting a zip filename, since it is calling unzip() and it is complaining about the file not being a zip. And what are QZA files? Exactly!

Best,

Sergio

1 Like