Bio::S...lastHSP(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

okay so this is the manual page for Bio::S...lastHSP(3pm) πŸ’– β€” meet Bio::Search::HSP::PsiBlastHSP, aka the Bioperl BLAST High-Scoring Pair object. yes the class name is a whole paragraph, we love that for us.


πŸŽ€ SYNOPSIS πŸŽ€

See Bio::Search::Hit::BlastHit. that's the whole synopsis bestie, minimalism, we respect it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so a Bio::Search::HSP::PsiBlastHSP object is an interface to the data you get out of a single alignment section of a Blast report β€” and that section is what everyone calls a "High-scoring Segment Pair". under the hood it's basically a pairwise alignment that comes with score info attached. slay.

PsiBlastHSP objects are what you reach for through Bio::Search::Hit::BlastHit objects, after you've parsed a BLAST report with the Bio::SearchIO system. the whole pipeline goes like this: construction of PsiBlastHSP objects is done by Bio::Factory::BlastHitFactory, in a process orchestrated by the Blast parser (Bio::SearchIO::psiblast). then the resulting PsiBlastHSPs get accessed via Bio::Search::Hit::BlastHit. so you do not need to use Bio::Search::HSP::PsiBlastHSP directly. no cap. but if you do need to construct PsiBlastHSPs directly, go look at the new() function for the details.

want Bio::SearchIO BLAST parsing usage examples? they live in the examples/search-blast directory of the Bioperl distribution 🫢


🌸 Start and End coordinates 🌸

sequence endpoints get swapped so that start is always less than end. this affects TBLASTN/X hits on the minus strand. you can recover the strand info with the strand() method. this normalization step is standard Bioperl practice, and it also makes range information easier to use for methods like match(). it's giving very organized, very mindful ✨

  • Supports BLAST versions 1.x and 2.x, gapped and ungapped.

Bio::Search::HSP::PsiBlastHSP.pm has the ability to extract a list of all residue indices for identical and conservative matches along both query and sbjct sequences. but since that degree of detail is not always needed, this behavior does not occur during construction of the PsiBlastHSP object. these data will automatically be collected as necessary as the PsiBlastHSP.pm object is used. lazy parsing, main character energy, we stan.


πŸ’œ DEPENDENCIES πŸ’œ

Bio::Search::HSP::PsiBlastHSP.pm is a concrete class that inherits from Bio::SeqFeature::SimilarityPair and Bio::Search::HSP::HSPI. and it employs Bio::Seq and Bio::SimpleAlign for creating sequence and alignment objects respectively. the family tree is real.

🧚 Relationship to Bio::SimpleAlign and Bio::Seq 🧚

PsiBlastHSP.pm can hand you the query or sbjct sequence as a Bio::Seq object via the seq() method. it can also build a two-sequence Bio::SimpleAlign alignment object out of the query and sbjct sequences, using the get_aln() method. but heads up β€” creation of alignment objects is not automatic when you construct the PsiBlastHSP.pm object, because this level of functionality is not always required and it would generate a LOT of extra overhead when you're crunching many reports. we're being efficient, we're being considerate, periodt.


🌈 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 one of the Bioperl mailing lists. your participation is much appreciated 🫢

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 responsive experts will be able look at the problem and quickly address it. and please include a thorough description of the problem, with code and data examples if at all possible. the more detail the better, bestie πŸ™ˆ

πŸ› Reporting Bugs πŸ›

report bugs to the Bioperl bug tracking system, so we can keep track the bugs and their resolution. bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR πŸ‘‘

Steve Chervitz <sac-at-bioperl.org>

See the FEEDBACK section for where to send bug reports and comments.


πŸŽ€ ACKNOWLEDGEMENTS πŸŽ€

this software was originally developed in the Department of Genetics at Stanford University. I would also like to acknowledge my colleagues at Affymetrix for useful feedback. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

  • Bio::Search::Hit::BlastHit.pm β€” Blast hit object.
  • Bio::Search::Result::BlastResult.pm β€” Blast Result object.
  • Bio::Seq.pm β€” Biosequence object

Copyright (c) 1996-2001 Steve Chervitz. All Rights Reserved.


πŸ’€ DISCLAIMER πŸ’€

This software is provided "as is" without warranty of any kind. (yes, the classic. no promises, no take-backs.)


⭐ APPENDIX ⭐

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _.

πŸ“ new

Usage:

$hsp = Bio::Search::HSP::PsiBlastHSP->new( %named_params );
Bio::Search::HSP::PsiBlastHSP.pm objects are constructed
automatically by Bio::SearchIO::BlastHitFactory.pm,
so there is no need for direct instantiation.

Purpose: Constructs a new PsiBlastHSP object and Initializes key variables for the HSP.

Returns: A Bio::Search::HSP::PsiBlastHSP object

Argument: Named parameters:

parameter keys are case-insensitive.

  • -RAW_DATA => array ref containing raw BLAST report data for a single HSP. This includes all lines of the HSP alignment from a traditional BLAST or PSI-BLAST (non-XML) report,
  • -RANK => integer (1..n).
  • -PROGRAM => string ('TBLASTN', 'BLASTP', etc.).
  • -QUERY_NAME => string, id of query sequence
  • -HIT_NAME => string, id of hit sequence

Comments: having the raw data allows this object to do lazy parsing of the raw HSP data (i.e., not parsed until needed).

note that there is a fair amount of basic parsing that is currently performed in this module that would be more appropriate to do within a separate factory object. this parsing code will likely be relocated and more initialization parameters will be added to new().

See Also: Bio::SeqFeature::SimilarityPair::new(), Bio::SeqFeature::Similarity::new()

πŸ¦‹ algorithm

Title: algorithm

Usage: $alg = $hsp->algorithm();

Function: Gets the algorithm specification that was used to obtain the hsp. For BLAST, the algorithm denotes what type of sequence was aligned against what (BLASTN: dna-dna, BLASTP prt-prt, BLASTX translated dna-prt, TBLASTN prt-translated dna, TBLASTX translated dna-translated dna).

Returns: a scalar string

Args: none

πŸ’… signif()

Usage: $hsp_obj->signif()

Purpose: Get the P-value or Expect value for the HSP.

Returns: Float (0.001 or 1.3e-43). Returns P-value if it is defined, otherwise, Expect value.

Argument: n/a

Throws: n/a

Comments: provided for consistency with BlastHit::signif(). Support for returning the significance data in different formats (e.g., exponent only), is not provided for HSP objects. This is only available for the BlastHit or Blast object.

See Also: "p", "expect", Bio::Search::Hit::BlastHit::signif()

✨ evalue

Usage: $hsp_obj->evalue()

Purpose: Get the Expect value for the HSP.

Returns: Float (0.001 or 1.3e-43)

Argument: n/a

Throws: n/a

Comments: support for returning the expectation data in different formats (e.g., exponent only), is not provided for HSP objects. This is only available for the BlastHit or Blast object.

See Also: "p"

πŸŽ€ p

Usage: $hsp_obj->p()

Purpose: Get the P-value for the HSP.

Returns: Float (0.001 or 1.3e-43) or undef if not defined.

Argument: n/a

Throws: n/a

Comments: P-value is not defined with NCBI Blast2 reports. Support for returning the expectation data in different formats (e.g., exponent only) is not provided for HSP objects. This is only available for the BlastHit or Blast object.

See Also: "expect"

🌸 length

Usage: $hsp->length( [seq_type] )

Purpose: Get the length of the aligned portion of the query or sbjct.

Example: $hsp->length('query')

Returns: integer

Argument: seq_type: 'query' | 'hit' or 'sbjct' | 'total' (default = 'total') ('sbjct' is synonymous with 'hit')

Throws: n/a

Comments: 'total' length is the full length of the alignment as reported in the denominators in the alignment section: "Identical = 34/120 Positives = 67/120".

See Also: "gaps"

🧚 gaps

Usage: $hsp->gaps( [seq_type] )

Purpose: Get the number of gap characters in the query, sbjct, or total alignment. Also can return query gap chars and sbjct gap chars as a two-element list when in array context.

Example:

$total_gaps      = $hsp->gaps();
($qgaps, $sgaps) = $hsp->gaps();
$qgaps           = $hsp->gaps('query');

Returns: scalar context: integer; array context without args: (int, int) = ('queryGaps', 'sbjctGaps')

Argument: seq_type: 'query' or 'hit' or 'sbjct' or 'total' ('sbjct' is synonymous with 'hit') (default = 'total', scalar context). Array context can be "induced" by providing an argument of 'list' or 'array'.

Throws: n/a

See Also: "length", "matches"

πŸ’œ frac_identical

Usage: $hsp_object->frac_identical( [seq_type] );

Purpose: Get the fraction of identical positions within the given HSP.

Example: $frac_iden = $hsp_object->frac_identical('query');

Returns: Float (2-decimal precision, e.g., 0.75).

Argument: seq_type: 'query' or 'hit' or 'sbjct' or 'total' ('sbjct' is synonymous with 'hit') default = 'total' (but see comments below).

Throws: n/a

Comments: different versions of Blast report different values for the total length of the alignment. This is the number reported in the denominators in the stats section: "Identical = 34/120 Positives = 67/120". NCBI-BLAST uses the total length of the alignment (with gaps). WU-BLAST uses the length of the query sequence (without gaps). Therefore, when called without an argument or an argument of 'total', this method will report different values depending on the version of BLAST used.

to get the fraction identical among only the aligned residues, ignoring the gaps, call this method with an argument of 'query' or 'sbjct' ('sbjct' is synonymous with 'hit').

See Also: "frac_conserved", "num_identical", "matches"

πŸ’… frac_conserved

  • Usage β€” $hsp_object->frac_conserved( [seq_type] );
  • Purpose β€” hands you the fraction of conserved positions inside the HSP you're looking at. Lowkey important note: what the Blast report calls "positives" is exactly what this method calls "conservative" positions. Same thing, different name, slay.
  • Example β€” $frac_cons = $hsp_object->frac_conserved('query');
  • Returns β€” a Float, 2-decimal precision, like 0.75.
  • Argument β€” seq_type: 'query' or 'hit' or 'sbjct' or 'total' ('sbjct' is synonymous with 'hit'). Default = 'total' (but please read the comments below, bestie, this one's spicy).
  • Throws β€” n/a
  • Comments β€” okay so different versions of Blast report different values for the total length of the alignment. This is the number that shows up in the denominators in the stats section, like:
"Identical = 34/120 Positives = 67/120"

NCBI-BLAST uses the total length of the alignment (with gaps). WU-BLAST uses the length of the query sequence (without gaps). So when you call this with no argument, or with an argument of 'total', the method will straight-up report different values depending on which version of BLAST you used. No cap, that's just how it is.

To get the fraction conserved among only the aligned residues β€” ignoring the gaps β€” call this method with an argument of 'query' or 'sbjct'.

  • See Also β€” "frac_conserved", "num_conserved", "matches"

πŸ¦‹ query_string

  • Title β€” query_string
  • Usage β€” my $qseq = $hsp->query_string;
  • Function β€” retrieves the query sequence of this HSP as a string. Giving main character data.
  • 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. Matching energy.
  • 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 that string of symbols sitting in between the query and hit sequences in the alignment, and it tells you the degree of conservation (e.g., identical, similar, not similar). It's the vibe check between your two sequences, basically.
  • Returns β€” string
  • Args β€” none

πŸ‘‘ expect

See Bio::Search::HSP::HSPI::expect()


⭐ rank

  • Usage β€” $hsp->rank( [string] );
  • Purpose β€” get the rank of the HSP within a given Blast hit.
  • Example β€” $rank = $hsp->rank;
  • Returns β€” an Integer (1..n) corresponding to the order in which the HSP appears in the BLAST report.

πŸŽ€ to_string

  • Title β€” to_string
  • Usage β€” print $hsp->to_string;
  • Function β€” returns a string representation for the Blast HSP. Primarily intended for debugging purposes, iykyk.
  • Example β€” see usage
  • Returns β€” a string of the form:
[PsiBlastHSP] <rank>

e.g.:

[BlastHit] 1
  • Args β€” None

πŸ’€ _set_data

  • Usage β€” called automatically during object construction.
  • Purpose β€” parses the raw HSP section from a flat BLAST report and sets the query sequence, the sbjct sequence, and the "match" data, which is all the symbols between the query and sbjct lines in the alignment.
  • Argument β€” Array (all lines for a single, complete HSP, from a raw, flat (i.e., non-XML) BLAST report)
  • Throws β€” propagates any exceptions from the methods called ("See Also")
  • See Also β€” "_set_seq", "_set_score_stats", "_set_match_stats"

🧚 _set_score_stats

  • Usage β€” called automatically by _set_data()
  • Purpose β€” sets various score statistics obtained from the HSP listing.
  • Argument β€” String with any of the following formats:
blast2:  Score = 30.1 bits (66), Expect = 9.2
blast2:  Score = 158.2 bits (544), Expect(2) = e-110
blast1:  Score = 410 (144.3 bits), Expect = 1.7e-40, P = 1.7e-40
blast1:  Score = 55 (19.4 bits), Expect = 5.3, Sum P(3) = 0.99
  • Throws β€” Exception if the stats cannot be parsed, probably due to a change in the Blast report format. 😭
  • See Also β€” "_set_data"

πŸ”₯ _set_match_stats

  • Usage β€” private method; called automatically by _set_data()
  • Purpose β€” sets various matching statistics obtained from the HSP listing.
  • Argument β€”
blast2: Identities = 23/74 (31%), Positives = 29/74 (39%), Gaps = 17/74 (22%)
blast2: Identities = 57/98 (58%), Positives = 74/98 (75%)
blast1: Identities = 87/204 (42%), Positives = 126/204 (61%)
blast1: Identities = 87/204 (42%), Positives = 126/204 (61%), Frame = -3
WU-blast: Identities = 310/553 (56%), Positives = 310/553 (56%), Strand = Minus / Plus
  • Throws β€” Exception if the stats cannot be parsed, probably due to a change in the Blast report format.
  • Comments β€” so the "Gaps = " data in the HSP header means different things depending on the type of Blast, and this is the tea: for BLASTP, this number is the total number of gaps in query+sbjct; for TBLASTN, it is the number of gaps in the query sequence only. Which means it's safer to collect the data separately by examining the actual sequence strings, exactly like _set_seq() does.
  • See Also β€” "_set_data", "_set_seq"

πŸ“ _set_seq_data

  • Usage β€” called automatically when sequence data is requested.
  • Purpose β€” sets the HSP sequence data for both query and sbjct sequences. Includes: start, stop, length, gaps, and raw sequence.
  • Argument β€” n/a
  • Throws β€” propagates any exception thrown by _set_match_seq()
  • Comments β€” uses raw data stored by _set_data() during object construction. These data are not always needed, so it's conditionally executed only upon demand by methods such as gaps(), _set_residues(), etc. _set_seq() does the dirty work. πŸ’…
  • See Also β€” "_set_seq"

🫢 _set_seq

  • Usage β€” called automatically by _set_seq_data()
$hsp_obj->($seq_type, @data);
  • Purpose β€” sets sequence information for both the query and sbjct sequences. Directly counts the number of gaps in each sequence (if gapped Blast).
  • Argument β€” $seq_type = 'query' or 'sbjct'; @data = all seq lines with the form:
Query: 61  SPHNVKDRKEQNGSINNAISPTATANTSGSQQINIDSALRDRSSNVAAQPSLSDASSGSN 120
  • Throws β€” Exception if data strings cannot be parsed, probably due to a change in the Blast report format.
  • Comments β€” uses the first argument to determine which data members to set, which makes this method sensitive to data member name changes. Behavior is dependent on the type of BLAST analysis (TBLASTN, BLASTP, etc).
  • Warning β€” Sequence endpoints are normalized so that start < end. This affects HSPs for TBLASTN/X hits on the minus strand. Normalization facilitates use of range information by methods such as match().
  • See Also β€” "_set_seq_data", "matches", "range", "start", "end"

πŸ’œ _set_residues

  • Usage β€” called automatically when residue data is requested.
  • Purpose β€” sets the residue numbers representing the identical and conserved positions. These data are obtained by analyzing the symbols between query and sbjct lines of the alignments.
  • Argument β€” n/a
  • Throws β€” propagates any exception thrown by _set_seq_data() and _set_match_seq().
  • Comments β€” these data are not always needed, so it's conditionally executed only upon demand by methods such as seq_inds(). Behavior is dependent on the type of BLAST analysis (TBLASTN, BLASTP, etc).
  • See Also β€” "_set_seq_data", "_set_match_seq", "seq_inds"

🌈 _set_match_seq

  • Usage β€” $hsp_obj->_set_match_seq()
  • Purpose β€” set the 'match' sequence for the current HSP (symbols in between the query and sbjct lines.)
  • Returns β€” Array reference holding the match sequences lines.
  • Argument β€” n/a
  • Throws β€” Exception if the _matchList field is not set.
  • Comments β€” the match information is not always necessary. This method allows it to be conditionally prepared. Called by _set_residues>() and seq_str().
  • See Also β€” "_set_residues", "seq_str"

πŸŽ€ 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 the P/Expect value, like P(3) = 1.2e-30 which means (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, use Bio::Search::Hit::BlastHit::num_hsps().
  • See Also β€” Bio::SeqFeature::SimilarityPair::score()

πŸ‘‘ matches

  • Usage β€” $hsp->matches([seq_type], [start], [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.) It's giving precision.
  • Example β€”
($id,$cons) = $hsp_object->matches('hit');
($id,$cons) = $hsp_object->matches('query',300,400);
  • Returns β€” 2-element array of integers
  • Argument β€”
  1. seq_type = 'query' or 'hit' or 'sbjct' (default = query) ('sbjct' is synonymous with 'hit')
  2. start = Starting coordinate (optional)
  3. 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()

πŸ’– num_identical

  • Usage β€” $hsp_object->num_identical();
  • Purpose β€” get the number of identical positions within the given HSP.
  • Example β€” $num_iden = $hsp_object->num_identical();
  • Returns β€” integer
  • Argument β€” n/a
  • Throws β€” n/a
  • See Also β€” "num_conserved", "frac_identical"

✨ num_conserved

  • Usage β€” $hsp_object->num_conserved();
  • Purpose β€” get the number of conserved positions within the given HSP.
  • Example β€” $num_iden = $hsp_object->num_conserved();
  • Returns β€” integer
  • Argument β€” n/a
  • Throws β€” n/a
  • See Also β€” "num_identical", "frac_conserved"

πŸ’« range πŸ’«

  • Usage β€” $hsp->range( [seq_type] );
  • Purpose β€” hands you the (start, end) coordinates for the query or the sbjct sequence in the HSP alignment. both ends, one call, slay.
  • 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

See Also β€” "start", "end"


🌸 start 🌸

  • Usage β€” $hsp->start( [seq_type] );
  • Purpose β€” grabs the start coordinate for the query, the sbjct, or both of them in the HSP alignment.
    • NOTE: Start will always be less than end.
    • To figure out the strand, use $hsp->strand()
  • Example β€”
$query_beg = $hsp->start('query');
$hit_beg = $hsp->start('hit');
($query_beg, $hit_beg) = $hsp->start();
  • Returns β€” scalar context: integer. array context without args: list of two integers
  • Argument β€” In scalar context: seq_type = 'query' or 'hit' or 'sbjct' (default = 'query'). ('sbjct' is synonymous with 'hit') Array context can be "induced" by providing an argument of 'list' or 'array'.
  • Throws β€” n/a

See Also β€” "end", "range"


πŸŽ€ end πŸŽ€

  • Usage β€” $hsp->end( [seq_type] );
  • Purpose β€” same energy as start but for the end coordinate β€” query, sbjct, or both, in the HSP alignment.
    • NOTE: Start will always be less than end.
    • To figure out the strand, use $hsp->strand()
  • Example β€”
$query_end = $hsp->end('query');
$hit_end = $hsp->end('hit');
($query_end, $hit_end) = $hsp->end();
  • Returns β€” scalar context: integer. array context without args: list of two integers
  • Argument β€” In scalar context: seq_type = 'query' or 'hit' or 'sbjct' (default = 'query'). ('sbjct' is synonymous with 'hit') Array context can be "induced" by providing an argument of 'list' or 'array'.
  • Throws β€” n/a

See Also β€” "start", "range", "strand"


πŸ¦‹ strand πŸ¦‹

  • Usage β€” $hsp_object->strand( [seq_type] )
  • Purpose β€” get the strand of the query or the sbjct sequence.
  • Example β€”
print $hsp->strand('query');
($query_strand, $hit_strand) = $hsp->strand();
  • Returns β€” -1, 0, or 1
    • -1 = Minus strand, +1 = Plus strand
    • Returns 0 if strand is not defined, which occurs for BLASTP reports, and the query of TBLASTN as well as the hit if BLASTX reports.
    • In scalar context without arguments, returns queryStrand value.
    • In array context without arguments, returns a two-element list of strings (queryStrand, sbjctStrand).
    • Array context can be "induced" by providing an argument of 'list' or 'array'.
  • Argument β€” seq_type: 'query' or 'hit' or 'sbjct' or undef ('sbjct' is synonymous with 'hit')
  • Throws β€” n/a

See Also β€” "_set_seq", "_set_match_stats"


πŸ’… seq πŸ’…

  • Usage β€” $hsp->seq( [seq_type] );
  • Purpose β€” get the query or sbjct sequence as a Bio::Seq.pm object.
  • Example β€” $seqObj = $hsp->seq('query');
  • Returns β€” Object reference for a Bio::Seq.pm object.
  • Argument β€” seq_type = 'query' or 'hit' or 'sbjct' (default = 'query'). ('sbjct' is synonymous with 'hit')
  • Throws β€” Propagates any exception that occurs during construction of the Bio::Seq.pm object.
  • 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 ✨

  • 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')
  • Throws β€” Exception if the argument does not match an accepted seq_type.
  • Comments β€” Calls _set_seq_data() to set the 'match' sequence if it has not been set already.

See Also β€” "seq", "seq_inds", "_set_match_seq"


🌈 seq_inds 🌈

  • Usage β€” $hsp->seq_inds( seq_type, class, collapse );
  • 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 collapse is true.
  • Argument β€”
    • seq_type = 'query' or 'hit' or 'sbjct' (default = query) ('sbjct' is synonymous with 'hit')
    • class = 'identical' or 'conserved' (default = identical) (can be shortened to 'id' or 'cons') (actually, anything not 'id' will evaluate to 'conserved').
    • 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 β€” Calls _set_residues() to set the 'match' sequence if it has not been set already.

See Also β€” "seq", "_set_residues", Bio::Search::BlastUtils::collapse_nums(), Bio::Search::Hit::BlastHit::seq_inds()


πŸ‘‘ get_aln πŸ‘‘

  • Usage β€” $hsp->get_aln()
  • Purpose β€” get a Bio::SimpleAlign object constructed from the query + sbjct sequences of the present HSP object.
  • Example β€” $aln_obj = $hsp->get_aln();
  • Returns β€” Object reference for a Bio::SimpleAlign.pm object.
  • Argument β€” n/a.
  • Throws β€” Propagates any exception that occurs during the construction of the Bio::SimpleAlign object.
  • Comments β€”
    • Requires Bio::SimpleAlign.
    • The Bio::SimpleAlign object is constructed from the query + sbjct sequence objects obtained by calling seq().
    • Gap residues are included (see $GAP_SYMBOL).

See Also β€” "seq", Bio::SimpleAlign


πŸ› οΈ FOR DEVELOPERS ONLY πŸ› οΈ

🌟 Data Members 🌟

Info about the various data members of this module, for anyone who wants to modify or understand the code. Two things to keep in mind, bestie:

  1. Do NOT rely on these in any code outside of this module. All data members are prefixed with an underscore to signify that they are private. Always use accessor methods. If the accessor doesn't exist or is inadequate, create or modify an accessor (and let me know, too!).
  2. This documentation may be incomplete and out of date. It is easy for these data member descriptions to become obsolete as this module is still evolving. Always double check this info and search for members not described here.

An instance of Bio::Search::HSP::PsiBlastHSP.pm is a blessed reference to a hash containing all or some of the following fields:

FIELD           VALUE
--------------------------------------------------------------
(member names are mostly self-explanatory)
  • _score :
  • _bits :
  • _p :
  • _n : Integer. The 'N' value listed in parenthesis with P/Expect value: e.g., P(3) = 1.2e-30 ---> (N = 3). Not defined in NCBI Blast2 with gaps. To obtain the number of HSPs, use Bio::Search::Hit::BlastHit::num_hsps().
  • _expect :
  • _queryLength :
  • _queryGaps :
  • _queryStart :
  • _queryStop :
  • _querySeq :
  • _sbjctLength :
  • _sbjctGaps :
  • _sbjctStart :
  • _sbjctStop :
  • _sbjctSeq :
  • _matchSeq : String. Contains the symbols between the query and sbjct lines which indicate identical (letter) and conserved ('+') matches or a mismatch (' ').
  • _numIdentical :
  • _numConserved :
  • _identicalRes_query :
  • _identicalRes_sbjct :
  • _conservedRes_query :
  • _conservedRes_sbjct :
  • _match_indent : The number of leading space characters on each line containing the match symbols. _match_indent is 13 in this example:
  Query:   285 QNSAPWGLARISHRERLNLGSFNKYLYDDDAG
               Q +APWGLARIS       G+ + Y YD+ AG
  ^^^^^^^^^^^^^

and that's a wrap on the whole page, bestie!! 🫢 this lil masterpiece is from perl v5.32.1, dated 2021-08-15, and it lives in the User Contributed Perl Documentation under the name Bio::S...lastHSP(3pm). go forth and slay πŸ’–βœ¨

πŸ“¦ where this page comes from