Opened 15 years ago

Closed 15 years ago

#1386 closed enhancement (fixed)

Plot function in the bioassay table in experiment explorer

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.14
Component: web Version:
Keywords: Cc:

Description

A plot button in bioassay list header.

  1. The plot should display a selected value (eg., logratio, position, ... taken from the columns selection) as a line plot or a barplot (user selectable). The y-axis should display the value and the x-axis is an ordering defined by the list order.
  2. The user should be allowed to select annotations (one or more) to display as boxes under the x-axis. The boxes should be coloured according to the annotation.

Replaces 4 in #1375.

Attachments (2)

plotfunctionEExplorer.pdf (405.0 KB ) - added by Johan Vallon-Christersson 15 years ago.
series-per-position.png (21.4 KB ) - added by Nicklas Nordborg 15 years ago.
Example showing one series per position when "all" is selected

Download all attachments as: .zip

Change History (18)

comment:1 by Nicklas Nordborg, 15 years ago

I am not sure that I understand what it is you would like to plot. Is it some kind of 'preset' for the usual plot function or do we need a new plot function? Hmmm... the 'list order' is nothing that is known by the current plot function... I guess this means that we need something new... Can someone manually create a plot that shows us what you mean?

comment:2 by Johan Vallon-Christersson, 15 years ago

Added a pdf with some descriptions and manually created example plots.

by Johan Vallon-Christersson, 15 years ago

Attachment: plotfunctionEExplorer.pdf added

comment:3 by Nicklas Nordborg, 15 years ago

Milestone: BASE 2.14
Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

The plot itself should not be too difficult to create. The colored boxes below it may be much more difficult though. These must be drawn after JFreeChart has generated the chart, but it is only possible if we can get pixel coordinate information from JFreeChart so that we know were to place to boxes.

comment:4 by Nicklas Nordborg, 15 years ago

Good news! JFreeChart can provide pixel coordinate information and it is possible for us to draw the boxes in our own code.

I also have one question. When the same reporter is present in multiple position it is possible to select the "all" option to let the table display the values for all positions. But, this doesn't work well with JFreeChart out of the box. The problem is that the label on the X-axis (the bioassay name) must be unique per series. There are two options:

  1. Append the position number to the assay name (eg. CA10031_1_HP.23456) where 23456 is the position index.
  2. Create one series for each position. I'll attach an example of this.

by Nicklas Nordborg, 15 years ago

Attachment: series-per-position.png added

Example showing one series per position when "all" is selected

comment:5 by Nicklas Nordborg, 15 years ago

Hmmm... I just also realized that we do not force bioassay names to unique... I guess the code needs to check for this and possible append the internal id to the name if they are not unique. This comment is just a reminder so that it is not forgotten.

in reply to:  4 comment:6 by Johan Vallon-Christersson, 15 years ago

Replying to nicklas:

There are two options:

I'm in favor of option 2 (one series for each position). If a legend with color and position for each series can be added that would be great.

in reply to:  4 comment:7 by Johan Vallon-Christersson, 15 years ago

Replying to nicklas:

  1. Create one series for each position. I'll attach an example of this.

Looks good!

Some suggestions:

  • bioassay names vertical orientation
  • width of boxes the same for each bioassay; could be proportion of total plot width so that there is no spacing between adjacent boxes
  • the option to include or omit bioassay names from the plot should be implemented; in a plot with many bioassays the names will not be readable

comment:8 by Nicklas Nordborg, 15 years ago

Regarding the plot. It is still only a quick-and-dirty with lots of hard-coded things just to try out if the major features are working.

I think Martin tried the vertical layout in the overview plots for Illumina (those plots are using angled labels) and the drawback is that too much vertical space is used. The actual plot area will be very small. Truncation to max length may or may not be a good idea due to the requirement that labels are unique.

If the bioassay names are not included in the plot it will not be possible to draw the color boxes either since we rely on the coordinate information for the labels that we get from JFreeChart.

in reply to:  8 comment:9 by Johan Vallon-Christersson, 15 years ago

Replying to nicklas:

Perhaps then provide the option to use internal bioassay ID as label. The internal IDs are reasonably short and could be vertically oriented. Users can get internal bioassay IDs in the bioassay table, but to make it easier to get them in EExplorer context; allow bioassay ID to be a selectable column in the EExplorer Reporter view spot table.

comment:10 by Nicklas Nordborg, 15 years ago

(In [5114]) References #1386: Plot function in the bioassay table in experiment explorer

First version is checked in since it is friday. Most major functions should be in place. Some minor options may need tweaking as well as some visual aspects. As usual, error handling must be tested.

The code for generating an image with a stack trace has been moved to ThrowableUtil.

comment:11 by Nicklas Nordborg, 15 years ago

(In [5138]) References #1385 and #1386. Plot functions in experiment explorer

Both types of plots can now be generated and I think the percentile values are correctly calculated.

comment:12 by Nicklas Nordborg, 15 years ago

(In [5141]) References #1386: Plot function in the bioassay table in experiment explorer

The 'No labels' option now uses a space as labels instead of hiding them completely which makes it possible to keep the colored annotation boxes.

comment:13 by Nicklas Nordborg, 15 years ago

(In [5142]) References #1385 and #1386. Plot functions in experiment explorer

The current reporter name is used as a default subtitle.

comment:14 by Nicklas Nordborg, 15 years ago

Everything seems to be working, except that the option with a bar plot is not implemented. Should we do this?

in reply to:  14 comment:15 by Johan Vallon-Christersson, 15 years ago

Replying to nicklas:

Everything seems to be working, except that the option with a bar plot is not implemented. Should we do this?


It looks really good so far :) I think that the bar-plot option would be used by many and should be implemented. If 2.14 can be released faster without the bar-plot (but with the current EExplorer plots) perhaps it could be moved to a subsequent release.

comment:16 by Nicklas Nordborg, 15 years ago

Resolution: fixed
Status: assignedclosed

(In [5149]) Fixes #1386: Plot function in the bioassay table in experiment explorer

It is now possible to use a bar or line plot.

Note: See TracTickets for help on using tickets.