Bio::S...::HSPI(3pm)
πΈ Bio::S...::HSPI β User Contributed Perl Documentation πΈ
okay bestie so this is the 3pm manual page for Bio::S...::HSPI and it's giving β¨interface energyβ¨. Buckle up, it's long, so this is part 1 of 2 π¦
π NAME π
Bio::Search::HSP::HSPI β Interface for a High Scoring Pair in a similarity search result π
β¨ SYNOPSIS β¨
no cap, read this carefully: you literally cannot make one of these yourself, it's a pure interface, so this is more of a "here's what you can do with one" situation π«Ά
# Bio::Search::HSP::HSPI objects cannot be instantiated since this
# module defines a pure interface.
# Given an object that implements the Bio::Search::HSP::HSPI interface,
# you can do the following things with it:
$r_type = $hsp->algorithm;
$pvalue = $hsp->pvalue();
$evalue = $hsp->evalue();
$frac_id = $hsp->frac_identical( ['query'|'hit'|'total'] );
$frac_cons = $hsp->frac_conserved( ['query'|'hit'|'total'] );
$gaps = $hsp->gaps( ['query'|'hit'|'total'] );
$qseq = $hsp->query_string;
$hseq = $hsp->hit_string;
$homology_string = $hsp->homology_string;
$len = $hsp->length( ['query'|'hit'|'total'] );
$rank = $hsp->rank;
π¦ DESCRIPTION π¦
Bio::Search::HSP::HSPI objects cannot be instantiated since this module defines a pure interface. periodt, that's just how it is π
But given an object that implements the Bio::Search::HSP::HSPI interface, you can do the following things with it:
(yeah, that's it β the whole vibe is "this is a contract, not a class") π
π SEE ALSO π
This interface inherits methods from these other modules:
Bio::SeqFeatureI,Bio::SeqFeature::FeaturePairBio::SeqFeature::SimilarityPair
Please refer to these modules for documentation of the many additional inherited methods. iykyk β there's a whole ecosystem of extra methods hiding in there π
π¬ FEEDBACK π¬
π Mailing Lists π
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. bestie we literally want to hear from you π₯Ί
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π«Ά Support π«Ά
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. fr fr, the more detail the better β don't just say "it's broken" π
π Reporting Bugs π
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://github.com/bioperl/bioperl-live/issues
π AUTHOR - Steve Chervitz, Jason Stajich π
Email sac-at-bioperl.org Email jason-at-bioperl.org
β COPYRIGHT β
Copyright (c) 2001 Steve Chervitz, Jason Stajich. All Rights Reserved.
π DISCLAIMER π
This software is provided "as is" without warranty of any kind.
ngl that's the whole disclaimer. no warranty, none, zero, not even a little one π
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (you know, the little "don't touch unless you know what you're doing" underscore energy) π
algorithm π₯
- Title :
algorithm - Usage :
my $r_type = $hsp->algorithm - Function: Obtain the name of the algorithm used to obtain the HSP
- Returns : string (e.g.,
BLASTP) - Args : none
pvalue π
- Title :
pvalue - Usage :
my $pvalue = $hsp->pvalue(); - Function: Returns the P-value for this HSP or
undef - Returns : float or exponential (
2e-10) P-value is not defined with NCBI Blast2 reports. - Returns : float or exponential (
2e-10) - Args : none
heads up: P-value is not defined with NCBI Blast2 reports. that's not a bug, that's just the format π
evalue π
- Title :
evalue - Usage :
my $evalue = $hsp->evalue(); - Function: Returns the e-value for this HSP
- Returns : float or exponential (
2e-10) - Args : none
frac_identical π§
- Title :
frac_identical - Usage :
my $frac_id = $hsp->frac_identical( ['query'|'hit'|'total'] ); - Function: Returns the fraction of identitical positions for this HSP
- Returns : Float in range
0.0 -> 1.0 - Args :
'query'= num identical / length of query seq (without gaps)'hit'= num identical / length of hit seq (without gaps)'total'= num identical / length of alignment (with gaps)- default =
'total'
frac_conserved πΈ
- Title :
frac_conserved - Usage :
my $frac_cons = $hsp->frac_conserved( ['query'|'hit'|'total'] ); - Function : Returns the fraction of conserved positions for this HSP. This is the fraction of symbols in the alignment with a positive score.
- Returns : Float in range
0.0 -> 1.0 - Args :
'query'= num conserved / length of query seq (without gaps)'hit'= num conserved / length of hit seq (without gaps)'total'= num conserved / length of alignment (with gaps)- default =
'total'
num_identical β¨
- Title :
num_identical - Usage :
$obj->num_identical($newval) - Function: returns the number of identical residues in the alignment
- Returns : integer
- Args : integer (optional)
num_conserved π¦
- Title :
num_conserved - Usage :
$obj->num_conserved($newval) - Function: returns the number of conserved residues in the alignment
- Returns : integer
- Args : integer (optional)
gaps π³οΈ
- Title :
gaps - Usage :
my $gaps = $hsp->gaps( ['query'|'hit'|'total'] ); - Function : Get the number of gap characters in the query, hit, or total alignment.
- Returns : Integer, number of gap characters or
0if none - Args :
'query'= num conserved / length of query seq (without gaps)'hit'= num conserved / length of hit seq (without gaps)'total'= num conserved / length of alignment (with gaps)- default =
'total'
yes, the Args descriptions here literally say "conserved" in a method about gaps. we don't ask questions, we just copy it exactly π
query_string π
- Title :
query_string - Usage :
my $qseq = $hsp->query_string; - Function: Retrieves the query sequence of this HSP as a string
- Returns : string
- Args : none
hit_string π―
- Title :
hit_string - Usage :
my $hseq = $hsp->hit_string; - Function: Retrieves the hit sequence of this HSP as a string
- Returns : string
- Args : none
homology_string π
- Title :
homology_string - Usage :
my $homo_string = $hsp->homology_string; - Function: Retrieves the homology sequence for this HSP as a string. The homology sequence is the string of symbols in between the query and hit sequences in the alignment indicating the degree of conservation (e.g., identical, similar, not similar).
- Returns : string
- Args : none
length π
- Title :
length - Usage :
my $len = $hsp->length( ['query'|'hit'|'total'] ); - Function : Returns the length of the query or hit in the alignment (without gaps) or the aggregate length of the HSP (including gaps; this may be greater than either hit or query)
- Returns : integer
- Args :
'query'= length of query seq (without gaps)'hit'= length of hit seq (without gaps)'total'= length of alignment (with gaps)- default =
'total'
- Args : none
yeah there are two Args lines here. we're keeping both. the original said it, we say it π
percent_identity π―
- Title :
percent_identity - Usage :
my $percentid = $hsp->percent_identity() - Function: Returns the calculated percent identity for an HSP
- Returns : floating point between
0and100 - Args : none
get_aln π§¬
- Title :
get_aln - Usage :
my $aln = $hsp->get_aln - Function: Returns a
Bio::SimpleAlignrepresenting the HSP alignment - Returns :
Bio::SimpleAlign - Args : none
seq_inds π
- Title :
seq_inds - Purpose : Get a list of residue positions (indices) for all identical or conserved residues in the query or sbjct sequence.
- Example :
@s_ind = $hsp->seq_inds('query', 'identical');
@h_ind = $hsp->seq_inds('hit', 'conserved');
@h_ind = $hsp->seq_inds('hit', 'conserved', 1);
- Returns : List of integers May include ranges if
collapseis true. - Argument :
seq_type='query'or'hit'or'sbjct'(default =query) ('sbjct'is synonymous with'hit')class='identical'or'conserved'or'nomatch'or'gap'(default =identical) (can be shortened to'id'or'cons')collapse= boolean, if true, consecutive positions are merged using a range notation, e.g.,"1 2 3 4 5 7 9 10 11"collapses to"1-5 7 9-11". This is useful for consolidating long lists. Default = no collapse.
- Throws : n/a.
- Comments :
- See Also :
Bio::Search::BlastUtils::collapse_nums(),Bio::Search::Hit::HitI::seq_inds()
π«Ά Inherited from Bio::SeqFeature::SimilarityPair π«Ά
These methods come from Bio::SeqFeature::SimilarityPair β iconic inheritance moment β¨
query π
- Title :
query - Usage :
my $query = $hsp->query - Function: Returns a SeqFeature representing the query in the HSP
- Returns :
Bio::SeqFeature::Similarity - Args : [optional] new value to set
hit π―
- Title :
hit - Usage :
my $hit = $hsp->hit - Function: Returns a SeqFeature representing the hit in the HSP
- Returns :
Bio::SeqFeature::Similarity - Args : [optional] new value to set
significance π
- Title :
significance - Usage :
$evalue = $obj->significance();
$obj->significance($evalue);
- Function: Get/Set the significance value (see
Bio::SeqFeature::SimilarityPair) - Returns : significance value (scientific notation string)
- Args : significance value (sci notation string)
score π
- Title :
score - Usage :
my $score = $hsp->score(); - Function: Returns the score for this HSP or
undef - Returns : numeric
- Args : [optional] numeric to set value
bits β‘
- Title :
bits - Usage :
my $bits = $hsp->bits(); - Function: Returns the bit value for this HSP or
undef - Returns : numeric
- Args : none
strand π§
- Title :
strand - Usage :
$hsp->strand('query') - Function: Retrieves the strand for the HSP component requested
- Returns :
+1or-1(0if unknown) - Args :
'hit'or'subject'or'sbjct'to retrieve the strand of the subject'query'to retrieve the query strand (default)'list'or'array'to retrieve both query and hit together
start π©
- Title :
start - Usage :
$hsp->start('query') - Function: Retrieves the start for the HSP component requested
- Returns : integer
- Args :
'hit'or'subject'or'sbjct'to retrieve the start of the subject'query'to retrieve the query start (default)
end π
- Title :
end - Usage :
$hsp->end('query') - Function: Retrieves the end for the HSP component requested
- Returns : integer
- Args :
'hit'or'subject'or'sbjct'to retrieve the end of the subject'query'to retrieve the query end (default)
okay that's the whole part 1 bestie, there's more coming so don't go anywhere π¦β¨
β¨ seq β¨
okay bestie, listen. this method is your main character way to get the query or sbjct sequence as a full Bio::Seq.pm object. it's giving object reference energy, no cap.
- Usage π
:
$hsp->seq( [seq_type] ); - Purpose π§¬: Get the query or sbjct sequence as a
Bio::Seq.pmobject. - Example πΈ:
$seqObj = $hsp->seq('query'); - Returns π: Object reference for a
Bio::Seq.pmobject. - Argument π«Ά:
seq_type='query'or'hit'or'sbjct'(default ='query'). ('sbjct'is synonymous with'hit'.) default is'query' - Throws π: Propagates any exception that occurs during construction of the
Bio::Seq.pmobject. - Comments π¬: The sequence is returned in an array of strings corresponding to the strings in the original format of the Blast alignment. (i.e., same spacing).
- See Also π:
"seq_str","seq_inds",Bio::Seq
β¨ seq_str β¨
this one is the string edition, and it also spills the 'match' sequence β the little symbol string chillin' between query and sbjct. iconic behavior, fr fr.
- Usage π
:
$hsp->seq_str( seq_type ); - Purpose π§¬: Get the full query, sbjct, or
'match'sequence as a string. The'match'sequence is the string of symbols in between the query and sbjct sequences. - Example πΈ:
$str = $hsp->seq_str('query'); - Returns π: String
- Argument π«Ά:
seq_Type='query'or'hit'or'sbjct'or'match'('sbjct'is synonymous with'hit') default is'query' - Throws π: Exception if the argument does not match an accepted
seq_type. - Comments π¬: (nothing here, just vibes)
- See Also π:
"seq","seq_inds","_set_match_seq"
β¨ rank β¨
- Usage π
:
$hsp->rank( [string] ); - Purpose π§¬: Get the rank of the HSP within a given Blast hit.
- Example πΈ:
$rank = $hsp->rank; - Returns π: Integer (1..n) corresponding to the order in which the HSP appears in the BLAST report.
β¨ matches β¨
this one is a whole little calculator for identical and conservative matches. it can even do it within a specific interval if you're feeling fancy. note: 'conservative' matches are called 'positives' in the Blast report, iykyk.
- Usage π :
$hsp->matches(-seq => 'hit'|'query',
-start => $start,
-stop => $stop);
- Purpose π§¬: Get the total number of identical and conservative matches in the query or sbjct sequence for the given HSP. Optionally can report data within a defined interval along the seq. (Note:
'conservative'matches are called'positives'in the Blast report.) - Example πΈ:
($id,$cons) = $hsp_object->matches(-seq => 'hit');
($id,$cons) = $hsp_object->matches(-seq => 'query',
-start => 300,
-stop => 400);
- Returns π: 2-element array of integers
- Argument π«Ά:
seq_type='query'or'hit'or'sbjct'(default =query) ('sbjct'is synonymous with'hit')start= Starting coordinate (optional)stop= Ending coordinate (optional)
- Throws π: Exception if the supplied coordinates are out of range.
- Comments π¬: Relies on
seq_str('match')to get the string of alignment symbols between the query and sbjct lines which are used for determining the number of identical and conservative matches. - See Also π:
"length","gaps","seq_str",Bio::Search::Hit::BlastHit::_adjust_contigs()
β¨ n β¨
- Usage π
:
$hsp_obj->n() - Purpose π§¬: Get the N value (num HSPs on which P/Expect is based). This value is not defined with NCBI Blast2 with gapping.
- Returns π: Integer or null string if not defined.
- Argument π«Ά: n/a
- Throws π: n/a
- Comments π¬: The
'N'value is listed in parenthesis with P/Expect value: e.g.,P(3) = 1.2e-30--->(N = 3). Not defined in NCBI Blast2 with gaps. This typically is equal to the number of HSPs but not always. To obtain the number of HSPs, useBio::Search::Hit::HitI::num_hsps(). - See Also π:
Bio::SeqFeature::SimilarityPair::score()
β¨ range β¨
- Usage π
:
$hsp->range( [seq_type] ); - Purpose π§¬: Gets the (start, end) coordinates for the query or sbjct sequence in the HSP alignment.
- Example πΈ:
($query_beg, $query_end) = $hsp->range('query');
($hit_beg, $hit_end) = $hsp->range('hit');
- Returns π: Two-element array of integers
- Argument π«Ά:
seq_type= string,'query'or'hit'or'sbjct'(default ='query') ('sbjct'is synonymous with'hit') - Throws π: n/a
- Comments π¬: This is a convenience method for constructions such as
($hsp->query->start, $hsp->query->end)
that's the whole vibe, bestie. this page came from perl v5.32.1, dated 2021-08-15, for Bio::S...::HSPI(3pm). stay slaying those HSPs πβ¨π¦
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms