Bio-Graphics

 view release on metacpan or  search on metacpan

lib/Bio/Graphics/Glyph/merged_alignment.pm  view on Meta::CPAN


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

  -bincolors  Colors assigned to bins      lightgrey powderblue cornflowerblue blue
              (in order)

  -bins       Bins to which scores are     Calculated
              assigned

  -merge_parts                             0 (false)
              Whether to simplify the 
              alignment at low magnification

  -max_gap    Do not merge across gaps     Calculated
              that exceed this threshold


If max_score and min_score are not specified, then the glyph will
calculate the local maximum and minimum scores at run time.

If the bins are not specified, they will be calculated
based on the number of colors assigned and the local
(or user-specified) minimum and maximum scores.
Calculated bins are equal in size.  

User-specified bins are expressed as ranges,

  bins  = 0-50 50-70 70-90 90-100

where each range means greater than the lower number and
less than or equal to the higher number.


=head2 Simplifying the display of alignment features for large segments

The "merge_parts" option is used for semantic zooming.
Specifically, if features are small and dense, they
will not be displayed very well for large segments and the 
color-coding will be lost.  If merge-parts is set to a
true value, adjacent alignment parts will be merged until a gap
exceeding a calculated or user-specified value is encountered. 
Unless specified, the maximum gap allowed for merging adjacent features is
calculated as (L/10000)*(L/500), where L = the length of the sequence
displayed in the browser.  The exponentially increasing gap threshold
allows more aggressive merging of alignment features as the size of
the displayed sequence grows larger.

The score of the merged feature is calculated as a weighted average.
For example, consider two adjacent HSPs that are each 400 bp in 
length and have scores of 60% and 70%.  If the merge_parts option
is set to a true value, the two HSPs would be merged in the display to
a single 800 bp alignment block with an average score of 65%.

The merge_parts option is turned off by default.

=head2 SAMPLE CONFIGURATION

Sample gbrowse configuration stanzas for an alignment feature
using this glyph.  The scores are assumed to be expressed 
as percent identity (0-100).

 # base configuration
 [BLASTZ]
 feature      = blastz_alignment
 glyph        = merged_alignment
 bincolors    = #A0A0A0 powderblue cornflowerblue blue
 bins         = 60-70 70-80 80-90 90-100
 category     = Sequence Similarity Tracks
 height       = 6
 bump         = 1
 label        = 1
 fgcolor      = black
 key          = BLASTZ

Semantic zooming with defined maximum gap between
merged features for different zoom levels

 # if the displayed segment is >= 20000 in length,
 # use the merge_parts option to simplify the alignment
 # display
 [BLASTZ:20000]
 feature      = blastz_alignment
 merge_parts  = 1
 max_gap      = 50 # do not merge across gaps > 50 bp

 # if the displayed segment is >= 50000 in length
 [BLASTZ:50000]
 feature      = blastz_alignment
 merge_parts  = 1
 max_gap      = 500 # do not merge across gaps > 500 bp

--OR-- 

Semantic zooming with dynamically calculated maximum
gap

 # if the displayed segment is >= 20000 in length,
 [BLASTZ:20000]
 feature      = blastz_alignment
 merge_parts  = 1

=head1 BUGS

Please report them.

=head1 SEE ALSO

L<Bio::Graphics::Panel>,
L<Bio::Graphics::Glyph>
L<Bio::DB::GFF>,
L<Bio::SeqI>,
L<Bio::SeqFeatureI>,
L<Bio::Das>,
L<GD>

=head1 AUTHOR

Sheldon McKay E<lt>mckays@cshl.eduE<gt>

Copyright (c) 2005 Cold Spring Harbor Laboratory



( run in 2.106 seconds using v1.01-cache-2.11-cpan-71847e10f99 )