0

I have plotted my data on linear scale in xmgrace by using these numbers:

0.001       0
0.00589391  0.10
0.155206    0.20
0.294695    0.30
0.43222     0.40
0.436149    0.50
0.489194    0.60
0.611002    0.70
0.860511    0.80
0.939096    0.90
0.964637    1
1           1

I have use xmgrace in Ubuntu to plot my date and calculate area under the curve (AUC; Data ->Transformation -> Integration-> SumOnly). After converting linear curve to the logarithmic one, I am having a problem with calculating area under logarithmic curve. Has anybody else encountered similar issue?

djordje
  • 319
  • 1
  • 2
  • 9
  • what do you mean with "after converting linear curve to the logarithmic one"? How do you do that in your example? – lr1985 Oct 18 '19 at 14:38
  • @lr1985 In xmgrace (Plot -> Axis properties ->Scale) after plotting my data on linear scale there is an option to change the scale to logarithmic one. – djordje Oct 18 '19 at 14:57
  • If I use your data I get the same value (0.529321) regardless of the scale set for either axis. Could you please update your question with the specific issue you are having? – lr1985 Oct 18 '19 at 15:07
  • @lr1985 Yes, that is exactly the problem I am having. Cus I use this as a positive control and I expect for logarithmic scale to get logAUC= ~7, but after applying logarithmic scale and calculating again AUC again it gives me same result. – djordje Oct 19 '19 at 04:29
  • @lr1985 actually my mistake her. In this example I am expecting logAUC to be ard 0.7. – djordje Oct 19 '19 at 09:48

1 Answers1

2

When you set the axis scale to "logarithmic" you are not actually changing your data, just the way you display it. Therefore, since data transformations such as integration act on the actual data you have, the result is bound to be the same.

In other words, you are integrating f(x) regardless of the scale of the axes. If you want to integrate log(f(x)) you have to first convert f(x) to log(f(x)) by using the Data -> Transformation -> Expression, writing something like y = ln(y) and pressing "apply". Be careful though: the first point (which has y = 0) will get an "inf". You'll need to get rid of it manually (double click on a set, select the first row and use edit -> delete) or don't use exactly 0 in your dataset. If you want to convert also the x axis then open the same "Expression" window and write x = ln(x). Integrate the new dataset and you should get the right number (I got -7.9 I think).

lr1985
  • 1,085
  • 1
  • 9
  • 21
  • Thanks for reaching back. I see what you mean and it makes sense pretty much. I am not from mathematical area, but just a bit confused if shouldn't logAUC be an absolute number, positive one? Because I get several file outputs when changing the scale to the logarithmic one, like and in the output they tend to have negative numbers for `x` and `y` axis, so I guess it should the logAUC should be a absolute value. – djordje Oct 19 '19 at 09:40
  • So I know the formula that would help but having slight problem with implementing it. Formula can be found in [this paper] (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2790034/). `ligand selected` is 1 at first iteration; `ligand total` is always 10. `N subset` is basically X axis from this example times 100, while `N total` is always `495`. – djordje Oct 19 '19 at 10:04
  • No, it need not be positive. What you call "AUC" is just the integral of the function, which can be any number (positive, negative, zero, infinite, etc). If all you need to do is to apply eq. 2 of the paper you should use excel or a similar software to compute logAUC directly. – lr1985 Oct 21 '19 at 06:55