MicrobiotaProcess icon indicating copy to clipboard operation
MicrobiotaProcess copied to clipboard

how to import files from qiime2

Open pavlo888 opened this issue 5 years ago • 3 comments

Hi,

I am trying to import my qza files from qiime2 and I am getting an error.

I write down this command:

otuqzafile <- file.path("C:", "Users","u0114295","Documents","ghm_microbiome_2020May","feature-table-tomato-only.qza") taxaqzafile <- file.path("C:", "Users","u0114295","Documents","ghm_microbiome_2020May","taxonomy-silva.qza") mapfile <- file.path("C:","Users","u0114295","Documents","ghm_microbiome_2020May","metadata-tomato-only.txt") ps_qiime2 <- import_qiime2(otuqza=otuqzafile, taxaqza=taxaqzafile, mapfilename=mapfile)

And I get this error: Error in file(file, "rt", encoding = fileEncoding) : invalid 'description' argument In addition: Warning message: In unzip(qzafile, exdir = tmpdir) : error 1 in extracting from zip file

Could you please help me solve this issue?

Thanks!

Cheers, Pablo

pavlo888 avatar Jul 06 '20 11:07 pavlo888

If you want to use import_qiime2. You can refer this.

xiangpin avatar Jul 06 '20 11:07 xiangpin

Hi Xiangpin,

Thank you for your reply.

I have tried the command suggested in the thread you referred me to but I still get an error.

ps <- import_qiime2(otuqza="./feature-table-tomato-only.qza", taxaqza="./taxanomy-silva.qza", mapfilename="./metadata-tomato-only.txt")

Error in file(file, "rt", encoding = fileEncoding) : invalid 'description' argument In addition: Warning message: In unzip(qzafile, exdir = tmpdir) : error 1 in extracting from zip file

Could you help me fix this?

Cheers, Pablo

pavlo888 avatar Jul 06 '20 12:07 pavlo888

I don't think you had set path for your project. I guess feature-table-tomato-only.qza, taxonomy-silva.qza ... are under the ghm_microbiome_2020May. You can try this.

ps <- import_qiime2(otuqza="./ghm_microbiome_2020May/feature-table-tomato-only.qza",
                    taxaqza="./ghm_microbiome_2020May/taxanomy-silva.qza", 
                    mapfilename="./ghm_microbiome_2020May/metadata-tomato-only.txt")

xiangpin avatar Jul 06 '20 12:07 xiangpin