Bio::S...astHSP(3pm)
๐ Bio::Search::HSP::BlastHSP ๐
okay bestie, welcome to the User Contributed Perl Documentation corner of the terminal, because today we're getting into Bio::Search::HSP::BlastHSP โ the Bioperl BLAST High-Scoring Pair object. yes it's a mouthful, no we are not scared of it. ๐งฌโจ
โจ NAME โจ
Bio::Search::HSP::BlastHSP โ the Bioperl BLAST High-Scoring Pair object. that's the whole vibe. that's her. ๐
๐ฆ SYNOPSIS ๐ฆ
literally just go look at Bio::Search::Hit::BlastHit. that's it, that's the synopsis, no notes. ๐
๐ธ DESCRIPTION ๐ธ
so a Bio::Search::HSP::BlastHSP object gives you an interface to the data you get from one single alignment section of a Blast report. that section is what everyone calls a "High-scoring Segment Pair". and honestly? it's basically a pairwise alignment but with score info attached. that's the whole girl. ๐
you don't just grab these out of thin air โ BlastHSP objects are accessed through Bio::Search::Hit::BlastHit objects, and only after you've parsed a BLAST report using the Bio::SearchIO system.
the construction of BlastHSP objects is handled by Bio::Factory::BlastHitFactory, and that whole process is orchestrated by the Blast parser, Bio::SearchIO::psiblast. the resulting BlastHSPs are then accessed via Bio::Search::Hit::BlastHit. so bestie, the takeaway is: you do not need to use Bio::Search::HSP::BlastHSP directly. if you really must construct BlastHSPs yourself, go read the new() function for the details.
want Bio::SearchIO BLAST parsing usage examples? they're living in the examples/searchio directory of the Bioperl distribution. go look, it's giving tutorial energy. ๐
๐ Start and End coordinates ๐
okay important one. sequence endpoints get swapped so that start is always less than end. this affects TBLASTN/X hits on the minus strand. you can get your strand info back using the strand() method. this normalization step is standard Bioperl practice, and it also makes range stuff way easier for methods like match(). iykyk. ๐
- Supports BLAST versions 1.x and 2.x, gapped and ungapped.
Bio::Search::HSP::BlastHSP.pm can also extract a list of all residue indices for identical and conservative matches along both query and sbjct sequences. but because that level of detail isn't always needed, this does not happen while the BlastHSP object is being constructed. these data get collected automatically, as necessary, as the BlastHSP.pm object is used. lazy parsing but make it cute. ๐
๐ DEPENDENCIES ๐
Bio::Search::HSP::BlastHSP.pm is a concrete class that inherits from Bio::SeqFeature::SimilarityPair and Bio::Search::HSP::HSPI. Bio::Seq and Bio::SimpleAlign get employed for creating sequence and alignment objects, respectively. they're the supporting cast and they ate. ๐ซถ
๐ง Relationship to SimpleAlign.pm & Seq.pm ๐ง
BlastHSP.pm can hand you the query or sbjct sequence as a Bio::Seq object via the seq() method. it can also create a two-sequence Bio::SimpleAlign alignment object out of the query and sbjct sequences via the get_aln() method. but heads up โ creating alignment objects does not happen automatically when you construct the BlastHSP.pm object, because this level of functionality isn't always required, and doing it anyway would generate a lot of extra overhead when you're crunching many reports. no wasted effort in this house. ๐
๐ฌ FEEDBACK ๐ฌ
๐ Mailing Lists ๐
user feedback is an integral part of the evolution of this and other Bioperl modules. so 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://bio.perl.org/wiki/Mailing_lists - About the mailing lists
(psst โ the address is bioperl-l@bioperl.org and the mailing-list page is at http://bioperl.org/wiki/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. there are many experienced and responsive experts who'll be able to look at the problem and quickly address it. and bestie, please include a thorough description of the problem with code and data examples if at all possible. we love context. we live for context. ๐
๐ 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 <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. and the author would also like to acknowledge their colleagues at Affymetrix for useful feedback. iconic behavior, honestly. ๐
๐ SEE ALSO ๐
Bio::Search::Hit::BlastHit.pm - Blast hit object.
Bio::Search::Result::BlastResult.pm - Blast Result object.
Bio::Seq.pm - Biosequence object
๐ Links: ๐
http://bio.perl.org/ - Bioperl Project Homepage
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
Copyright (c) 1996-2001 Steve Chervitz. All Rights Reserved.
โ ๏ธ DISCLAIMER โ ๏ธ
This software is provided "as is" without warranty of any kind. fr fr. use it, love it, but don't come for anybody if it breaks. ๐
๐ APPENDIX ๐
the rest of the documentation details each of the object methods. internal methods are usually preceded with a _. you know the drill. ๐
๐ new
- Usage โ
$hsp = Bio::Search::HSP::BlastHSP->new( %named_params );and also:Bio::Search::HSP::BlastHSPobjects are constructed automatically byBio::SearchIO::BlastHitFactory, so there is no need for direct instantiation. like, don't do it manually unless you have a reason. - Purpose โ constructs a new BlastHSP object and initializes key variables for the HSP.
- Returns โ a
Bio::Search::HSP::BlastHSPobject. - 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). also note that there's a fair amount of basic parsing 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
undefif 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"
okay bestie that's the whole first chunk ๐ more parts are coming, so don't go anywhere โ we're not done yet. ๐
frac_conserved
- Usage โ
$hsp_object->frac_conserved( [seq_type] ); - Purpose โ bestie, this one hands you the fraction of conserved positions inside the given HSP. Tiny heads-up that lives rent-free in my brain: what this calls "conservative" positions, the Blast report calls "positives". Same vibe, different label, iykyk ๐
- Example โ
$frac_cons = $hsp_object->frac_conserved('query'); - Returns โ a Float, 2-decimal precision, e.g.
0.75โจ - Argument โ
seq_type:'query'or'hit'or'sbjct'or'total', where'sbjct'is synonymous with'hit'. Default ='total'โ but pls actually read the comments below, fr fr. - Throws โ n/a
- Comments โ okay so here's the tea โ Different versions of Blast report different values for the total length of the alignment. It's the number sitting 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).
- So when you call this with no argument, or with an argument of
'total', the value you get back depends on which version of BLAST you're on. Not a bug, just the situation. - Want the fraction conserved among only the aligned residues, ignoring the gaps? Call this method with an argument of
'query'or'sbjct'. Slay ๐
- 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 ๐ฆ
- 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). It's giving middle child energy, but make it scientific ๐ง
- Returns โ string
- Args โ none
expect
See Bio::Search::HSP::HSPI::expect() ๐ that's genuinely the whole entry, she's delegating and honestly? respect.
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. Like a little lineup and she knows her place in it ๐
to_string
- Title โ
to_string - Usage โ
print $hsp->to_string; - Function โ returns a string representation for the Blast HSP. Primarily intended for debugging purposes (so, bestie, this is a vibe check for your own eyeballs, not a parser ๐ฅ).
- Example โ see usage
- Returns โ A string of the form:
[BlastHSP] <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, sbjct sequence, and the
"match"data, which consists of 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. (Rude of the format to switch up on you, but here we are ๐)
- 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 โ the
"Gaps = "data in the HSP header has a different meaning depending on the type of Blast: 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. Thus, it is safer to collect the data separately by examining the actual sequence strings as is done in_set_seq(). So like, don't trust that one number to mean the same thing everywhere, bestie ๐ซถ - 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 is conditionally executed only upon demand by methods such asgaps(),_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 first argument to determine which data members to set, making this method sensitive 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 asmatch(). Iconic behavior honestly, but be aware of it ๐ - 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 is 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
_matchListfield is not set. ๐ - Comments โ the match information is not always necessary. This method allows it to be conditionally prepared. Called by
_set_residues>()andseq_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 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::BlastHit::num_hsps(). So like, usually the same number, sometimes not โ vibe check before you assume ๐ธ - 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.) Obsessed with a method that does both ๐ - Example โ
($id,$cons) = $hsp_object->matches('hit');
($id,$cons) = $hsp_object->matches('query',300,400);
- Returns โ 2-element array of integers
- Argument โ three things, in order:
seq_type='query'or'hit'or'sbjct'(default = query) โ and'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()
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: grabs the
(start, end)coordinates for whichever sequence โ query or sbjct โ inside the HSP alignment. bestie it's giving coordinates, periodt. - Example:
($query_beg, $query_end) = $hsp->range('query');
($hit_beg, $hit_end) = $hsp->range('hit');
- Returns: a two-element array of integers ๐ซ
- Argument:
seq_type= string,'query'or'hit'or'sbjct'(default ='query')- (
'sbjct'is synonymous with'hit', iykyk)
- (
- Throws: n/a
See Also: "start", "end"
โจ start
- Usage:
$hsp->start( [seq_type] );
- Purpose: gets the start coordinate for the query, sbjct, or both sequences in the HSP alignment.
- NOTE: Start will always be less than end. no cap.
- To figure out strand, use
$hsp->strand()instead ๐
- 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: gets the end coordinate for the query, sbjct, or both sequences in the HSP alignment.
- NOTE: Start will always be less than end. yes again, it's that serious.
- To determine 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 sbjct sequence.
- Example:
print $hsp->strand('query');
($query_strand, $hit_strand) = $hsp->strand();
- Returns:
-1,0, or1-1= Minus strand,+1= Plus strand- Returns
0if 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 the
queryStrandvalue. - 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'orundef- (
'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.pmobject. it's giving object-oriented ๐ - 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')
- (
- 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
- 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. obsessed honestly. - 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
collapseis true.
- May include ranges if
- 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'. the way that just... works ๐)
- (can be shortened to
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::SimpleAlignobject constructed from the query + sbjct sequences of the present HSP object. main character alignment energy โจ - Example:
$aln_obj = $hsp->get_aln();
- Returns: Object reference for a
Bio::SimpleAlign.pmobject. - Argument: n/a.
- Throws: Propagates any exception ocurring during the construction of the
Bio::SimpleAlignobject. - Comments: Requires
Bio::SimpleAlign.- The
Bio::SimpleAlignobject is constructed from the query + sbjct sequence objects obtained by callingseq(). - Gap residues are included (see
$GAP_SYMBOL).
- The
See Also: "seq", Bio::SimpleAlign
๐ FOR DEVELOPERS ONLY
๐งฌ Data Members
Info about the various data members of this module is provided for those wishing to modify or understand the code. Two things to bear in mind, bestie:
- 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!). ๐
- 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. fr fr.
An instance of Bio::Search::HSP::BlastHSP.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, useBio::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_indentis 13 in this example:
Query: 285 QNSAPWGLARISHRERLNLGSFNKYLYDDDAG
Q +APWGLARIS G+ + Y YD+ AG
^^^^^^^^^^^^^
and that's a wrap on the whole page, bestie ๐ this one came from perl v5.32.1 and was dated 2021-08-15, living under the name Bio::S...astHSP(3pm). go forth and parse those HSPs, you absolute icon ๐๐
๐ฆ 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