Bio::Tools Genomewise
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Summary
Bio::Tools::Genomewise - Results of one Genomewise run
Package variables
No package variables defined.
Included modules
Bio::SeqFeature::FeaturePair
Bio::SeqFeature::Gene::Exon
Bio::SeqFeature::Gene::GeneStructure
Bio::SeqFeature::Gene::Transcript
Bio::SeqFeature::Generic
Bio::Tools::AnalysisResult
Bio::Tools::Genewise
Inherit
Bio::Tools::Genewise
Synopsis
  use Bio::Tools::Genomewise;
  my $gw = Bio::Tools::Genomewise(-file=>"genomewise.out");

  while (my $gene = $gw->next_prediction){
      my @transcripts = $gw->transcripts;
      foreach my $t(@transcripts){
        my @exons =  $t->exons;
        foreach my $e(@exons){
            print $e->start." ".$e->end."\n";
        }
      }
  }
Description
This is the parser for the output of Genewise. It takes either a file
handle or a file name and returns a
Bio::SeqFeature::Gene::GeneStructure object. You will need to specify
the proper target sequence id on the object with the
$feature->seq_id($seqid).
Methods
newDescriptionCode
next_predictionDescriptionCode
Methods description
newcode    nextTop
 Title   : new
 Usage   : $obj->new(-file=>"genewise.out");
           $obj->new(-fh=>\*GW);
 Function: Constructor for genomewise wrapper. Takes either a file or filehandle
 Example :
 Returns : Bio::Tools::Genomewise
next_predictioncodeprevnextTop
 Title   : next_prediction
 Usage   : while($gene = $genewise->next_prediction()) {
                  # do something
           }
 Function: Returns the gene structure prediction of the Genomewise result
           file. Call this method repeatedly until FALSE is returned.

 Example :
 Returns : a Bio::SeqFeature::Gene::GeneStructure object
 Args    :
Methods code
newdescriptionprevnextTop
sub new {
  my($class,@args) = @_;
  my $self = $class->SUPER::new(@args);
  return $self;
}
next_predictiondescriptionprevnextTop
sub next_prediction {
    my ($self) = @_;

    my $genes;
    while ($_ = $self->_readline) {
	$self->debug( $_ ) if( $self->verbose > 0);
	last if( /^\/\//);

	if( /^Gene\s+\d+\s*$/ ) {
	    $genes = new Bio::SeqFeature::Gene::GeneStructure
		(-source => $Srctag,
		 -seq_id => $self->_target_id, # if this had been specified
); $_ = $self->_readline; $self->debug( $_ ) if( $self->verbose > 0); unless ( /^Gene\s+(\d+)\s+(\d+)\s*$/ ) { $self->warn("Unparseable genomewise output"); last; } my $transcript = new Bio::SeqFeature::Gene::Transcript (-source => $Srctag, -seq_id => $self->_target_id, # if this had been specified
-start => $1, -end => $2, ); my $nbr = 1; while( $_ = $self->_readline ) { $self->debug( $_ ) if( $self->verbose > 0); unless( m/^\s+Exon\s+(\d+)\s+(\d+)\s+phase\s+(\d+)/ ){ $self->_pushback($_); last; } my ($e_start,$e_end,$phase,$e_strand) = ($1,$2,$3); ($e_start,$e_end,$e_strand) = $self->_get_strand($e_start, $e_end); $transcript->strand($e_strand) unless $transcript->strand != 0; my $exon = new Bio::SeqFeature::Gene::Exon (-seq_id=>$self->_target_id, -source => $Srctag, -start=>$e_start, -end=>$e_end, -frame => $phase, -strand=>$e_strand); $exon->add_tag_value("Exon",$nbr++); $exon->add_tag_value('phase',$phase); $transcript->add_exon($exon); } $genes->add_transcript($transcript); last; # only process a single gene at a time
} } return $genes;
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to one
of the Bioperl mailing lists. Your participation is much appreciated.
  bioperl-l@bioperl.org          - General discussion
  http://bio.perl.org/MailList.html             - About the mailing lists
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via email
or the web:
  bioperl-bugs@bio.perl.org
  http://bugzilla.bioperl.org/
AUTHOR - Fugu Team Top
 Email: fugui@worf.fugu-sg.org
APPENDIXTop
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
_get_strandTop
 Title   : _get_strand
 Usage   : $obj->_get_strand
 Function: takes start and end values, swap them if start>end and returns end
 Example :
 Returns :$start,$end,$strand
scoreTop
 Title   : score
 Usage   : $obj->score
 Function: get/set for score info
 Example :
 Returns : a score value
_prot_idTop
 Title   : _prot_id
 Usage   : $obj->_prot_id
 Function: get/set for protein id 
 Example :
 Returns :a protein id
_target_idTop
 Title   : _target_id
 Usage   : $obj->_target_id
 Function: get/set for genomic sequence id
 Example :
 Returns :a target id