| Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
| WebCvs |
use Bio::Tools::tRNAscanSE;
my $parser = Bio::Tools::tRNAscanSE->new(-file => 'result.tRNAscanSE'); # parse the results while( my $gene = $parser->next_prediction ) { @exon_arr = $gene->get_SeqFeatures(); }
| _initialize | No description | Code |
| gene_tag | Description | Code |
| source_tag | Description | Code |
| exon_tag | Description | Code |
| analysis_method | Description | Code |
| next_feature | Description | Code |
| next_prediction | Description | Code |
| gene_tag | code | next | Top |
Title : gene_tag |
| source_tag | code | prev | next | Top |
Title : source_tag |
| exon_tag | code | prev | next | Top |
Title : exon_tag |
| analysis_method | code | prev | next | Top |
Usage : $genscan->analysis_method(); |
| next_feature | code | prev | next | Top |
Title : next_feature |
| next_prediction | code | prev | next | Top |
Title : next_prediction |
| _initialize | description | prev | next | Top |
my($self,@args) = @_; $self->SUPER::_initialize(@args); my ($genetag,$exontag,$srctag) = $self->SUPER::_rearrange([qw(GENETAG SRCTAG EXONTAG)], @args); $self->gene_tag(defined $genetag ? $genetag : $GeneTag); $self->source_tag(defined $srctag ? $srctag : $SrcTag); $self->exon_tag(defined $exontag ? $exontag : $ExonTag); $self->{'_seen'} = {};}
| gene_tag | description | prev | next | Top |
my $self = shift; return $self->{'gene_tag'} = shift if @_; return $self->{'gene_tag'};}
| source_tag | description | prev | next | Top |
my $self = shift; return $self->{'_source_tag'} = shift if @_; return $self->{'_source_tag'};}
| exon_tag | description | prev | next | Top |
my $self = shift; return $self->{'_exon_tag'} = shift if @_; return $self->{'_exon_tag'};}
| analysis_method | description | prev | next | Top |
#-------------}
my ($self, $method) = @_; if($method && ($method !~ /tRNAscan-SE/i)) { $self->throw("method $method not supported in " . ref($self)); } return $self->SUPER::analysis_method($method);
| next_feature | description | prev | next | Top |
my ($self,@args) = @_; # even though next_prediction doesn't expect any args (and this method}
# does neither), we pass on args in order to be prepared if this changes
# ever
return $self->next_prediction(@args);
| next_prediction | description | prev | next | Top |
my ($self) = @_; my ($genetag,$srctag,$exontag) = ( $self->gene_tag, $self->source_tag, $self->exon_tag); while( defined($_ = $self->_readline) ) { if( m/^(\S+)\s+ # sequence name}
(\d+)\s+ # tRNA #
(\d+)\s+(\d+)\s+ # tRNA start,end
(\w{3})\s+ # tRNA type
([CAGT]{3})\s+ # Codon
(\d+)\s+(\d+)\s+ # Intron Begin End
(\d+\.\d+)/ox # Cove Score
) {
my ($seqid,$tRNAnum,$start,$end,$type,
$codon,$intron_start,$intron_end,
$score) = ($1,$2,$3,$4,$5,$6,$7,$8,$9);
my $strand = 1; if( $start > $end ) { ($start,$end,$strand) = ($end,$start,-1); } if( $self->{'_seen'}->{$type}++ ) { $type .= "-".$self->{'_seen'}->{$type}; } my $gene = Bio::SeqFeature::Generic->new ( -seq_id => $seqid, -start => $start, -end => $end, -strand => $strand, -score => $score, -primary_tag => $genetag, -source_tag => $srctag, -tag => { 'ID' => "tRNA:$type", 'Name' => "tRNA:$type", 'AminoAcid' => $type, 'Codon' => $codon, }); if( $intron_start ) { if( $intron_start > $intron_end ) { ($intron_start,$intron_end) = ($intron_end,$intron_start); } $gene->add_SeqFeature(Bio::SeqFeature::Generic->new ( -seq_id=> $seqid, -start => $start, -end => $intron_start-1, -strand=> $strand, -primary_tag => $exontag, -source_tag => $srctag, -tag => { 'Parent' => "tRNA:$type", })); $gene->add_SeqFeature(Bio::SeqFeature::Generic->new ( -seq_id=> $seqid, -start => $intron_end+1, -end => $end, -strand=> $strand, -primary_tag => $exontag, -source_tag => $srctag, -tag => { 'Parent' => "tRNA:$type" })); } else { $gene->add_SeqFeature(Bio::SeqFeature::Generic->new ( -seq_id=> $seqid, -start => $start, -end => $end, -strand=> $strand, -primary_tag => $exontag, -source_tag => $srctag, -tag => { 'Parent' => "tRNA:$type" })); } return $gene; } } } 1;
| FEEDBACK | Top |
| Mailing Lists | Top |
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
| Support | Top |
| Reporting Bugs | Top |
http://bugzilla.open-bio.org/
| AUTHOR - Jason Stajich | Top |
| APPENDIX | Top |
| new | Top |
Title : new
Usage : my $obj = Bio::Tools::tRNAscanSE->new();
Function: Builds a new Bio::Tools::tRNAscanSE object
Returns : an instance of Bio::Tools::tRNAscanSE
Args : -fh/-file for input filename
-genetag => primary tag used in gene features (default 'tRNA_gene')
-exontag => primary tag used in exon features (default 'tRNA_exon')
-srctag => source tag used in all features (default 'tRNAscan-SE')