.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Search::Hit::ModelHit 3pm" .TH Bio::Search::Hit::ModelHit 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Search::Hit::ModelHit \- A model\-based implementation of the Bio::Search::Hit::HitI interface .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Bio::Search::Hit::ModelHit; \& my $hit = Bio::Search::Hit::ModelHit\->new(\-algorithm => \*(Aqrnamotif\*(Aq); \& \& # typically one gets HitI objects from a SearchIO stream via a ResultI \& use Bio::SearchIO; \& my $parser = Bio::SearchIO\->new(\-format => \*(Aqinfernal\*(Aq, \-file => \*(Aqtrap.inf\*(Aq); \& \& my $result = $parser\->next_result; \& my $hit = $result\->next_hit; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object handles the hit data from a database search using models or descriptors instead of sequences, such as Infernal, \s-1HMMER,\s0 RNAMotif, etc. .PP Unless you're writing a parser, you won't ever need to create a ModelHit or any other HitI-implementing object. If you use the SearchIO system, HitI objects are created automatically from a SearchIO stream which returns Bio::Search::Hit::HitI objects. .PP Note that several HitI-based methods have been overridden from ModelHit due to their unreliability when dealing with queries that aren't sequence-based. It may be possible to reimplement these at a later point, but for the time being they will throw warnings and return w/o results. .PP For documentation on what you can do with ModelHit (and other HitI objects), please see the \s-1API\s0 documentation in Bio::Search::Hit::HitI. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Chris Fields" .IX Header "AUTHOR - Chris Fields" Email cjfields at bioperl dot org .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SH "HitI methods implemented in parent class Bio::Search::Hit::ModelHit" .IX Header "HitI methods implemented in parent class Bio::Search::Hit::ModelHit" .SS "new" .IX Subsection "new" .Vb 10 \& Title : new \& Usage : my $obj = Bio::Search::Hit::ModelHit\->new(); \& Function: Builds a new Bio::Search::Hit::ModelHit object \& Returns : Bio::Search::Hit::ModelHit \& Args : \-name => Name of Hit (required) \& \-description => Description (optional) \& \-accession => Accession number (optional) \& \-ncbi_gi => NCBI GI UID (optional) \& \-length => Length of the Hit (optional) \& \-score => Raw Score for the Hit (optional) \& \-bits => Bit Score for the Hit (optional) \& \-significance => Significance value for the Hit (optional) \& \-algorithm => Algorithm used (BLASTP, FASTX, etc...) \& \-hsps => Array ref of HSPs for this Hit. \& \-found_again => boolean, true if hit appears in a \& "previously found" section of a PSI\-Blast report. \& \-hsp_factory => Bio::Factory::ObjectFactoryI able to create HSPI \& objects. .Ve .SS "add_hsp" .IX Subsection "add_hsp" .Vb 6 \& Title : add_hsp \& Usage : $hit\->add_hsp($hsp) \& Function: Add a HSP to the collection of HSPs for a Hit \& Returns : number of HSPs in the Hit \& Args : Bio::Search::HSP::HSPI object, OR hash ref containing data suitable \& for creating a HSPI object (&hsp_factory must be set to get it back) .Ve .SS "hsp_factory" .IX Subsection "hsp_factory" .Vb 5 \& Title : hsp_factory \& Usage : $hit\->hsp_factory($hsp_factory) \& Function: Get/set the factory used to build HSPI objects if necessary. \& Returns : Bio::Factory::ObjectFactoryI \& Args : Bio::Factory::ObjectFactoryI .Ve .SS "Bio::Search::Hit::HitI methods" .IX Subsection "Bio::Search::Hit::HitI methods" Implementation of Bio::Search::Hit::HitI methods .SS "name" .IX Subsection "name" .Vb 5 \& Title : name \& Usage : $hit_name = $hit\->name(); \& Function: returns the name of the Hit sequence \& Returns : a scalar string \& Args : [optional] scalar string to set the name .Ve .SS "accession" .IX Subsection "accession" .Vb 5 \& Title : accession \& Usage : $acc = $hit\->accession(); \& Function: Retrieve the accession (if available) for the hit \& Returns : a scalar string (empty string if not set) \& Args : none .Ve .SS "description" .IX Subsection "description" .Vb 5 \& Title : description \& Usage : $desc = $hit\->description(); \& Function: Retrieve the description for the hit \& Returns : a scalar string \& Args : [optional] scalar string to set the description .Ve .SS "length" .IX Subsection "length" .Vb 5 \& Title : length \& Usage : my $len = $hit\->length \& Function: Returns the length of the hit \& Returns : integer \& Args : [optional] integer to set the length .Ve .SS "algorithm" .IX Subsection "algorithm" .Vb 9 \& Title : algorithm \& Usage : $alg = $hit\->algorithm(); \& Function: Gets the algorithm specification that was used to obtain the hit \& 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 : [optional] scalar string to set the algorithm .Ve .SS "raw_score" .IX Subsection "raw_score" .Vb 7 \& Title : raw_score \& Usage : $score = $hit\->raw_score(); \& Function: Gets the "raw score" generated by the algorithm. What \& this score is exactly will vary from algorithm to algorithm, \& returning undef if unavailable. \& Returns : a scalar value \& Args : [optional] scalar value to set the raw score .Ve .SS "score" .IX Subsection "score" Equivalent to \fBraw_score()\fR .SS "significance" .IX Subsection "significance" .Vb 8 \& Title : significance \& Usage : $significance = $hit\->significance(); \& Function: Used to obtain the E or P value of a hit, i.e. the probability that \& this particular hit was obtained purely by random chance. If \& information is not available (nor calculatable from other \& information sources), return undef. \& Returns : a scalar value or undef if unavailable \& Args : [optional] scalar value to set the significance .Ve .SS "bits" .IX Subsection "bits" .Vb 6 \& Usage : $hit_object\->bits(); \& Purpose : Gets the bit score of the best HSP for the current hit. \& Example : $bits = $hit_object\->bits(); \& Returns : Integer or undef if bit score is not set \& Argument : n/a \& Comments : For BLAST1, the non\-bit score is listed in the summary line. .Ve .PP See Also : \fBscore()\fR .SS "next_hsp" .IX Subsection "next_hsp" .Vb 6 \& Title : next_hsp \& Usage : while( $hsp = $obj\->next_hsp()) { ... } \& Function : Returns the next available High Scoring Pair \& Example : \& Returns : Bio::Search::HSP::HSPI object or null if finished \& Args : none .Ve .SS "hsps" .IX Subsection "hsps" .Vb 10 \& Usage : $hit_object\->hsps(); \& Purpose : Get a list containing all HSP objects. \& : Get the numbers of HSPs for the current hit. \& Example : @hsps = $hit_object\->hsps(); \& : $num = $hit_object\->hsps(); # alternatively, use num_hsps() \& Returns : Array context : list of Bio::Search::HSP::BlastHSP.pm objects. \& : Scalar context: integer (number of HSPs). \& : (Equivalent to num_hsps()). \& Argument : n/a. Relies on wantarray \& Throws : Exception if the HSPs have not been collected. .Ve .PP See Also : \fBhsp()\fR, \fBnum_hsps()\fR .SS "num_hsps" .IX Subsection "num_hsps" .Vb 5 \& Usage : $hit_object\->num_hsps(); \& Purpose : Get the number of HSPs for the present hit. \& Example : $nhsps = $hit_object\->num_hsps(); \& Returns : Integer or \*(Aq\-\*(Aq if HSPs have not been callected \& Argument : n/a .Ve .PP See Also : \fBhsps()\fR .SS "rewind" .IX Subsection "rewind" .Vb 6 \& Title : rewind \& Usage : $hit\->rewind; \& Function: Allow one to reset the HSP iterator to the beginning \& Since this is an in\-memory implementation \& Returns : none \& Args : none .Ve .SS "ambiguous_aln" .IX Subsection "ambiguous_aln" .Vb 10 \& Usage : $ambig_code = $hit_object\->ambiguous_aln(); \& Purpose : Sets/Gets ambiguity code data member. \& Example : (see usage) \& Returns : String = \*(Aqq\*(Aq, \*(Aqs\*(Aq, \*(Aqqs\*(Aq, \*(Aq\-\*(Aq \& : \*(Aqq\*(Aq = query sequence contains overlapping sub\-sequences \& : while sbjct does not. \& : \*(Aqs\*(Aq = sbjct sequence contains overlapping sub\-sequences \& : while query does not. \& : \*(Aqqs\*(Aq = query and sbjct sequence contains overlapping sub\-sequences \& : relative to each other. \& : \*(Aq\-\*(Aq = query and sbjct sequence do not contains multiple domains \& : relative to each other OR both contain the same distribution \& : of similar domains. \& Argument : n/a \& Throws : n/a \& Comment : Note: "sbjct" is synonymous with "hit" .Ve .SS "overlap" .IX Subsection "overlap" See documentation in \fBBio::Search::Hit::HitI::overlap()\fR .SS "n" .IX Subsection "n" .Vb 10 \& Usage : $hit_object\->n(); \& Purpose : Gets the N number for the current hit. \& : This is the number of HSPs in the set which was ascribed \& : the lowest P\-value (listed on the description line). \& : This number is not the same as the total number of HSPs. \& : To get the total number of HSPs, use num_hsps(). \& Example : $n = $hit_object\->n(); \& Returns : Integer \& Argument : n/a \& Throws : Exception if HSPs have not been set. \& Comments : Calling n() on such reports will result in a call to num_hsps(). \& : The num_hsps() method will count the actual number of \& : HSPs in the alignment listing, which may exceed N in \& : some cases. .Ve .PP See Also : \fBnum_hsps()\fR .SS "p" .IX Subsection "p" .Vb 10 \& Usage : $hit_object\->p( [format] ); \& Purpose : Get the P\-value for the best HSP \& Example : $p = $sbjct\->p; \& : $p = $sbjct\->p(\*(Aqexp\*(Aq); # get exponent only. \& : ($num, $exp) = $sbjct\->p(\*(Aqparts\*(Aq); # split sci notation into parts \& Returns : Float or scientific notation number (the raw P\-value, DEFAULT). \& : Integer if format == \*(Aqexp\*(Aq (the magnitude of the base 10 exponent). \& : 2\-element list (float, int) if format == \*(Aqparts\*(Aq and P\-value \& : is in scientific notation (See Comments). \& Argument : format: string of \*(Aqraw\*(Aq | \*(Aqexp\*(Aq | \*(Aqparts\*(Aq \& : \*(Aqraw\*(Aq returns value given in report. Default. (1.2e\-34) \& : \*(Aqexp\*(Aq returns exponent value only (34) \& : \*(Aqparts\*(Aq returns the decimal and exponent as a \& : 2\-element list (1.2, \-34) (See Comments). \& Throws : Warns if no P\-value is defined. Uses expect instead. \& Comments : Using the \*(Aqparts\*(Aq argument is not recommended since it will not \& : work as expected if the P\-value is not in scientific notation. \& : That is, floats are not converted into sci notation before \& : splitting into parts. .Ve .PP See Also : \fBexpect()\fR, \fBsignif()\fR, \fBBio::Search::SearchUtils::get_exponent()\fR .SS "hsp" .IX Subsection "hsp" .Vb 12 \& Usage : $hit_object\->hsp( [string] ); \& Purpose : Get a single HSPI object for the present HitI object. \& Example : $hspObj = $hit_object\->hsp; # same as \*(Aqbest\*(Aq \& : $hspObj = $hit_object\->hsp(\*(Aqbest\*(Aq); \& : $hspObj = $hit_object\->hsp(\*(Aqworst\*(Aq); \& Returns : Object reference for a Bio::Search::HSP::BlastHSP.pm object. \& Argument : String (or no argument). \& : No argument (default) = highest scoring HSP (same as \*(Aqbest\*(Aq). \& : \*(Aqbest\*(Aq or \*(Aqfirst\*(Aq = highest scoring HSP. \& : \*(Aqworst\*(Aq or \*(Aqlast\*(Aq = lowest scoring HSP. \& Throws : Exception if the HSPs have not been collected. \& : Exception if an unrecognized argument is used. .Ve .PP See Also : \fBhsps()\fR, num_hsps() .SS "rank" .IX Subsection "rank" .Vb 6 \& Title : rank \& Usage : $obj\->rank($newval) \& Function: Get/Set the rank of this Hit in the Query search list \& i.e. this is the Nth hit for a specific query \& Returns : value of rank \& Args : newvalue (optional) .Ve .SS "locus" .IX Subsection "locus" .Vb 5 \& Title : locus \& Usage : $locus = $hit\->locus(); \& Function: Retrieve the locus (if available) for the hit \& Returns : a scalar string (empty string if not set) \& Args : none .Ve .SS "each_accession_number" .IX Subsection "each_accession_number" .Vb 7 \& Title : each_accession_number \& Usage : @each_accession_number = $hit\->each_accession_number(); \& Function: Get each accession number listed in the description of the hit. \& If there are no alternatives, then only the primary accession will \& be given \& Returns : list of all accession numbers in the description \& Args : none .Ve .SS "tiled_hsps" .IX Subsection "tiled_hsps" See documentation in \fBBio::Search::SearchUtils::tile_hsps()\fR .SS "query_length" .IX Subsection "query_length" .Vb 5 \& Title : query_length \& Usage : $obj\->query_length($newval) \& Function: Get/Set the query_length \& Returns : value of query_length (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "ncbi_gi" .IX Subsection "ncbi_gi" .Vb 9 \& Title : ncbi_gi \& Usage : $acc = $hit\->ncbi_gi(); \& Function: Retrieve the NCBI Unique ID (aka the GI #), \& if available, for the hit \& Returns : a scalar string (empty string if not set) \& Args : none \& Note : As of Sept. 2016 NCBI records will no longer have a \& GI; this attributue will remain in place for older \& records .Ve .SH "ModelHit methods overridden in ModelHit" .IX Header "ModelHit methods overridden in ModelHit" The following methods have been overridden due to their current reliance on sequence-based queries. They may be implemented in future versions of this class. .SS "length_aln" .IX Subsection "length_aln" .SS "gaps" .IX Subsection "gaps" .SS "matches" .IX Subsection "matches" .SS "start" .IX Subsection "start" .SS "end" .IX Subsection "end" .SS "range" .IX Subsection "range" .SS "frac_identical" .IX Subsection "frac_identical" .SS "frac_conserved" .IX Subsection "frac_conserved" .SS "frac_aligned_query" .IX Subsection "frac_aligned_query" .SS "frac_aligned_hit" .IX Subsection "frac_aligned_hit" .SS "num_unaligned_hit" .IX Subsection "num_unaligned_hit" .SS "num_unaligned_query" .IX Subsection "num_unaligned_query" .SS "seq_inds" .IX Subsection "seq_inds" .SS "strand" .IX Subsection "strand" .SS "frame" .IX Subsection "frame" .SS "logical_length" .IX Subsection "logical_length"