[Bioperl-l] About graphic rendering

Paolo Pavan paolo.pavan at tecnoparco.org
Wed Dec 3 18:21:50 UTC 2008


Hi everybody,
I've a question about a Bio::Graphics rendering. I would like to display a
blast HSP on a track but I would like to draw the "tails" of my mapping
sequence that don't match the subject. So I instantiate these 3 object that
represent all the three segments I want to display:

my $feature = Bio::SeqFeature::Generic->new(
                                    -display_name
=>$sequence_to_map->display_id,
                                    -start        =>$hsp->sbjct->start,
                                    -end        =>$hsp->sbjct->end,
                                    );
my $feature_pre = Bio::SeqFeature::Generic->new(
                                    -start        =>($hsp->sbjct->start -
$hsp->query->start),
                                    -end        =>$hsp->sbjct->start-1
                                    );
my $feature_post = Bio::SeqFeature::Generic->new(
                                     -start        => $hsp->sbjct->end+1,
                                     -end        => $hsp->sbjct->end +
$sequence_to_map->length - $hsp->query->end
                                    );

now I have to add these features to my $track in a manner that the
$feature_pre and $feature_post paint or color in a different way than
$feature but align horizontally.
I tried with:

$feature->add_sub_SeqFeature($feature_pre, 'EXPAND');
$feature->add_sub_SeqFeature($feature_post, 'EXPAND');

$track->add_feature($feature);

This does not work, because the features spread vertically, and more I
cannot change the glyph because seems to be a track property, not a feature
one.
 Any idea?

Thank you for your help,
Paolo



More information about the Bioperl-l mailing list