1
2
3
4
5
6 """Bio.SearchIO objects to model homology search program outputs.
7
8 The SearchIO object model consists of a hierarchy of four nested objects:
9
10 * QueryResult, to represent a search query.
11
12 This is the top-level object returned by the main SearchIO `parse` and
13 `read` functions. QueryResult objects may contain zero or more Hit
14 objects, each accessible by its ID string (like in Python dictionaries)
15 or integer index (like in Python lists).
16
17 * Hit, to represent a database entry containing a full or partial sequence
18 match with the query sequence.
19
20 Hit objects contain one or more HSP objects, each accessible by its integer
21 index. They behave very similar to a Python list.
22
23 * HSP, to represent a region of significant alignment(s) between the query
24 and hit sequences.
25
26 HSP objects contain one or more HSPFragment objects, each accessible by
27 its integer index. In most cases, the HSP objects are where the bulk of
28 search result statistics (e.g. e-value, bitscore) are stored. Like Hit
29 objects, HSPs also behave very similar to a Python list.
30
31 * HSPFragment, to represent a single contiguous alignment between the query
32 and hit sequences.
33
34 HSPFragment objects may store hit and query sequences resulting from the
35 sequence search. If present, these sequences are stored as SeqRecord
36 objects (see SeqRecord). If both of them are present, HSPFragment will
37 create a MultipleSeqAlignment object from both sequences.
38
39 Most search programs only have HSPs with one HSPFragment in them, making
40 these two objects inseparable. However, there are programs (e.g. BLAT and
41 Exonerate) which may have more than one HSPFragment objects in any given
42 HSP. If you are not using these programs, you can safely consider HSP and
43 HSPFragment as a single union.
44
45 """
46
47 from query import QueryResult
48 from hit import Hit
49 from hsp import HSP, HSPFragment
50
51
52 __all__ = ['QueryResult', 'Hit', 'HSP', 'HSPFragment']
53
54
55
56 if __name__ == "__main__":
57 from Bio._utils import run_doctest
58 run_doctest()
59