GBrowse之频率直方图,有称为频率分布图,Generating Feature Frequency Histograms,用以展示这些统计信息,可以表意以下信息:

  • 不同区段内基因组Gene或者SNP等Feature区间数量分布的差异;
  • 基因表达丰度;
  • 序列的保守性;



1、使用 制备数据,脚本的用法:

Usage: /usr/bin/ [options] feature_type1 feature_type2...
Dump out a GFF-formatted histogram of the density of the indicated set
of feature types.
--dsn        <dsn>       Data source (default dbi:mysql:test)
--adaptor    <adaptor>   Schema adaptor (default dbi::mysqlopt)
--user       <user>      Username for mysql authentication
--pass       <password>  Password for mysql authentication
--bin        <bp>        Bin size in base pairs.
--aggregator <list>      Comma-separated list of aggregators
--sort                   Sort the resulting list by type and bin
--merge                  Merge features with same method but different sources
例如: -merge -d <> -u <> -p <> -bin 10000 SNP >snp_density.gff


 Chr1  SNP bin 1     10000 49 + . bin Chr1:SNP
 Chr1  SNP bin 10001 20000 29 + . bin Chr1:SNP

3、数据入库 -a DBI::mysql -d gb2 snp_density.gff


feature       = bin:SNP
glyph         = xyplot
graph_type    = boxes
scale         = right
bgcolor       = red
fgcolor       = red
height        = 20
key           = SNP Density




 新版本频率直方图的设置(Summary Mode)

bioperl、GBrowse最新的版本,使用Bio::DB::SeqFeature存储数据。只要在track设置是添加show summary参数。

 show summary = 1000000


The following options are standard among all Glyphs. See Bio::Graphics::Glyph for a full explanation.

  Option      Description                      Default
  ------      -----------                      -------

  -fgcolor      Foreground color               black

  -outlinecolor Synonym for -fgcolor

  -bgcolor      Background color               turquoise

  -fillcolor    Synonym for -bgcolor

  -linewidth    Line width                     1

  -height       Height of glyph                10

  -font         Glyph font                     gdSmallFont

  -label        Whether to draw a label        0 (false)

  -description  Whether to draw a description  0 (false)

  -hilite       Highlight color                undef (no color)

In addition, the xyplot glyph recognizes the following glyph-specific options:

  Option         Description                  Default
  ------         -----------                  -------

  -max_score   Maximum value of the           Calculated
               feature's "score" attribute

  -min_score   Minimum value of the           Calculated
               feature's "score" attributes

  -graph_type  Type of graph to generate.     Histogram
               Options are: "histogram",
               "boxes", "line", "points",
               or "linepoints".

  -point_symbol Symbol to use. Options are    none
                "triangle", "square", "disc",
                and "none".

  -point_radius Radius of the symbol, in      4
                pixels (does not apply
                to "point")

  -scale        Position where the Y axis     none
                scale is drawn if any.
                It should be one of
                "left", "right", "both" or "none"

  -graph_height Specify height of the graph   Same as the
                                              "height" option.

  -part_color  For boxes & points only,       none
               bgcolor of each part (should
               be a callback). Supersedes

  -scale_color Color of the scale             Same as fgcolor

  -clip        If min_score and/or max_score  false
               are manually specified, then
               setting this to true will
               cause values outside the
               range to be clipped.

  -bicolor_pivot                              0
               Where to pivot the two colors
               when drawing bicolor plots.
               Scores greater than this value will
               be drawn using -pos_color.
               Scores lower than this value will
               be drawn using -neg_color.

  -pos_color   When drawing bicolor plots,    same as bgcolor
               the fill color to use for
               values that are above
               the pivot point.

  -neg_color   When drawing bicolor plots,    same as bgcolor
               the fill color to use for values
               that are below the pivot point.