Bio::Tools::Phylo Gumby
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::Tools::Phylo::Gumby - Parses output from gumby
Package variables
No package variables defined.
Included modules
Bio::Annotation::SimpleValue
Bio::SeqFeature::Annotated
Inherit
Bio::Root::IO Bio::Root::Root
Synopsis
  #!/usr/bin/perl -Tw
use strict;
use Bio::Tools::Phylo::Gumby; my $parser = Bio::Tools::Phylo::Gumby->new(-file => "out.align"); my @features = $parser->next_result();
Description
This module is used to parse the output from 'gumby' by Shyam Prabhakar. You
can get details here: http://pga.lbl.gov/gumby/
It works on the .align files produced.
The result is a list of feature objects.
Methods
newDescriptionCode
next_resultDescriptionCode
Methods description
newcode    nextTop
 Title   : new
Usage : my $obj = Bio::Tools::Phylo::Gumby->new();
Function: Builds a new Bio::Tools::Phylo::Gumby object
Returns : Bio::Tools::Phylo::Gumby
Args : -file (or -fh) should contain the contents of a gumby .align output
file
next_resultcodeprevnextTop
 Title   : next_result
Usage : $result = $obj->next_result();
Function: Returns the next set of results available from the input, or undef if
there are no more results.
Returns : list of Bio::SeqFeature::Annotated (one per sequence). Features are
annotated with tags for pvalue and 'kind' (holding 'all', 'exon', or
'nonexon').
NB: Gumby ignores sequence coordinates in input alignments, treating each sequence as if it started at position 1. If you're running this manually (ie. not via the Bio::Tools::Run::Phylo::Gumby) you will have to adjust the coordinates to match up with your input alignment and sequences. Args : none
Methods code
newdescriptionprevnextTop
sub new {
    my ($class, @args) = @_;
    my $self = $class->SUPER::new(@args);
    
    $self->_initialize_io(@args);
    
    return $self;
}
next_resultdescriptionprevnextTop
sub next_result {
    my ($self) = @_;
    
    my $line = $self->_readline || return;
    while ($line !~ /^start/) {
        $line = $self->_readline || return;
        
        if ($line =~ /^(all|exon|nonexon):/) {
            $self->{_kind} = $1;
        }
    }
    
    my ($score, $pvalue) = $line =~ /score (\d+), pvalue (\S+)/;
    
    my @feats;
    while ($line = $self->_readline) {
        $line =~ /^$/ && last;
        $line || last;
        my ($seq_id, $start, $end) = split(/\s+/, $line);
        
        my $feature = Bio::SeqFeature::Annotated->new(-seq_id => $seq_id,
                                                      -start  => $start,
                                                      -end    => $end,
                                                      -score  => $score,
                                                      -strand => 1,
                                                      -source => 'gumby');
        my $sv = Bio::Annotation::SimpleValue->new(-tagname => 'pvalue', -value => $pvalue);
        $feature->annotation->add_Annotation($sv);
        $sv = Bio::Annotation::SimpleValue->new(-tagname => 'kind', -value => $self->{_kind});
        $feature->annotation->add_Annotation($sv);
        $sv = Bio::Annotation::SimpleValue->new(-tagname => 'predicted', -value => 1);
        $feature->annotation->add_Annotation($sv);
        
        push(@feats, $feature);
    }
    
    return @feats;
}

1;
}
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
the Bioperl mailing list. Your participation is much appreciated.
  bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support Top
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via the
web:
  https://redmine.open-bio.org/projects/bioperl/
AUTHOR - Sendu BalaTop
Email bix@sendu.me.uk
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _