jbisanz / qiime2R

Import qiime2 artifacts to R
MIT License
156 stars 53 forks source link

QZA to FASTA? #55

Closed hank00000 closed 10 months ago

hank00000 commented 11 months ago

A colleague sent me a qza file containing trimmed reads. I use qiime2r in other projects where they send me the finished assigned product, but this time it's only the trimmed reads. I know in qiime2 you can export qza as fasta, but I like qiime2r because this way I never have to download qiime2 and I can just got through R. Is there a way in this package that I can take a qza and get fasta files for dada2 input?

jbisanz commented 10 months ago

This functionality could be added in, but perhaps the easiest thing is to unzip the artifact and find the files yourself to feed into dada2. Something like this:

unzip("yourreads.qza", "unpacked_reads")
forward<-list.files("unpacked_reads", pattern="_R1_", full.names=TRUE)
reverse<-list.files("unpacked_reads", pattern="_R2_", full.names=TRUE)