Phyloseq R Package Requrement Files.

Hi,

I have a few questions regarding taxonomy analyzing with the Phyloseq R package:

As mentioned in the phyloseq tutorial, it needs three files:

OTU
Taxonomy
Samples

Question1: should I separate my otu table obtained from Qiime2 in two tables? one for taxonomy table and another one for otus counts- in two different excel files.

Question2:Is the sample file equal to metadata file? Or what?

Please clarify the questions above.

Thanks

Hi! Looks like OTU table should be your exported feature table, Taxonomy - reformatted taxonomy.qza file and yes, samples - your metadata file.

Please take a look at the link above. I also already checked the feature table environment. This is different from what have shown in the page, but OTU table is not that.

OTUs table is the final table we obtain after taxonomy classification. It has two parts: taxa and counts in one .csv file, which generated after computational procedure in Qiime2. The taxa parts admittedly called taxa table, and the count part named OTUs count. Altogether they are named a OTUs table. I personally believe that this explanation would be true; I am not sure indeed. I wanted to clarify it and then to know that should I separate the OTUs table in two different excel files? Because in the phyloseq tutorial represented that the three files are needed!

I think the SAMPLE file is the metadata file but I needed to be certain again by admins or professional microbiome guys.

I hope I could be able to enlighten you!

Thanks

Feature table in Qiime2 produced before taxonomy annotation after denoising step, or after OTU clustering depending on your workflow. It consists of a biom file, which exists as a feature-table.qza. If you export this file from Qiime2, it will be exported as a biom file. You can convert the biom file to a .tsv file and it would look like a file by the link - abundances of ASVs/OTUs by samples.
So it can be used as a first page of excel file.

A taxonomy.qza file consist of another tsv file, in which each OTU/ASV is assigned to taxonomy. This file you are receiving in Qiime2 after taxonomy annotation, unlike a feature-table.qza. But in Qiime2 taxonomy levels are separated by semicolons, unlike the file by the link. So you need to reformat it.
It is a second page in excel file by the link.

And third file is your metadata file. I don’t know if you need to add some specific columns there for the analysis.

OK! Thanks. Does it necessary convert the feature-table and taxonomy files to .tsv format? If yes, so how? Can you tell me where can I do that?

Another question: the taxonomy annotation file is generated in .csv file. But feature-table file format is different and it is impossible to convert to .csv file because there are a couple files wirh different formats. So, I am not sure phyloseq needs .tsv format files for the both, or I have to convert them to excel file.

The third question: which excel format is needed for phyloseq if it is required “.csv” or “xlsx”? the readxl package opens xlsx format while for example taxonomy annotation file is .csv that is why it made me to ask it.

No, it is not necessary to convert a csv to tsv format. I just wrote it like this because when I exported a biom file, it was easy for me to convert it to a tsv file. From this you can just copy and paste data to excel file, for example, or use a specific tool for it.

I opened the data file of feature-table. There is no .tsv format file.

As I wrote earlier, you need to extract a biom file from feature-table.qza file. This biom file can be converted to a tsv file. I can provide you wsth exact commands in few hours, when I will access my laptop, I am typing from the phone now

Here it is:
Create a directories for output files
mkdir Biom Taxa
Export a biom file from Qiime2

qiime tools export \
    --input-path feature-table.qza \
    --output-path Biom/

Convert biom file to tsv

biom convert -i Biom/feature-table.biom -o Biom/feature-table.tsv --to-tsv

This tsv file you can open and copy data to excel or manipulate it by specific tool/commands.

Export taxonomy file

qiime tools export \
    --input-path taxonomy.qza \
    --output-path Taxa

You need to manipulate taxonomy.tsv file to copy data to excel and separate taxonomy levels by separate columns as shown on the website by the link.

PS.

You opened feature-table.qzv file, but biom is in feature-table.qza file

2 Likes

Thanks a lot! You are right.

Hi @TurboQiimer,
The topic of going from QIIME 2 to phyloseq has been covered quite a few times on the forum, there is even a nice package + tutorial that facilitates this process.

3 Likes

Hi @Mehrbod_Estaki
I followed the tutorial. I got errors. I started with my files, not the example files in the tutorial. I looks too difficult to understand what goes to happen. Is there ready commands I replace my file names in the command then obtain the plots? Or could you introduce easy-to-understand tutorial to me? Or please guide me what can I do.
Thanks