multiplication factor
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
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.....
makes sense, but it shouldn't be hard coded in case there are less than three replicates.
should be 1/(size(cc, 2)-1)
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.