OTU Tables Relative Frequency to Relative Abundance

Hello all,
I am wondering how the BIOM and TSV files relate to the .csv file downloaded from QIIME2 View Website where I put in the barplots.qzv file? Also, I wanted to ask what the difference between Relative Frequency and Relative Abundance within the samples? The graphs all have Relative Frequency (%) on the Y axis, but, for the purpose of my project, I need the y axis to be converted to Relative Abundance?
Thank you!

1 Like

Hello Jen,

These are the same!
Also known as

  • fraction (out of 1)
  • percent (per :100:)
  • CPM counts per million (per million)

This depends on what was run... You can find out by checking the provenance!

For example, taxa-bar-plots-1.qzv | Qiime2 view now (from the Cancer Microbiome tutorial)

Click on Provenance > then inspect everything that went in to making that file:

2 Likes

Thank you for explaining!
So to translate the Relative Frequency to Relative Abundance, the percentages would be converted to whole numbers, since they are the fraction of what makes up the sample.
For example:
Relative Frequency of Sample X = Species A at 2%, Species B 171%, Species C 5%, Species D 27%, Species E 133%, Species F 15%, Species G 14%, and Species H 7%
Relative Abundance of Sample X = Species A .02, Species B 1.71, Species C .05, Species D .27, Species E 1.33, Species F .15, Species G .14, Species H .07

Thank you for your help,
Jen

Sure?

I would say these are all synonyms:
Relative Frequency is Relative Abundance is percent. No conversion necessary.

"Do you mean 0.02 or 2%??"
"Yes"

So, fractions add up to 1.0 and percents add up to 100%.
This tells me that sample X is not one sample, because it can't have >100%.
Maybe sample X was made by summing up the fractions in group X?

I suppose this is your example, so you tell me; what does 171% mean?

1 Like

Those numbers were from the QIIME2 View barplots.qzv file at Level 7 (the .csv file). I am confused as to why the downloaded file has those numbers instead of the percent, where the "171" for Species B is 45.722%.

1 Like

I see!

Would you like to post that file or a screenshot so I can take a look?

Thank you for tracking this carefully and asking detailed questions. I think it's really important to know what the numbers mean and how they were calculated, so I'm happy to answer any questions you may have!


The screenshot is of the barplots.qzv file at Level 7, specifically showing the Species B found in all samples per Relative Frequency (%), the Sample X in question (95A in this graph) shows that the relative frequency is 45.722%.
Examplecsv.csv (1.1 KB)
I also attached downloaded .csv file with the Sample X and the species ID'ed within the sample per "Relative Frequency", though for species B (Lac. maximus) is 183, not 171, my apologies.
Thank you for your help!

1 Like

Ah, that explains the discrepancy!

While that graph shows percent for each taxa in each sample, the downloaded CSV file does not! Instead, it shows whatever values were in the input table, summarized by sample and taxonomic level.

I think that's probably a count of 183 for all the ASVs of species B (Lac. maximus) in that one sample. This could be 15% or 0.7% or 0.0001%, depending on the total number of reads in that sample.

After writing that out, I realize that's confusing!
It would be more clear to have two options:

  • Download CSV: from the input table
  • Download CSV: Relative Frequency matching the :bar_chart:

That's a good feature request! :white_check_mark:

Are you looking for the relative frequencies shown in that graph?