MOFA2 icon indicating copy to clipboard operation
MOFA2 copied to clipboard

calculate_contribution_scores

Open ChristianRohde opened this issue 1 year ago • 0 comments

Hi there,

I have a question/suggestion about the MOFA2::calculate_contribution_scores function which "calculates, for each sample how much each view contributes to its location in the latent manifold". This was exactly I was searching for in the manual. I agree that keeping at least 2 views is crucial, but with respect to factors I really want to limit the contribution to each individual factor. Unfortunately the original function does not support this. However, when I remove the stop "contribution scores only make sense when having at least 2 factors" in the function it runs well and give meaningful results. Would you support my view that this actually makes sense?

To give you some idea how it looks like: here I wanted to show which OMIC contributes most to the samples factor values in order to illustrate the factor vs feature plot. For this purpose I extract the max OMIC and its contribution value. With this strategy I can use the max value as size and the max OMIC as shape. I can easily do this with the original function using all factors:

overall_LF

If I tweak the function it makes quite some difference. Only for 2 samples no contribution was detected which I set as unknown and used the min overall value:

single_LF

What do you think about my approach? Do you agree that this is useful?

Best, Christian

ChristianRohde avatar Feb 08 '23 19:02 ChristianRohde