Opened 17 years ago

Last modified 17 years ago

#787 new enhancement

Add functions for within Bioassays and across Bioassayset in expressions

Reported by: Johan Vallon-Christersson Owned by: everyone
Priority: major Milestone: BASE Future Release
Component: coreplugins Version:
Keywords: Cc:


It would be useful to have the possibility to use some standard functions that calculate values across features when building expressions in filters and in the intensity transformer. For instance Average(), Median(), STDEV(), Min(), Max().
These could work in two modes.

  1. Within Bioassays. Here, Average(ch1) would calculate the average ch1 across features within each Bioassay.
  2. Across Bioassayset. Here, Average(ch1) would calculate average ch1 for each feature across Bioassays in the Bioassay set.

The mode could for example be set by a parameter in the function, e.g., Average(ch1,mode)

Change History (1)

comment:1 by Nicklas Nordborg, 17 years ago

This will be complicated since it is really not possible to mix row-level values with group-level values within a single SQL statement. Since the mentioned features all are implemented as simple tools that convert the expression to an SQL statement that is then applied on row-level data in the database it requires a redesign to solve this problem.

In the first step the group-level values are calculated. Median() will be extra complicated since most databases doesn't support it. The values must be loaded into memory to find the median. The support for standard deviation also depend on the database since it it not in the SQL standard. This needs to checked with at least MySQL and Postgres.

The second step will replace the group-level functions with the calculated values. The resulting expression can then be applied as before on the row-level data.

Note: See TracTickets for help on using tickets.