-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature wish/discussion: having complex size as observable #600
Comments
I would argue there are two types of measure here, one is local and another is global. At the local level: To me, the question only makes sense at the state level: Having state-level information be reported in the data.csv file would be of some use, don't get me wrong, specially when the user doesn't want to trouble themselves with parsing snapshots (e.g. for quick prototyping). But it would not be an observable, and I would argue it should not be called one. Inventing a new kind of datum to report, to be taken at "plotPeriod" and written to the time-traces file, therefore requires IMHO a new keyword, say Ultimately, all this functionality already exists with tools available outside KaSim. Anyhow, those are my 2 cents on this discussion. P.S. as a discussion, shouldn't it be on the Kappa-Users forum? |
I do this routinely as well by dumping snapshots, but this is precisely what my proposal is meant to avoid - because dumping the state is hardly magical ;). Dumping a snapshot for every plot point is impractical in many cases. I run simulations of Kappa that produce millions of events and so to observe the system at every event, Kappa would output millions of separate JSON files (which as we discussed are large), which I would then need to postprocess. However, if all we're interested in is length, keeping track of the length of some complexes and outputting a vector with a million numbers is much easier to work with. The snapshot sometimes contains way more information than the user wants. |
This is loosely related to #599 and something I've discussed briefly with @pirbo in the past. I'm putting it here for posterity/discussion.
There are some non-local properties that would be extremely useful to have as observables, such as complex size. Imagine a Kappa program that produces polymers (like this one). To measure polymer sizes through time, one has to either: (1) dump many snapshots and parse them, or (2) dump a trace and query it. Both are generally expensive operations, time and storage wise. It'd be very handy to be able to say something like:
I imagine
sizes(expr)
to mean something like: get the sizes (a vector) of every complex that matchesexpr
. In the output (data.csv
), this entry could appear as a list, e.g.:(I realize it's a bit ugly, but csv is an ugly format anyway...)
My understanding is that this would be highly non-trivial to implement because it requires keeping track of a non-local state of the mixture. But I wonder if there's a way to restrict
expr
in a way that would make it easier?The trace query language can presumably do this, but this query seems common enough that it'd be useful to have as built-in, without needing to output traces.
Thanks,
Yarden
The text was updated successfully, but these errors were encountered: