| Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
use Bio::Tools::BPbl2seq;
my $report = Bio::Tools::BPbl2seq->new(-file => 't/bl2seq.out');
$report->sbjctName;
$report->sbjctLength;
while(my $hsp = $report->next_feature) {
$hsp->score;
$hsp->bits;
$hsp->percent;
$hsp->P;
$hsp->match;
$hsp->positive;
$hsp->length;
$hsp->querySeq;
$hsp->sbjctSeq;
$hsp->homologySeq;
$hsp->query->start;
$hsp->query->end;
$hsp->sbjct->start;
$hsp->sbjct->end;
$hsp->sbjct->seqname;
$hsp->sbjct->overlaps($exon);
}
my $report = Bio::Tools::BPbl2seq->new(\*FH, "ALEU_HORVU");If the name of the first sequence (the "query") is not passed to
| new | Description | Code |
| getSbjct | Description | Code |
| next_feature | Description | Code |
| queryName | Description | Code |
| sbjctName | Description | Code |
| sbjctLength | Description | Code |
| P | Description | Code |
| percent | Description | Code |
| match | Description | Code |
| positive | Description | Code |
| querySeq | Description | Code |
| sbjctSeq | Description | Code |
| homologySeq | Description | Code |
| qs | Description | Code |
| ss | Description | Code |
| hs | Description | Code |
| _fastForward | No description | Code |
| new | code | next | Top |
Title : new
Function: Create a new Bio::Tools::BPbl2seq object
Returns : Bio::Tools::BPbl2seq
Args : -file input file (alternative to -fh)
-fh input stream (alternative to -file)
-queryname name of query sequence |
| getSbjct | code | prev | next | Top |
Title :
Usage : $sbjct = $obj->getSbjct();
Function : Method of obtaining single "subject" of a bl2seq report
Example : my $sbjct = $obj->getSbjct ) {}
Returns : Sbjct object or null if finished
Args : |
| next_feature | code | prev | next | Top |
Title : next_feature
Usage : while( my $feat = $res->next_feature ) { # do something }
Function: calls next_feature function from BPlite.
Example :
Returns : A Bio::SeqFeatureI compliant object, in this case a
Bio::Tools::BPlite::HSP object, and FALSE if there are no more
HSPs.
Args : None |
| queryName | code | prev | next | Top |
Title : Usage : $name = $report->queryName(); Function : get /set the name of the query Example : Returns : name of the query Args : |
| sbjctName | code | prev | next | Top |
Title : Usage : $name = $report->sbjctName(); Function : returns the name of the Sbjct Example : Returns : name of the Sbjct Args : |
| sbjctLength | code | prev | next | Top |
Title : sbjctLength Usage : $length = $report->sbjctLength(); Function : returns the length of the Sbjct Example : Returns : name of the Sbjct Args : |
| P | code | prev | next | Top |
Title : P Usage : Function : Syntax no longer supported, error message only |
| percent | code | prev | next | Top |
Title : percent Usage : $hsp->percent(); Function : Syntax no longer supported, error message only |
| match | code | prev | next | Top |
Title : match Usage : $hsp->match(); Function : Syntax no longer supported, error message only |
| positive | code | prev | next | Top |
Title : positive Usage : $hsp->positive(); Function : Syntax no longer supported, error message only |
| querySeq | code | prev | next | Top |
Title : querySeq Usage : $hsp->querySeq(); Function : Syntax no longer supported, error message only |
| sbjctSeq | code | prev | next | Top |
Title : sbjctSeq Usage : $hsp->sbjctSeq(); Function : Syntax no longer supported, error message only |
| homologySeq | code | prev | next | Top |
Title : homologySeq Usage : $hsp->homologySeq(); Function : Syntax no longer supported, error message only |
| qs | code | prev | next | Top |
Title : qs Usage : $hsp->qs(); Function : Syntax no longer supported, error message only |
| ss | code | prev | next | Top |
Title : ss Usage : $hsp->ss(); Function : Syntax no longer supported, error message only |
| hs | code | prev | next | Top |
Title : hs Usage : $hsp->hs(); Function : Syntax no longer supported, error message only |
| new | description | prev | next | Top |
my ($class, @args) = @_; my $self = $class->SUPER::new(@args); # initialize IO}
$self->_initialize_io(@args); my $sbjct = $self->getSbjct(); $self->{'_current_sbjct'} = $sbjct; my ($queryname) = $self->_rearrange([qw(QUERYNAME)], @args); $queryname = 'unknown' if( ! defined $queryname ); $self->{'_query'}->{'NAME'} = $queryname; return $self;
| getSbjct | description | prev | next | Top |
my ($self) = @_; # $self->_fastForward or return undef;}
#######################
# get bl2seq "sbjct" name and length #
#######################
my $length; my $def; READLOOP: while(defined ($_ = $self->_readline) ) { if ($_ =~ /^>(.+)$/) { $def = $1; next READLOOP; } elsif ($_ =~ /^\s*Length\s.+\D(\d+)/i) { $length = $1; next READLOOP; } elsif ($_ =~ /^\s{0,2}Score/) { $self->_pushback($_); last READLOOP; } } return undef if ! defined $def; $def =~ s/\s+/ /g; $def =~ s/\s+$//g; ####################
# the Sbjct object #
####################
my $sbjct = new Bio::Tools::BPlite::Sbjct('-name'=>$def, '-length'=>$length, '-parent'=>$self); return $sbjct;
| next_feature | description | prev | next | Top |
my ($self) = @_; my ($sbjct, $hsp); $sbjct = $self->{'_current_sbjct'}; unless( defined $sbjct ) { # $sbjct = $self->{'_current_sbjct'} = $self->nextSbjct;}
# return undef unless defined $sbjct;
$self->throw(" No hit object found for bl2seq report\n ") ; } $hsp = $sbjct->nextHSP; return $hsp || undef;
| queryName | description | prev | next | Top |
my ($self, $queryname) = @_; if( $queryname ) { $self->{'_query'}->{'NAME'} = $queryname; } $self->{'_query'}->{'NAME'};}
| sbjctName | description | prev | next | Top |
my $self = shift; # unless( defined $self->{'_current_sbjct'} ) {}
# my $sbjct = $self->{'_current_sbjct'} = $self->nextSbjct;
# return undef unless defined $sbjct;
# }
$self->{'_current_sbjct'}->{'NAME'} || '';
| sbjctLength | description | prev | next | Top |
my $self = shift; # unless( defined $self->{'_current_sbjct'} ) {}
# my $sbjct = $self->{'_current_sbjct'} = $self->nextSbjct;
# return undef unless defined $sbjct;
# }
$self->{'_current_sbjct'}->{'LENGTH'};
| P | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ");}
| percent | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ");}
| match | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ");}
| positive | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| querySeq | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| sbjctSeq | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| homologySeq | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| qs | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| ss | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| hs | description | prev | next | Top |
my $self = shift; $self->throw("Syntax used is no longer supported.\n See BPbl2seq.pm documentation for current syntax.\n ") ;}
| _fastForward | description | prev | next | Top |
my ($self) = @_; return 0 if $self->{'REPORT_DONE'}; # empty report}
while(defined( $_ = $self->_readline() ) ) { if ($_ =~ /^>|^Parameters|^\s+Database:|^\s+Posted date:|^\s*Lambda/) { $self->_pushback($_); return 1; } } $self->warn("Possible error (1) while parsing BLAST report!");
| FEEDBACK | Top |
| Mailing Lists | Top |
bioperl-l@bioperl.org - General discussion http://bio.perl.org/MailList.html - About the mailing lists
| Reporting Bugs | Top |
bioperl-bugs@bio.perl.org http://bio.perl.org/bioperl-bugs/
| AUTHOR - Peter Schattner | Top |
| ACKNOWLEDGEMENTS | Top |
| CONTRIBUTORS | Top |