Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
WebCvs | Raw content |
use Bio::Tools::Est2Genome;
my $featureiter = new Bio::Tools::Est2Genome(-file => 'output.est2genome'); # This is going to be fixed to use the SeqAnalysisI next_feature # Method eventually when we have the objects to put the data in # properly while( my $f = $featureiter->parse_next_gene ) { # process Bio::SeqFeature::Generic objects here }
_initialize_state | No description | Code |
analysis_method | Description | Code |
next_feature | Description | Code |
parse_next_gene | Description | Code |
analysis_method | code | next | Top |
Usage : $sim4->analysis_method(); |
next_feature | code | prev | next | Top |
Title : next_feature |
parse_next_gene | code | prev | next | Top |
Title : parse_next_gene |
_initialize_state | description | prev | next | Top |
my($self,@args) = @_; # call the inherited method first}
my $make = $self->SUPER::_initialize_state(@args); my ($genome_is_first) = $self->_rearrange([qw(GENOMEFIRST)], @args); delete($self->{'_genome_is_first'}); $self->{'_genome_is_first'} = $genome_is_first if(defined($genome_is_first)); $self->analysis_method("est2genome");
analysis_method | description | prev | next | Top |
#-------------}
my ($self, $method) = @_; if($method && ($method !~ /est2genome/i)) { $self->throw("method $method not supported in " . ref($self)); } return $self->SUPER::analysis_method($method);
next_feature | description | prev | next | Top |
my ($self) = shift; $self->throw("We haven't really done this right, yet, use parse_next_gene"); } 1;}
parse_next_gene | description | prev | next | Top |
my ($self) = @_; my $seensegment = 0; my @features; my ($qstrand,$hstrand) = (1,1); my $lasthseqname; while( defined($_ = $self->_readline) ) { if( /Note Best alignment is between (reversed|forward) est and (reversed|forward) genome, (but|and) splice\s+sites imply\s+(forward gene|REVERSED GENE)/) { if( $seensegment ) { $self->_pushback($_); return wantarray ? @features :\@ features; } $hstrand = -1 if $1 eq 'reversed'; $qstrand = -1 if $4 eq 'REVERSED GENE'; $self->debug( "1=$1, 2=$2, 4=$4\n"); } elsif( /^Exon/ ) { my ($name,$len,$score,$qstart,$qend,$qseqname, $hstart,$hend, $hseqname) = split; $lasthseqname = $hseqname; my $query = new Bio::SeqFeature::Similarity(-primary => $name, -source => $self->analysis_method, -seq_id => $qseqname, # FIXME WHEN WE REDO THE GENERIC NAME CHANGE}
-start => $qstart, -end => $qend, -strand => $qstrand, -score => $score, -tag => { # 'Location' => "$hstart..$hend",
'Sequence' => "$hseqname", } ); my $hit = new Bio::SeqFeature::Similarity(-primary => 'exon_hit', -source => $self->analysis_method, -seq_id => $hseqname, -start => $hstart, -end => $hend, -strand => $hstrand, -score => $score, -tag => { # 'Location' => "$qstart..$qend",
'Sequence' => "$qseqname", } ); push @features, new Bio::SeqFeature::SimilarityPair (-query => $query, -hit => $hit, -source => $self->analysis_method); } elsif( /^([\-\+\?])(Intron)/) { my ($name,$len,$score,$qstart,$qend,$qseqname) = split; push @features, new Bio::SeqFeature::Generic(-primary => $2, -source => $self->analysis_method, -start => $qstart, -end => $qend, -strand => $qstrand, -score => $score, -seq_id => $qseqname, -tag => { 'Sequence' => $lasthseqname}); } elsif( /^Span/ ) { } elsif( /^Segment/ ) { $seensegment = 1; } elsif( /^\s+$/ ) { # do nothing
} else { $self->warn( "unknown line $_\n"); } } return undef unless( @features ); return wantarray ? @features :\@ features;
FEEDBACK | Top |
Mailing Lists | Top |
bioperl-l@bioperl.org - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
Reporting Bugs | Top |
bioperl-bugs@bioperl.org
http://bugzilla.bioperl.org/
AUTHOR - Jason Stajich | Top |
CONTRIBUTORS | Top |
APPENDIX | Top |
new | Top |
Title : new
Usage : my $obj = new Bio::Tools::Est2Genome();
Function: Builds a new Bio::Tools::Est2Genome object
Returns : an instance of Bio::Tools::Est2Genome
Args : -file => 'output.est2genome' or
-fh => \*EST2GENOMEOUTPUT
-genomefirst => 1 # genome was the first input (not standard)