Closed LeonieUniFR closed 1 year ago
Hello Leonie and thank you for reporting this issue.
I have to admit that the way presets are imported in MASH is not very clear. And thanks to your report, I see that it is also not correct and I must fix it.
trans_prob
is not supposed to contain the transition probabilities but the transition partition probabilities/factors. They are transition probabilities but normalized by the row sum and with 0 diagonal probabilities. It must be imported together with state lifetimes that are stored in field lifetimes
of the preset file. This is one incorrect part: it was not defined in the createSimPrm.mat
. But apparently, you have transition probabilities ready in your hands, so you can use the field trans_rates
only. Keep in mind that value in trans_rates
have no units as they stand for the number of transitions per time interval (and not per second).You can download the corrected version: https://github.com/RNA-FRETools/MASH-FRET/archive/refs/heads/review-sim-presets.zip, or fork the branch review-sim-presets
.
Please tell me if it is working for you so I close the issue and merge the corrections in the main branch.
Mélodie
Hello Mélodie, Thank you for you quick reply.
trans_rates
from now on. Also thank you for pointing out that the units of trans_rates
is per time interval and not per second. This led to some confusion on my side.buildModel
(see screenshot). I then stopped the program right bevor the error. When I understand it correctly the size of ip
seems to be the problem. Shouldn't it be ip =ip_all(n,:)'
in line 86 in buildModel
instead of ip = ip_all(:,n)'
?
Best, Leonie
Ouch.. I made a mess here
Almost, actually it should be ip_all(n,:)
,
Thank you for your feedback, modifications have been made to the same branch, You can use the same download link I gave you previously.
Mélodie
Hi Mélodie,
unfortunately the dimentions still produced an error in buildModel
and a new error turned up:
Matrix dimensions must agree. Error in buildModel (line 72) ip_all = tau_all./repmat(sum(tau_all,1),[J,1,1])'; % [J-by-N]
I then had to make a change in
line 72 ip_all = tau_all./repmat(sum(tau_all,1),[J,1,1]); % removed '
and add an additional
line 73 ip_all = ip_all'; % now transposed
now ip_all
has the same dimentions when being calculated or when coming from presets.
Now it works :)
Best, Leonie
Oh my.. Thank you Leonie for the feedback AND the bug fix. I will add this correction to the source code and close this issue then. Do not hesitate to post a new issue anytime you encounter such malfunctioning, this is very helpful for us. Best, Mélodie
Hello, I encountered some problems when running simulations with MASH-FRET. I created presetFiles.mat with createSimPrm.m.
Thank you for your help, Leonie Email: leonie.vollmar@pc.uni-freiburg.de
Rates in GUI -> traces with long dwell times Rates imported via presets -> very short dwell times