Thursday, March 8, 2012

Minor improvements to Gene Set View

In a word, you can visualize flanking regions when using Gene Set View:



Above screenshot demonstrates the case. The green/red portion at the ends of each item marks out flanking region added to the gene. Green for upstream and red for downstream (relative to the gene strand).

When you submit gene sets to run Gene Set View, you have the option to decide which part of gene to show in the View:


Options including "promoter+genebody", and "custom region" will have this effect.

Besides, the "custom region" option works on not only genes, but also on genomic coordinates. So you can add flanks to your genomic intervals:


Above is the example of running Gene Set View with genomic intervals instead of genes. The input is coordinates of a bunch of MER41B elements. Each is padded with 500 bp on both sides. I guess this makes a nice repeat browser? Well notice that although repeats do have strand information, but I'm using strand-less genomic coordinates as input, the upstream/downstream padding are irrelevant to actual strand of repeats.

Scaffold sequence configuration function

The "Contig View" function has officially retired - been replaced by the scaffold sequence configuration function where arbitrary and flexible choice of scaffold sequence can be chosen for display.

At control panel go to "Genomic view" --> "Scaffold sequence" to view the interface:


The table shows list of scaffold sequence currently in use, and their order of appearance on the horizontal axis of genome heatmap.

To add more sequences to the list, click "Add more" button, a new panel will appear:



The sequences have been grouped. In this case of human genome, two groups are shown in the panel, click to reveal list of items:


The "chromosome" group contains fully assembled chromosomes, and the "other" group contains anything else. Sequences are presented as clickable rectangles for you to select. Box filled in blue indicates the sequence is in display, and unfilled means it isn't and can be added.

To remove from display, click X button to mark for removal, the "Update" button will appear. Click button again to unmark. You can mark multiple sequences before clicking the update button to remove them:



If you click the chromosome name, or anywhere except the removal button, the sequence will be in bold face indicating it is selected. Only one item can be selected a time. More buttons will appear allowing you to move this item in the list:


Use arrow buttons to move selected item along the list. Once moved, you need to click "Update" button to take effect. Click the Knight button to show this sequence in its entirety.

= = = = = = =

The Bird's eye view has identical scaffold configuration function, available from the Bird's eye view panel (click button Configure and then select "scaffold sequence"):


An identical looking panel will appear:


There you can configure scaffold sequences to be used in Bird's Eye View, which is totally independent from what is used in genomic view.


And that's it. This function replaces the cluttered design of Contig View, and is the first step towards building the Repeat Browser -- where over 1000 repeat subfamilies are available, and user needs to be able to browse and select them in an intelligent manner (following Class > Family > Subfamily hierarchy is essential instead of looking through a huge list).

Friday, February 3, 2012

Showing data distribution using Gene Plot

The Gene Plot function has been reworked - new features added, known bugs removed, interface is more informative.

Enhancements/changes on the four graph types are summarized here:
  • Type 1 - previously only "average value curve" is drawn. Now the value distribution over each data points are displayed.
  • Type 2 - same as before, but now named as "Spaghetti plot".
  • Type 3 - same as before, five functional parts of genes are plotted individually. Same as Type 1, value distribution over data points is displayed.
  • Type 4 - hierarchical or k-means clustering, now visualizes negative values correctly.
In Type 1 and 3, value distribution is presented either as boxplot (using R) or "quartile & extremes" curves (using Google Chart service). Here's the details.

To run Gene Plot as standalone app, click and select Gene Plot from the apps list:


The Gene Plot panel is then displayed:


At Step 0, enter a list of genes or coordinates into the text area. The sample list of cytochrome P450 genes is used here:


CYP4Z1
CYP2A7
CYP2A6
CYP3A4
CYP1A1
CYP4V2
CYP51A1
CYP2C19
CYP26B1
CYP11B2
CYP24A1
CYP4B1
CYP2C8


At Step 1, I select a heatmap track for demo. Click  and select the track named "H3K9me3 vHMEC":



Then go to Step 2 and look at its interface, by default the first plot type is chosen (quartiles & extremes):


Check the checkbox on the bottom "plot average values", then press button to generate the plot:


In this graph, the histone data over the P450 gene bodies are summarized into same number of data points (number of 50). Histone data distribution over sampling points are presented as 6 curves: min/max, lower/upper quartile, median and average. The average curve can be removed by unchecking the checkbox.

This graph is interactive, move cursor over to get details (data point #, curve type, and value). Lower/upper quartiles represent 25/75 percentiles, so between them are 50% of the data values. In this example the the average and median curves don't differ a lot. But in cases of outliers the median/average will show great difference.

This graph is generated by Google Chart service, which is fancy and interactive. R software rendering used to be merely fallback mechanism, but now it gets some special highlights.

At Step 3, select R rendering from the drop-down menu. Notice how Step 2 panel updates:


Two new options show up when using R for graph type 1. With above configurations generate the plot:


Now boxplots are used instead of quartile curves. However the curve for average value is still there. You can turn it off by unchecking the checkbox. Graph generated by R is still image and is not interactive.

The graph Type 3 is similar with Type 1 in using quartile curves or boxplots to represent data distribution. As an example, select genomic feature track "vertebrate PhyloP" (sequence conservation data of human genome against vertebrate genomes), and generate Type 3 plot for the short list of P450 genes:


The plot shows gene exons have higher score, which well correlates with the idea that coding regions tend to be conserved. Average value curves are not shown here. The graph will look like following when generated by Google Chart: