open the .qza files generated by q2-PICRUSt2 in R

738 views
Skip to first unread message

Alice

unread,
Mar 20, 2019, 1:03:31 PM3/20/19
to picrust-users
Dear Gavin,

I run picrust2 analyses using the PICRUSt2 QIIME2 plugin and following your tutorial. 

I obtained the 4 output files (ec_metagenome.qza, ko_metagenome.qza, pathway_abundance.qza, pathway_coverage.qza). 

I would like to open those files with R to do further analyses, in particular see the features table (EC, KO or pathway) per sample.

In order to do that, I tried to use the read_qza function from the qiime2R package (https://rdrr.io/github/jbisanz/qiime2R/man/read_qza.html). But I get the following error:


Error in read_biom(paste0(tmp, "/", artifact$uui, "/data/feature-table.biom")) :

Both attempts to read input file:

/var/folders/x6/clm4hj_54rjbhvlq56n652sh0000gn/T//RtmpeaKkxD/1fbcde60-ecb7-4736-9c2f-3701f55d6e80/data/feature-table.biom

either as JSON (BIOM-v1) or HDF5 (BIOM-v2).

Check file path, file name, file itself, then try again.

 

I also tried to convert the .qza file to .biom file using the qiime tools export function and then to open the .biom file with read_biom but I get a similar error. Could you indicate me how to open those .qza files in R?


Many thanks for your help.


A.

Gavin Douglas

unread,
Mar 20, 2019, 2:14:40 PM3/20/19
to picrus...@googlegroups.com
Hi Alice,

I would recommend exporting the QZA files to BIOM files as you have done. What I usually do to use BIOM files in R is to first convert them to the legacy TSV format:

biom convert -i INFILE.biom -o OUTFILE.biom.tsv —to-tsv

You can then read this file into R with the standard read.table function (and you can use the options skip=1 and comment.char=“” to skip the extra starting line and read in the headerline properly).


Best,

Gavin 

-- 
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To post to this group, send email to picrus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages