From: Carl T. <ca...@th...> - 2003-03-27 12:59:46
|
Danny Park writes: > So I figured it out... I think... Excellent. :-) > I looked in my MySQL DB and found dozens of rows with a zero reporter > count and removed fields set to 3 (the "I'm currently being added" value?) Yup, that's what it's supposed to mean. A cheap way to avoid undefined states (and the need for transactions). But I definitely should document thingsd like that. > change: function populate(&$reporters) > to: function populate($reporters) > > cause there seemed to be no need to change the array within the > function... On the other hand passing by reference is a bit faster than passing by value. There's not actually a difference in speed between passing arrays by reference or value in PHP as far as I can tell, but when the array's elements are accessed it seems to be a little bit faster (20% or so) if the array was passed by reference. I don't know enough about PHP's internals to explain this, but since we (possibly) gain that much by adding a single &, it might be worth doing, as long as there's no risk that we modify the array in a case where we shouldn't. > So I asked before about filtering based on reporter list scores.... like > somehow being able to use those score values... I guess I'm not asking for > a new feature right away... but I'm wondering if you think it's an easy or > difficult thing to pull off. Is it just a matter of doing something to > trans_create.phtml? Or is that data not easily accessible? (is this > something I could potentially pull off by myself)? Also, it'd be nice to > see the value in gene_explore.phtml (scores for reporter lists of any rep > lists used in filtering the output for gene_explore.phtml). It would go quite deep, to the level of the Search and SearchCriterion classes (in search.inc.php). Really I only think that file and searchhtml.inc.php would need to be changed, and I can see that a feature like this would be really useful, so I should definitely consider giving you a hand with it. I'll post another comment to the dev list. > In trans_create.phtml it allows you to filter on spot criteria and > reporter criteria.... but why does the pull down list of allowed fields in > the spot filter contain reporter fields when you could easily filter on > those fields in the gene filter? Oh, hm.. they're not supposed to show up there, although they should exist internally as they're needed for the serial basefile format among other things. That is, sometimes the two types of filtering will be only one step, and for that the things in one should exist in the other as well. But this is a rather messy part of the internal workings, with the same code being used from several places and in slightly different ways. //Carl -- Carl Troein - ca...@th... http://www.thep.lu.se/~carl/ BASE developer - http://base.thep.lu.se |