R-export files to use with R-studio

I have been working in R using phyloseq and microbiome, and I just thought of something which has left me a little worried.

I have exported at rarefied table.qza and have been working with and performed an NMDS and PCA and what not, but although I also created the phyloseq object, every time I attempt to use it with a function, it doesn’t quite work. As such, I have created object to use in R, based on the qza tables (table$data) etc.

Regardless, my question is, since I have the rarefied table containing otu id’s and frequency, and usually the otu-table used in R contains taxonomy, should I collapse my table and then export?

Hi @Fabs,

Here is how I import qiime2 artifacts into phyloseq. You can just download the jupyter notebook, or copy the code, and change the file names accordingly.

Does this help answer your question?

1 Like

Hi Pedro,

I manage to import the files using this [tutorial]

And created the phyloseq object. I guess I’m confused about calling out the object when I need to use them. For example, If I need to use the OTU table for a certain code, like to calculate the top abundant species in each site, how do I call it out from phyloseq? I did try some other tutorials, but I constantly got an error, so I figured I didn’t really understand how to work with phyloseq.

On a side note: When looking through the tutorial and see the summary(depths) they report, I see that they vary. I am using a rarefied table, is this okay?

I will try the code you sent in the meantime, but if you have any other pointers I would love to hear them.

Thanks :slight_smile:

Hi @Fabs,

I never saw that tutorial before, that is great!

Well since you have your phylseq object all up and going try this tutorial. It is similar to the last one with added analysis. Search for ' top 20 abundant bacteria'. Let me now if this is more of what you need.

Yes it is. So after looking through it, it seems like I call an object by just calling it “physeq” (the name I created for my phyloseq object) correct?

It seems to be working, thus far. I just wasn’t aware that it would recognize what element in the object I wanted to look at .

If I get lost or stressed, I will contact you. Thanks a million

Yes that is correct. Good luck on your analysis!

1 Like

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