Skip to content

Error in IRS calculations in "understanding_IRS" #6

Description

@Arthfael

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions