Dear Phil,
I just wrote an implementation of IRS right now for one of my pipelines and I was checking for reference your code at:
https://pwilmart.github.io/IRS_normalization/understanding_IRS.html
I think there is a mistake, line:
irs <- tibble(rowSums(exp1_sl), rowSums(exp2_sl), rowSums(exp3_sl))
should be
irs <- tibble(apply(exp1_sl, 1, function(x) exp(mean(log(x)))),
apply(exp2_sl, 1, function(x) exp(mean(log(x)))),
apply(exp3_sl, 1, function(x) exp(mean(log(x)))))
that is, you want an average value, and more generally, the same averaging function used to calculate irs$average should be used.
Otherwise, and unless I am missing something here (but it is very simple arithmetic, and the concept is very simple and clear), the calculations do not seem to make sense: we want to correct, row-wise, for each TMT batch by the ratio between the general dataset's average and the average of all of the batch's channels (or reference channels if there are any).
Best,
Armel
Dear Phil,
I just wrote an implementation of IRS right now for one of my pipelines and I was checking for reference your code at:
https://pwilmart.github.io/IRS_normalization/understanding_IRS.html
I think there is a mistake, line:
should be
that is, you want an average value, and more generally, the same averaging function used to calculate irs$average should be used.
Otherwise, and unless I am missing something here (but it is very simple arithmetic, and the concept is very simple and clear), the calculations do not seem to make sense: we want to correct, row-wise, for each TMT batch by the ratio between the general dataset's average and the average of all of the batch's channels (or reference channels if there are any).
Best,
Armel