PNGファイルを作成しようとしています。
以下のスクリプトは、エラーを返さずに実行されます。出力ファイルは表示tester.png
できません (また、cmd ウィンドウに添付テキストが出力されます)。
このスクリプトで生成された PNG ファイルを表示できない理由がわかりません。
Active Perl (5.18.2) と Strawberry Perl (5.18.4.1) の両方を使用しましたが、同じ問題があります。エラーは発生していませんが、Strawberry Perl をインストールの一部libgd
として試してみました。libpng
何かアドバイス?
#!/usr/bin/perl
use Bio::Graphics;
use Bio::SeqFeature::Generic;
use strict;
use warnings;
my $infile = "data1.txt";
open( ALIGN, "$infile" ) or die;
my $outputfile = "tester.png";
open( OUTFILE, ">$outputfile" ) or die;
my $panel = Bio::Graphics::Panel->new(
-length => 1000,
-width => 800
);
my $track = $panel->add_track(
-glyph => 'generic',
-label => 1
);
while (<ALIGN>) { # read blast file
chomp;
#next if /^\#/; # ignore comments
my ( $name, $score, $start, $end ) = split /\t+/;
my $feature = Bio::SeqFeature::Generic->new(
-display_name => $name,
-score => $score,
-start => $start,
-end => $end
);
$track->add_feature($feature);
}
binmode STDOUT;
print $panel->png;
print OUTFILE $panel->png;