bioFAM / MOFA

Multi-Omics Factor Analysis
GNU Lesser General Public License v3.0
235 stars 60 forks source link

plotDataHeatmap() plots interpretation #45

Closed merlevede closed 5 years ago

merlevede commented 5 years ago

Hello,

I am not sure I understood properly what shows the plotDataHeatmap(). In the documentation, we find:

Function to visualize the loadings for a given set of factors in a given view. This is useful to visualize the overall pattern of the weights but not to individually characterise the factors.

Let us assume I have 2 layers, gene expression and methylation both at gene level. Moreover, from the plotVarianceExplained(), I see that the factor 1 is represented by both layers. When looking at the heatmap obtained from plotDataHeatmap(MOFAobject, view = "mRNA", factor=1), I see features that are enriched in factor 1 in each patient. Are the genes that are enriched the result of the integration of both layers or only genes enriched in gene expression? In particular, if instead of methylation at gene level I have it at CpG level, it would be impossible to show CpGs in the gene expression view.

To summarize, I have 2 questions:

Thank you, Jane

rargelaguet commented 5 years ago

Hi Jane, sorry for not replying. Did you figure this out?

merlevede commented 5 years ago

Hello Ricard,

More or less. Could you please tell confirm the following: The values plotted in plotDataHeatmap() for layer i are : Wi * Z. Is it correct?

rargelaguet commented 5 years ago

No, the values plotted are not the predictions (Wi*Z) but the observations (Yi). In MOFA v2 we included the option to plot the predictions: plot_data_heatmap(denoise=T)

rargelaguet commented 5 years ago

P.S. If you have missing values in Y, and do plotDataHeatmap(imputed=TRUE) then the NAs will be indeed filled with the predictions

merlevede commented 5 years ago

Ok, I see. Thank you