Stub documentation for G::Seq::PEC was created by h2xs. It looks like the
author of the extension was negligent enough to leave the stub
unedited.
Blah blah blah.
None available.
sub set_essentiality
{ my @args = opt_get(@_);
my $gb = shift @args;
if ($gb->{LOCUS}->{id} eq 'U00096' || $gb->{LOCUS}->{id} eq 'NC_000913'){
my $url = "http://shigen.lab.nig.ac.jp/ecoli/pec/download/files/PECData.dat";
my $dir = $ENV{HOME} . '/.glang/data/Essentiality.txt';
mirror($url, $dir);
die("set_essentiality: cannot retrieve data from PEC.") unless(-e $dir);
my $i = 1;
open(FILE, $dir) || die($!);
while(<FILE>){
chomp;
my $line = $_;
my (@hoge) = split(/\t/);
my @list = ($hoge[0], split(/,/, $hoge[1]));
my $id;
foreach my $gene (@list){
my $tmp = $gb->gene2id($gene);
$id = $tmp;
last if(length $id);
}
if($hoge[7] == 1){
$gb->{$id}->{essentiality} = 1;
}elsif($hoge[7] == 2){
$gb->{$id}->{essentiality} = -1;
}
}
close(FILE);
}else{
msg_error("No essentiality data for this species.\n\n");
}
return 1;} |
perl(1).