[Bio] / BSub / make_jpg Repository:
ViewVC logotype

View of /BSub/make_jpg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (download) (annotate) (vendor branch)
Tue Nov 29 19:19:57 2005 UTC (13 years, 10 months ago) by olson
Branch: foo, MAIN
CVS Tags: bar, HEAD
Changes since 1.1: +0 -0 lines
New dir for B. subtilis work

#!/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/bin/perl

BEGIN {
    @INC = qw(
	/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/lib/perl5/5.8.7/i686-linux
	/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/lib/perl5/5.8.7
	/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/lib/perl5/site_perl/5.8.7/i686-linux
	/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/lib/perl5/site_perl/5.8.7
	/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/lib/perl5/site_perl
);
}
use Data::Dumper;
use Carp;
# Following block is expanded by switch_to_release to add use lib directives
# to point at the correct locations in the release directory.
#BEGIN switch_to_release generated code
use lib '/disks/space0/fig/FIGdisk.theseed_v3/dist/releases/cvs.1130864040/linux-gentoo/lib';
use lib '/disks/space0/fig/FIGdisk.theseed_v3/dist/releases/cvs.1130864040/linux-gentoo/lib/FigKernelPackages';
$ENV{PATH} = "/disks/space0/fig/FIGdisk.theseed_v3/FIG/bin:/disks/space0/fig/FIGdisk.theseed_v3/env/linux-gentoo/bin:$ENV{PATH}";
$ENV{BLASTMAT} = "/disks/space0/fig/FIGdisk.theseed_v3/BLASTMAT";
#END switch_to_release generated code

use lib "/disks/space0/fig/FIGdisk.theseed_v3/config";
use FIG_Config;

#### END tool_hdr ####


# usage: make_jpg JPG < gg.in

($jpgF = shift @ARGV) || die "usage: make_fig JPG < gg.in";

use GenoGraphics;
use FIG;
my $fig = new FIG;
my $genes = [];

if (defined($_ = <STDIN>) && ($_ =~ /^(\d+)\t(\d+)$/))
{
    $min = $1;
    $max = $2;
}
else
{
    die "bad input: $_";
}

$/ = "\n//\n";

$gg = [];
while (defined($_ = <STDIN>))
{
    chomp;
    $genes = [];
    @lines = split(/\n/,$_);
    $label = shift @lines;
    foreach $line (@lines)
    {
	($beg,$end,$shape,$color,$text) = split(/\s+/,$line);
	push(@$genes,[$beg,$end,$shape, $color,$text,"",""]);
    }
    my $map = [$label,$min,$max,$genes];
    push(@$gg,$map);
}

@tmp = map { ($_ =~ /(GenoGraphics_[0-9\.]+.jpg)/) ? $1 : () } @{ &GenoGraphics::render($gg,2000,4,0,1) };
&FIG::run("cp $FIG_Config::temp/$tmp[0] $jpgF");
print STDERR "returned result in $jpgF\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3