G::IO
FastaI
Globals (from use vars definitions) |
$AUTOLOAD |
@INC |
$VERSION = '1.0' |
Privates (from my definitions) |
$infile = '' |
use G::IO::FastaI; @ISA = (G::IO::FastaI);
|
Fasta input parser. Intended for internal use only.
|
close_gb | No description | Code |
filepath | No description | Code |
getnucs | No description | Code |
goto_origin | No description | Code |
new | No description | Code |
next_locus | No description | Code |
open_gb | No description | Code |
read_features | No description | Code |
read_header | No description | Code |
read_locus | No description | Code |
Methods description
Methods code
sub close_gb
{ my $this = shift;
close(FASTA);
}
sub filepath
{ my $this = shift;
return $infile;
}
sub getnucs
{ my $this = shift;
while(<FASTA>){
last if (/^\s*\n$/);
s/[^A-Za-z]//g;
$this->{"SEQ"} .= lc($_);
}
}
sub goto_origin
{ my $this = shift;
}
sub new
{ my $pkg = shift;
my $filename = shift;
my $option = shift;
my $this = new G("blessed");
bless $this;
return $this;
}
sub next_locus
{ my $this = shift;
my $msg = shift;
undef %{$this};
$this->read_locus();
$this->getnucs();
if (length($this->{SEQ}) > 0){
$this->seq_info() unless($msg);
return 1;
}else{
return 0;
}
}
sub open_gb
{ my $this = shift;
my $filename = shift;
$infile = $filename;
open(FASTA, $filename) || die("Error at G::IO::FastaI: $!\n");
return *FASTA;
}
sub read_features
{ my $this = shift;
}
sub read_header
{ my $this = shift;
}
sub read_locus
{ my $this = shift;
local($_);
while(<FASTA>){
chomp;
if (/^>(.*)$/){
$this->{LOCUS}->{id} = $1;
last;
}
}
}
General documentation