Connect Exons And/Or Cdss With Bio::Graphics
Hello,
I'm trying to display my data from a GFF file into an image using Bio::Graphics in Perl. I obtain what I want to obtain, but, however, my exons or CDS do not connect... My code now:
#!/usr/bin/perl
use warnings;
use Bio::Graphics;
use Bio::Tools::GFF;
use Bio::SeqFeature::Generic;
$gff3_file = $ARGV[0];
$gffio = Bio::Tools::GFF -> new(-file =>$gff3_file , -gff_version => 3);
while ($feature = $gffio->next_feature()) {
push(@features, $feature);
}
$gffio->close();
$panel = Bio::Graphics::Panel->new(
-length => 20000,
-width => 800,
-key_style => 'left'
);
for $f (@features) {
$tag = $f->primary_tag();
push @{$sorted_features{$tag}}, $f;
}
@colors = qw(cyan orange blue purple green chartreuse magenta yellow aqua);
for $tag (keys %sorted_features) {
$panel->add_track($sorted_features{tag},
-glyph => 'transcript2',
-label => 1,
-connector => 'solid',
-bgcolor => $cyan,
-key => "${tag}s",
);
}
print $panel->png;
Any idea?
• 310 views
•
link
0 answers
No answers yet.
Log in to answer this question.