None available.
sub annotate_with_LORF
{ my $this = shift;
my $gb = shift;
my $seq = $gb->{SEQ};
my ($start,$end,$i);
my $count = 0;
$this->{"LOCUS"} = $gb->{"LOCUS"};
$this->{"HEADER"} = $gb->{"HEADER"};
$this->{"COMMENT"} = $gb->{"COMMENT"};
$this->{"CDS0"}->{dummy} = 1;
$this->{"FEATURE0"} = $gb->{"FEATURE0"};
$this->{"SEQ"} = $seq;
for ($i = 0; $i <= 1; $i ++){
$seq = complement($gb->{SEQ}) if ($i);
$start = 0;
$end = 0;
while(0 <= ($start = index($seq, 'atg', $start + 1))){
next if ($start < $end && ($start - $end + 1) % 3 == 0);
my $tmp = $start;
my $stopcodon = '';
while(0 <= ($tmp = index($seq, 'tag', $tmp +1))){
if (($tmp - $start + 1) % 3 == 0 && $tmp - $start > 49){
$count ++;
$end = $tmp;
$stopcodon = 'tag';
last;
}
}
$tmp = $start;
while(0 <= ($tmp = index($seq, 'taa', $tmp +1))){
if (($tmp - $start + 1) % 3 == 0 && $tmp - $start > 49){
if ($tmp < $end){
$count ++;
$end = $tmp;
$stopcodon = 'taa';
last;
}else{
last;
}
}
}
$tmp = $start;
while(0 <= ($tmp = index($seq, 'tga', $tmp +1))){
if (($tmp - $start + 1) % 3 == 0 && $tmp - $start > 49){
if ($tmp < $end){
$count ++;
$end = $tmp;
$stopcodon = 'tga';
last;
}else{
last;
}
}
}
if ($i){
if ($end > 0 && ($end - $start + 1) / 3 > opt::val("length")){ $this->{"CDS$count"}->{start} = length($gb->{SEQ}) - $end + 1; $this->{"CDS$count"}->{end} = length($gb->{SEQ}) - $start + 1;
$this->{"CDS$count"}->{feature} = $count;
$this->{"CDS$count"}->{direction} = "complement";
$this->{"FEATURE$count"}->{type} = "CDS";
$this->{"FEATURE$count"}->{start} = length($gb->{SEQ}) - $end + 1;
$this->{"FEATURE$count"}->{end} = length($gb->{SEQ}) - $start + 1;
$this->{"FEATURE$count"}->{feature} = $count;
$this->{"FEATURE$count"}->{direction} = "complement";
}
}else{
if ($end > 0 && ($end - $start + 1) / 3 > opt::val("length")){ $this->{"CDS$count"}->{start} = $start + 1; $this->{"CDS$count"}->{end} = $end + 1;
$this->{"CDS$count"}->{feature} = $count;
$this->{"CDS$count"}->{direction} = "direct";
$this->{"FEATURE$count"}->{type} = "CDS";
$this->{"FEATURE$count"}->{start} = $start + 1;
$this->{"FEATURE$count"}->{end} = $end + 1;
$this->{"FEATURE$count"}->{feature} = $count;
$this->{"FEATURE$count"}->{direction} = "direct";
}
}} |
sub annotate_with_glimmer
{ my $this = shift;
my $file = shift;
open (FASTA, $file);
while(<FASTA>){
if (/^\>/){
s/\>//;
my @hoge = split;
$this->{LOCUS}->{id} = $hoge[0];
next;
}else{
s/[^a-zA-Z]//g;
$this->{SEQ} .= lc($_);
}
}
close(FASTA);
$this->{COMMENT} = "COMMENT Annotated with G-language GAE. Arakawa et al. (2003) Bioinformatics\n";
$this->{"CDS0"}->{dummy} = 1;
$this->{"FEATURE0"}->{dummy} = 1;
my $count = 0;
my $cdscount = 0;
open (GLIMMER, 'g2.coord') || die();
while(<GLIMMER>){
$count ++;
$cdscount ++;
my $nextcount = $count + 1;
my @line = split;
$this->{"FEATURE$count"}->{type} = 'gene';
$this->{"FEATURE$count"}->{gene} = sprintf "g%04d", $cdscount;
$this->{"FEATURE$count"}->{note} = sprintf "locus_tag: g%04d", $cdscount;
$this->{"FEATURE$count"}->{on} = 1;
$this->{"CDS$cdscount"}->{feature} = $count;
$this->{"CDS$cdscount"}->{on} = 1;
$this->{"FEATURE$nextcount"}->{cds} = $cdscount;
$this->{"FEATURE$nextcount"}->{type} = 'CDS';
$this->{"FEATURE$nextcount"}->{gene} = sprintf "g%04d", $cdscount;
$this->{"FEATURE$nextcount"}->{function} = "orf; Unknown";
$this->{"FEATURE$nextcount"}->{note} = "predicted by Glimmer 2.2";
$this->{"FEATURE$nextcount"}->{codon_start} = 1;
$this->{"FEATURE$nextcount"}->{transl_table} = 11;
$this->{"FEATURE$nextcount"}->{product} = "orf, hypothetical protein";
$this->{"FEATURE$nextcount"}->{protein_id} = "N/A";
$this->{"FEATURE$nextcount"}->{db_xref} = "N/A";
$this->{"FEATURE$nextcount"}->{on} = 1;
if ($line[1] > $line[2]){
$this->{"CDS$cdscount"}->{start} = $line[2];
$this->{"CDS$cdscount"}->{end} = $line[1];
$this->{"CDS$cdscount"}->{direction} = "complement";
$this->{"FEATURE$count"}->{start} = $line[2];
$this->{"FEATURE$count"}->{end} = $line[1];
$this->{"FEATURE$count"}->{direction} = "complement";
$this->{"FEATURE$nextcount"}->{start} = $line[2];
$this->{"FEATURE$nextcount"}->{end} = $line[1];
$this->{"FEATURE$nextcount"}->{direction} = "complement";
}else{
$this->{"CDS$cdscount"}->{start} = $line[1];
$this->{"CDS$cdscount"}->{end} = $line[2];
$this->{"CDS$cdscount"}->{direction} = "direct";
$this->{"FEATURE$count"}->{start} = $line[1];
$this->{"FEATURE$count"}->{end} = $line[2];
$this->{"FEATURE$count"}->{direction} = "direct";
$this->{"FEATURE$nextcount"}->{start} = $line[1];
$this->{"FEATURE$nextcount"}->{end} = $line[2];
$this->{"FEATURE$nextcount"}->{direction} = "direct";
}
$this->{"FEATURE$nextcount"}->{translation} =
translate($this->get_geneseq("FEATURE$nextcount"));
$count ++;
}
close(GLIMMER);} |
perl(1).