Bio-Graphics
view release on metacpan or search on metacpan
- Fix handling of code ref subs to allow for option=>\&Packagename::functionname.
2.26
- Support for normalizing quantitative plots across entire track.
- Support for transparency within tracks, allowing features to overlap.
- Support for -color_series and -color_cycle options (see Bio::Graphics::Panel)
which cycle dynamically among a fixed series of background colors.
2.25
- Deprecate xyplot "histogram" subtype and default to "boxes".
- Add xyplot overlay feature.
- Fix gene glyph so that it collapses appropriately when bump explicitly
set to 0.
- Highlighting now works on features contained within groups.
2.24
- In feature file configuration sections, allow a tag to contain ":".
2.23
- Workaround a problem in BioPerl 1.069 which prevents FeatureFile from rendering
properly. Fixed in 1.06902 and higher.
lib/Bio/Graphics/Glyph.pm view on Meta::CPAN
my $bump_direction = $self->bump;
my $bump_limit = $self->bump_limit || -1;
$bump_direction = 'fast' if
$bump_direction &&
$bump_direction == 1 &&
!$self->code_option('sort_order');
$_->layout foreach @parts; # recursively lay out
# no bumping requested, or only one part here, or the tracks are supposed to be overlay
if (@parts == 1 || !$bump_direction || ($bump_direction eq 'fast' and $self->code_option('overlay') == 1)) {
my $highest = 0;
foreach (@parts) {
my $height = $_->layout_height;
$highest = $height > $highest ? $height : $highest;
}
return $self->{layout_height} = $highest + $self->pad_top + $self->pad_bottom;
}
if ($bump_direction eq 'fast' or $bump_direction == 3) {
return $self->{layout_height} = $self->optimized_layout(\@parts)
lib/Bio/Graphics/Glyph.pm view on Meta::CPAN
It is important to remember to use the $$ prototype as shown in the
example. Otherwise Bio::Graphics will quit with an exception. The
arguments are subclasses of Bio::Graphics::Glyph, not the features
themselves. While glyphs implement some, but not all, of the feature
methods, to be safe call the two glyphs' feature() methods in order to
convert them into the actual features.
The '-always_sort' option, if true, will sort features even if bumping
is turned off. This is useful if you would like overlapping features
to stack in a particular order. Features towards the end of the list
will overlay those towards the beginning of the sort order.
The B<-hilite> option draws a colored box behind each feature using the
indicated color. Typically you will pass it a code ref that returns a
color name. For example:
-hilite => sub { my $name = shift->display_name;
return 'yellow' if $name =~ /XYZ/ }
The B<-no_subparts> option will prevent the glyph from searching its
feature for subfeatures. This may enhance performance if you know in
lib/Bio/Graphics/Glyph/vista_plot.pm view on Meta::CPAN
}
sub _isa_color {
my $color = shift;
return $color =~ /white|black|FFFFFF|000000/i ? 0 : 1;
}
sub level { -1 }
# Need to override this so we have a nice image map for overlayed peaks
sub boxes {
my $self = shift;
my($left,$top,$parent) = @_;
return if $self->glyph_subtype eq 'density'; # No boxes for density plot
my @boxes = $self->SUPER::boxes(@_);
if (my $rects = $self->{peak_cache}) {
push @boxes,[@$_,$parent] foreach @$rects;
}
lib/Bio/Graphics/Glyph/vista_plot.pm view on Meta::CPAN
=head1 DESCRIPTION
This glyph draws peak calls (features with discreet boundaries,
i.e. putative transcription sites, over signal graph (wiggle_xyplot)
requires a special load gff file that uses attributes 'wigfile' and 'peak_type'
B<Example:>
2L chip_seq vista 5407 23011573 . . . Name=ChipSeq Exp 1;wigfile=SomeWigFile.wigdb;peak_type=binding_site:exp1
The glyph will draw the wiggle file first, than overlay the peaks (if there are any)
over signal graph. Elsewhere in the GFF3 file, there should be one or more features
of type "binding_site:exp1", e.g.:
2L exp1 binding_site 91934 92005 . . .
Options like 'balloon hover' and 'link' are available to customize
interaction with peaks in detail view.
B<BigWig support:>
lib/Bio/Graphics/Glyph/xyplot.pm view on Meta::CPAN
for my $draw_method (@draw_methods) {
$self->$draw_method($gd,$dx,$dy,$y_origin);
}
$self->panel->startGroup($gd);
$self->_draw_scale($gd,$scale,$min_score,$max_score,$dx,$dy,$y_origin);
$self->panel->endGroup($gd);
$self->draw_label(@_) if $self->option('label') or $self->record_label_positions;
$self->draw_description(@_) if $self->option('description');
$self->draw_legend(@_) if $self->option('overlay');
$self->panel->endGroup($gd);
}
sub lookup_draw_method {
my $self = shift;
my $type = shift;
return '_draw_boxes' if $type eq 'histogram'; # same thing
return '_draw_boxes' if $type eq 'boxes';
lib/Bio/Graphics/Panel.pm view on Meta::CPAN
It is important to remember to use the $$ prototype as shown in the
example. Otherwise Bio::Graphics will quit with an exception. The
arguments are subclasses of Bio::Graphics::Glyph, not the features
themselves. While glyphs implement some, but not all, of the feature
methods, to be safe call the two glyphs' feature() methods in order to
convert them into the actual features.
The '-always_sort' option, if true, will sort features even if bumping
is turned off. This is useful if you would like overlapping features
to stack in a particular order. Features towards the end of the list
will overlay those towards the beginning of the sort order.
B<-feature_limit>: When this option is set to a non-zero value, calls
to a track's add_feature() method will maintain a count of features
added to a track. Once the feature count exceeds the value set in
-feature_limit, additional features will displace existing ones in a
way that effects a uniform sampling of the total feature set. This is
useful to protect against excessively large tracks. The total number
of features added can be retrieved by calling the track's
feature_count() method.
( run in 0.324 second using v1.01-cache-2.11-cpan-49f99fa48dc )