cmapM icon indicating copy to clipboard operation
cmapM copied to clipboard

multiplication factor

Open marouenbg opened this issue 6 years ago • 3 comments

Why are the weights multiplied by 0.5 in the modz calculation? https://github.com/cmap/cmapM/blob/5c59db2937e0059f8894a4accb27d36ce1e31474/%2Bcmapm/%40Pipeline/private/modzs.m#L42

marouenbg avatar Apr 24 '19 20:04 marouenbg

all weights are normalized and should sum to 1. so weights should multiplied by .5 for example: three replicates: a b and c. and the correlation are Sab, Sac, Sbc. so the weights before normalized will be Sab + Sac, Sab + Sbc, Sac + Sbc for a, b and c, respectively. After normalized weights will be (Sab + Sac) / 2(Sab + Sac + Sbc) for a.....

weizhiting avatar Jul 03 '19 11:07 weizhiting

makes sense, but it shouldn't be hard coded in case there are less than three replicates. should be 1/(size(cc, 2)-1)

marouenbg avatar Jul 04 '19 00:07 marouenbg

nope the 0.5 is completely useless, you would get the same results if you remove it. For example to compute the weight of a replicate A (and AB is the correlation between replicate A and B) you would get (according to the code) weightA=0.5(AB+AC)/(0.5(|AB+AC|+|AB+BC|+|AC+BC|)), 0.5 then cancels out and the (absolute?) weight of the three replicates sums to one as expected. I think the numerator was left signed for QC purposes.

marouenbg avatar May 08 '20 06:05 marouenbg