So, I am trying to perform a global fit on 15 data traces obtained from electrophysiology. The first three traces had a concentration of 10 micromolar, the second three traces had a concentration of 100 micromolar, the third three traces had 500 micromolar, the fourth had 1 millimolar, and the fifth had 10 millimolar. The traces are nanoamps vs milliseconds. Ok, so I want to globally fit these 15 traces using a nonlinear custom nonlinear function with lsqcurvefit. Fitting the first three traces was simple since they all had the same concentration. How would I fit all of these traces using my nonlinear function and lsqcurvefit in a loop where the concentration changes? I thought maybe putting all of the xdata (milliseconds) in one matrix, and the ydata (nanoamps) in another matrix and using those as the xdata and ydata that are called into lsqcurvefit, and that worked if the concentration is a fixed number. Now, how would I do this if my matrix was 15 dimensions, and every three columns I needed the nonlinear function to start using a different concentration? I hope this was mostly clear.

 채택된 답변

Star Strider
Star Strider 2017년 4월 11일

0 개 추천

Mostly, but not entirely.
The lsqcurvefit function is the correct choice.
It would be necessary to know the equations you want to fit, and if the concentration of the unknown substance could be parameterised within them.
How are the data related to the concentrations?

댓글 수: 4

Kelly McGuire
Kelly McGuire 2017년 4월 11일
The equation is in the attached pic. I thought this would be the clearest representation of my equation. Ok, so this equation describes the probability of an ion channel being blocked by a drug, but in this case with time dependence on the drug concentration (the sums part of the equation). If the ion channel were sitting in a bath with no drug at time zero, and then drug were perfused into that bath after time zero, there would be a diffusion delay before we start to see block of that channel. We are trying to obtain the parameters, k1 and k-2, in that equation by fitting multiple traces at different concentrations of drug simultaneously. Co in the equation is the concentration. I obtained three traces per concentration, and used 5 different concentrations.
Star Strider
Star Strider 2017년 4월 11일
I’m not quite certain I understand ‘k1’ and ‘k-2’. I don’t need to know the details, just a bit more about your study. (I assume you know everything except ‘k1’ and ‘k-2’.)
Are they assumed to be constant at the time you’re recording your data, with the drug at an equilibrium concentration? (This is relatively straightforward if I understand your problem correctly.)
Or do they dynamically change during the study as the drug diffuses, and you’re also modeling them as functions of time? (This is much more difficult, and may not be possible to model.)
Is the drug concentration represented anywhere in your model?
Your rather mind-boggling model isn’t the issue. (I’m assuming you’ve coded it and that your objective function works.) I’m curious about what your data represent, and what you’re fitting.
Also, do you have a paired study design, so you have one set of data before the drug is administered to each preparation, and a second set at the equilibrium concentration of the drug?
Kelly McGuire
Kelly McGuire 2017년 4월 11일
편집: Kelly McGuire 2017년 4월 11일

See attachment. I am measuring the current passing through the ion channel before and after drug is added to the bath. Before the red arrow (i.e. -180 nA), the ion channel has been activated by acidifying the bath. At the red arrow, drug is added to the bath and begins to block the current (i.e. blocking the ion channel). Notice though how it is an exponential block. k1 is the on rate constant of the drug and k-2 is the off rate constant of the drug. The ratio of these numbers tells us the EC50 (effective concentration that blocks 50% of the current). k1 and k-2 wouldn't change, they would be fixed numbers depending on the drug, we just don't know what those numbers are beforehand. Where the trace levels off is the equilibrium of the drug in the channel vs out of the channel, and that depends on k1 and k-2. In the equation I showed you, the drug concentration does show up in those sums as Co. The on rate, k1, is dependent on drug concentration, so everywhere there is a k1 in my equation, there is also a time-dependent drug concentration. The reason for time dependence in the drug concentration is because of diffusion up to the channel when the drug is added is time dependent (i.e. the concentration in the bath doesn't jump to, for example, 100 micromolar, it takes time for the unstirred layer around the channel to reach the maximum concentration).

Star Strider
Star Strider 2017년 4월 11일
I assume the varying concentration of ‘Co’ are accounted for by ‘k1’.
I would define the start time as the time the drug is added to the bath.
It seems that if you have all the other constants (such as ‘Co’, whenever in your experiment you measure it), this is a relatively straightforward two-parameter estimation problem. If so, design your objective function to accept ‘Co’ as an input argument. You may need to use a loop in your objective function to provide the appropriate values of ‘Co’ to fit each column (or row) in your objective function matrix. This is going to be slow, but should be successful. Turn off the sleep option for your computer while you run this.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

질문:

2017년 4월 11일

댓글:

2017년 4월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by