# How to relate isometric log ratio \[ILR\] transformed compositional data to original attributes?

**URL:** <https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794>\
**Category:** User Support\
**Tags:** composition\
**Created:** [June 29, 2018, 7:58am UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794 "2018-06-29T07:58:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jespinoz](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/e9bcb4/32.png) [@jespinoz](https://forum.qiime2.org/u/jespinoz)\
**Post date:** [June 29, 2018, 7:58am UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794/1 "2018-06-29T07:58:00Z")

</div>

I am having trouble grasping the concept of isometric log ratio transformation and how to interpret the resulting transformation. To my understanding, the ILR represents log ratios between left and right subtrees going down the dendrogram of the basis? Since the input (n,m) matrix is projected into a (n,m-1) space there doesn't seem to be a direct way to associate the transformed data with the original attributes? I am implemnting it via [http://scikit-bio.org/docs/0.5.1/generated/generated/skbio.stats.composition.ilr.html](http://scikit-bio.org/docs/0.5.1/generated/generated/skbio.stats.composition.ilr.html) and there an inverse ilr function that projects the data back into the relative abundance but I don't understand how to interpret the transformed data. I have a few questions:

(1) Know which columns represent which attributes or nodes?  
(2) Why exactly do you end up with m-1 attributes?  
(3) If you had X which was (n=sample rows,m= attribute columns) where the data was converted to relative abundance so each sample sums to 1, could you calculate the ILR with respect to axis=0 if you wanted to create a pairwise correlation matrix of the attributes? shape = (m,m)  
(4) Is there a way to directly relate the transformed data with specific attributes in the original?

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [July 2, 2018, 2:15pm UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794/2 "2018-07-02T14:15:12Z")

</div>



---

<div class="post-metadata">

**Author:** ![mortonjt](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mortonjt/32/3488_2.png) [@mortonjt](https://forum.qiime2.org/u/mortonjt)\
**Post date:** [July 2, 2018, 4:24pm UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794/3 "2018-07-02T16:24:18Z")

</div>

1. Have you been able to run the [gneiss tutorial](https://docs.qiime2.org/2018.6/tutorials/gneiss/)?

There are also a few similar posts on how to interpret balances, which may help with figuring out how to interpret these results

> [@Understanding Gneiss - questions regarding the analysis](https://forum.qiime2.org/t/understanding-gneiss-questions-regarding-the-analysis/3244/14):
>
> Sorry I meant this type of heatmap, not the one in the regression .qzv: [image]

> [@Gneiss: Coordinates from the balances vs. metadata plot](https://forum.qiime2.org/t/gneiss-coordinates-from-the-balances-vs-metadata-plot/2963):
>
> Hi everybody and @mortonjt Two things from my gneiss analysis that I would love to have your input on. 1. I wanted to check if I take the right approach in testing my hypothesis and plugging in the right meta-variable in the appropriate command. Basically, I am seeing variation in the microbial community along a soil depth profile and I would like to check several geochemical parameters as metadata if there is some correlation using balances. So, I chose gradient-clustering because I want to a…

> [@Balance interpretation confusion](https://forum.qiime2.org/t/balance-interpretation-confusion/946/13):
>
> Hi @mortonjt, Yes, I mean that I have multiple levels within a variable, I have treatment (drug 1 vs drug 2) and Day (day 0 vs day 14). I would like to visualize the effects of the different treatments across the different time points. Thanks, I will try the lme-regression, as treatment over time is a question we are curious about. I saw that I could look at the balance-taxonomy, but I will definitely look into pulling out the best balances and plotting them remotely. Thanks, Samantha

1. You end up with m-1 attributes since we are dealing with proportions, which live in a m-1 dimensional space. The ilr is a direct mapping from the m-simplex to m-1 real space.

Another way to think of it is the ilr transform computes the transformation between the proportions in the tips and log ratios in the ancestral states in the tree. If there are m tips, there are exactly m-1 internal nodes.

1. No. The ilr tranform will not give pairwise correlations, that is a very different discussion. I would look at tools such as [SPEIC-EASI](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004226) to answer those sorts of questions

2. If I am understanding this question correctly, the answer is yes.  
Each balance just represents two groups of features (in the context of phylogenetics, you can think of a balance as an ancestral state in the phylogenetic tree.)

---

<div class="post-metadata">

**Author:** ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)\
**Post date:** [July 2, 2018, 4:48pm UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794/4 "2018-07-02T16:48:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [August 2, 2018, 10:48pm UTC](https://forum.qiime2.org/t/how-to-relate-isometric-log-ratio-ilr-transformed-compositional-data-to-original-attributes/4794/5 "2018-08-02T22:48:27Z")

</div>

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