How do I extract my data as a ASV file for use in R?

Hi there,

I'm trying to use my QIIME outputs for data analysis in R using the phyloseq package.

Part of the code I'm using requires my files to be in .asv format. I thought I could get around this by converting my .biom file to a .tsv file, however I don't think this has helped.

I keep getting this error when trying to run the phyloseq fuction in R:
code =
physeq <- phyloseq(asv.tab, tax.tab, sample.data)

error =
Error in validObject(.Object) : invalid class “phyloseq” object:
Component sample names do not match.
Try sample_names()

I was wondering

  1. How do you extract your data from QIIME in ASV format, rather than biom or taxabarplot etc..

  2. I have tried the sample_names() function in a variety of ways and it has not worked. I've scoured the github-sphere and cannot figure out what the problem is, and the only think I can think is because the names in the files don't align somewhere and this is because I don't actually have an ASV file.

  3. Has anyone had this error before? I can post my script up until the error point too if needs be.
    Also noting that I haven't had any errors with any of the other script in R up until this point.

Thanks :slight_smile:

Grace

Hi @Grace1,
There’s an easy way to get your qiime2 data into R and into phyloseq objects in this Community Contribution tutorial. Give that a go and let us know if you run into any problems.
Good luck!

1 Like

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