plan7.pyi 25.7 KB
Newer Older
1
2
# coding: utf-8
import collections.abc
3
import datetime
4
import os
5
6
7
import types
import typing

8
9
10
try:
    from typing import Literal
except ImportError:
11
    from typing_extensions import Literal  # type: ignore
12

13
14
15
16
from .easel import (
    Alphabet,
    Sequence,
    DigitalSequence,
17
    KeyHash,
18
19
    MSA,
    DigitalMSA,
20
    TextMSA,
21
    Randomness,
22
23
    VectorF,
    VectorU8,
24
    MatrixU8,
25
)
26

27
BIT_CUTOFFS = Literal["gathering", "trusted", "noise"]
28
29
30
31
32
SORT_KEY = Literal["key", "seqidx"]
ARCHITECTURE = Literal["fast", "hand"]
WEIGHTING = Literal["pb", "gsc", "blosum", "none", "given"]
EFFECTIVE = Literal["entropy", "exp", "clust", "none"]
PRIOR_SCHEME = Literal["laplace", "alphabet"]
33
STRAND = Literal["watson", "crick"]
34

35
class Alignment(collections.abc.Sized):
36
    domain: Domain
37
    def __len__(self) -> int: ...
38
    def __getstate__(self) -> typing.Dict[str, object]: ...
39
    @property
40
41
    def hmm_accession(self) -> bytes: ...
    @property
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
    def hmm_from(self) -> int: ...
    @property
    def hmm_name(self) -> bytes: ...
    @property
    def hmm_sequence(self) -> str: ...
    @property
    def hmm_to(self) -> int: ...
    @property
    def target_from(self) -> int: ...
    @property
    def target_name(self) -> bytes: ...
    @property
    def target_sequence(self) -> str: ...
    @property
    def target_to(self) -> int: ...
    @property
    def identity_sequence(self) -> str: ...

60
61
62
63
class Background(object):
    def __init__(self, alphabet: Alphabet, uniform: bool = False) -> None: ...
    def __copy__(self) -> Background: ...
    @property
64
65
66
    def L(self) -> int: ...
    @L.setter
    def L(self, L: int) -> None: ...
67
68
69
70
71
72
73
74
    @property
    def residue_frequencies(self) -> VectorF: ...
    @property
    def transition_probability(self) -> float: ...
    @property
    def omega(self) -> float: ...
    @omega.setter
    def omega(self, omega: float) -> None: ...
75
76
    def copy(self) -> Background: ...

77
class Builder(object):
78
79
80
    _ARCHITECTURE_STRATEGY: typing.ClassVar[typing.Dict[str, int]]
    _WEIGHTING_STRATEGY: typing.ClassVar[typing.Dict[str, int]]
    _EFFECTIVE_STRATEGY: typing.ClassVar[typing.Dict[str, int]]
81
82
    alphabet: Alphabet
    randomness: Randomness
83
    score_matrix: str
84
85
86
87
88
89
    architecture: ARCHITECTURE
    weighting: WEIGHTING
    effective_number: typing.Union[EFFECTIVE, int, float]
    prior_scheme: typing.Optional[PRIOR_SCHEME]
    popen: float
    pextend: float
90
91
92
93
    def __init__(
        self,
        alphabet: Alphabet,
        *,
94
95
96
97
        architecture: ARCHITECTURE = "fast",
        weighting: WEIGHTING = "pb",
        effective_number: typing.Union[EFFECTIVE, int, float] = "entropy",
        prior_scheme: typing.Optional[PRIOR_SCHEME] = "alphabet",
98
99
100
101
102
103
104
105
106
107
108
        symfrac: float = 0.5,
        fragthresh: float = 0.5,
        wid: float = 0.62,
        esigma: float = 45.0,
        eid: float = 0.62,
        EmL: int = 200,
        EmN: int = 200,
        EvL: int = 200,
        EvN: int = 200,
        EfL: int = 100,
        EfN: int = 200,
109
        Eft: float = 0.04,
110
111
        seed: int = 42,
        ere: typing.Optional[float] = None,
112
113
        popen: typing.Optional[float] = None,
        pextend: typing.Optional[float] = None,
114
        score_matrix: typing.Optional[str] = None,
115
116
        window_length: typing.Optional[int] = None,
        window_beta: typing.Optional[float] = None,
117
    ) -> None: ...
118
    def __copy__(self) -> Builder: ...
119
120
121
122
    @property
    def seed(self) -> int: ...
    @seed.setter
    def seed(self, seed: int) -> None: ...
123
124
125
126
127
128
129
130
    @property
    def window_length(self) -> typing.Optional[int]: ...
    @window_length.setter
    def window_length(self, window_length: typing.Optional[int]) -> None: ...
    @property
    def window_beta(self) -> typing.Optional[float]: ...
    @window_beta.setter
    def window_beta(self, window_beta: typing.Optional[float]) -> None: ...
131
132
133
    def build(
        self,
        sequence: DigitalSequence,
134
        background: Background,
135
136
137
138
139
    ) -> typing.Tuple[HMM, Profile, OptimizedProfile]: ...
    def build_msa(
        self,
        msa: DigitalMSA,
        background: Background,
140
    ) -> typing.Tuple[HMM, Profile, OptimizedProfile]: ...
141
    def copy(self) -> Builder: ...
142

143
class Cutoffs(object):
144
    def __init__(self, owner: typing.Union[Profile, HMM]) -> None: ...
145
    def __copy__(self) -> Cutoffs: ...
146
147
148
    def __str__(self) -> str: ...
    def __eq__(self, other: object) -> bool: ...
    @property
149
150
    def gathering(self) -> typing.Optional[typing.Tuple[float, float]]: ...
    @gathering.setter
151
152
153
    def gathering(
        self, gathering: typing.Optional[typing.Tuple[float, float]]
    ) -> None: ...
154
155
156
    @gathering.deleter
    def gathering(self) -> None: ...
    @property
157
158
159
160
    def gathering1(self) -> typing.Optional[float]: ...
    @property
    def gathering2(self) -> typing.Optional[float]: ...
    @property
161
162
163
164
165
166
    def trusted(self) -> typing.Optional[typing.Tuple[float, float]]: ...
    @trusted.setter
    def trusted(self, trusted: typing.Optional[typing.Tuple[float, float]]) -> None: ...
    @trusted.deleter
    def trusted(self) -> None: ...
    @property
167
168
169
170
    def trusted1(self) -> typing.Optional[float]: ...
    @property
    def trusted2(self) -> typing.Optional[float]: ...
    @property
171
172
173
174
175
176
    def noise(self) -> typing.Optional[typing.Tuple[float, float]]: ...
    @noise.setter
    def noise(self, noise: typing.Optional[typing.Tuple[float, float]]) -> None: ...
    @noise.deleter
    def noise(self) -> None: ...
    @property
177
178
179
180
181
182
183
184
    def noise1(self) -> typing.Optional[float]: ...
    @property
    def noise2(self) -> typing.Optional[float]: ...
    def gathering_available(self) -> bool: ...
    def trusted_available(self) -> bool: ...
    def noise_available(self) -> bool: ...
    def as_vector(self) -> VectorF: ...

185
class Domain(object):
186
187
    alignment: Alignment
    hit: Hit
188
    def __getstate__(self) -> typing.Dict[str, object]: ...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
    @property
    def env_from(self) -> int: ...
    @property
    def env_to(self) -> int: ...
    @property
    def score(self) -> float: ...
    @property
    def bias(self) -> float: ...
    @property
    def correction(self) -> float: ...
    @property
    def envelope_score(self) -> float: ...
    @property
    def c_evalue(self) -> float: ...
203
204
    @property
    def i_evalue(self) -> float: ...
205
    @property
206
    def pvalue(self) -> float: ...
207
208

class Domains(typing.Sequence[Domain]):
209
    hit: Hit
210
211
212
213
214
215
    def __len__(self) -> int: ...
    @typing.overload
    def __getitem__(self, index: int) -> Domain: ...
    @typing.overload
    def __getitem__(self, index: slice) -> typing.Sequence[Domain]: ...

216
class EvalueParameters:
217
    def __init__(self, owner: typing.Union[Profile, HMM]) -> None: ...
218
    def __copy__(self) -> EvalueParameters: ...
219
    def __str__(self) -> str: ...
220
    def __eq__(self, other: object) -> bool: ...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
    @property
    def m_mu(self) -> typing.Optional[float]: ...
    @m_mu.setter
    def m_mu(self, m: typing.Optional[float]) -> None: ...
    @property
    def m_lambda(self) -> typing.Optional[float]: ...
    @m_lambda.setter
    def m_lambda(self, l: typing.Optional[float]) -> None: ...
    @property
    def v_mu(self) -> typing.Optional[float]: ...
    @v_mu.setter
    def v_mu(self, m: typing.Optional[float]) -> None: ...
    @property
    def v_lambda(self) -> typing.Optional[float]: ...
    @v_lambda.setter
    def v_lambda(self, l: typing.Optional[float]) -> None: ...
    @property
    def f_tau(self) -> typing.Optional[float]: ...
    @f_tau.setter
    def f_tau(self, t: typing.Optional[float]) -> None: ...
    @property
    def f_lambda(self) -> typing.Optional[float]: ...
    @f_lambda.setter
    def f_lambda(self, l: typing.Optional[float]) -> None: ...
    def as_vector(self) -> VectorF: ...

247
class Hit(object):
248
    hits: TopHits
249
250
    @property
    def name(self) -> bytes: ...
251
252
    @name.setter
    def name(self, name: bytes) -> None: ...
253
    @property
254
255
256
    def accession(self) -> typing.Optional[bytes]: ...
    @accession.setter
    def accession(self, accession: typing.Optional[bytes]) -> None: ...
257
    @property
258
259
260
    def description(self) -> typing.Optional[bytes]: ...
    @description.setter
    def description(self, description: typing.Optional[bytes]) -> None: ...
261
262
263
264
265
    @property
    def score(self) -> float: ...
    @property
    def pre_score(self) -> float: ...
    @property
266
267
    def sum_score(self) -> float: ...
    @property
268
269
    def bias(self) -> float: ...
    @property
270
    def evalue(self) -> float: ...
271
    @property
272
273
    def pvalue(self) -> float: ...
    @property
274
    def domains(self) -> Domains: ...
275
276
    @property
    def best_domain(self) -> Domain: ...
277
278
    def manually_drop(self) -> None: ...
    def manually_include(self) -> None: ...
279
280
281
282
283
    def is_included(self) -> bool: ...
    def is_reported(self) -> bool: ...
    def is_new(self) -> bool: ...
    def is_dropped(self) -> bool: ...
    def is_duplicate(self) -> bool: ...
284
285

class HMM(object):
286
    alphabet: Alphabet
287
    def __init__(self, M: int, alphabet: Alphabet) -> None: ...
288
289
    def __eq__(self, other: object) -> bool: ...
    def __copy__(self) -> HMM: ...
290
    def __sizeof__(self) -> int: ...
291
292
    def __getstate__(self) -> typing.Dict[str, object]: ...
    def __setstate__(self, state: typing.Dict[str, object]) -> None: ...
293
294
    @property
    def M(self) -> int: ...
295
    @property
296
    def name(self) -> typing.Optional[bytes]: ...
297
    @name.setter
298
    def name(self, names: typing.Optional[bytes]) -> None: ...
299
    @property
300
    def accession(self) -> typing.Optional[bytes]: ...
301
    @accession.setter
302
    def accession(self, accession: typing.Optional[bytes]) -> None: ...
303
    @property
304
    def checksum(self) -> typing.Optional[int]: ...
305
    @property
306
307
    def composition(self) -> typing.Optional[VectorF]: ...
    @property
308
    def description(self) -> typing.Optional[bytes]: ...
309
    @description.setter
310
    def description(self, description: typing.Optional[bytes]) -> None: ...
311
312
313
314
315
316
317
318
319
320
321
322
323
324
    @property
    def consensus(self) -> typing.Optional[str]: ...
    @property
    def consensus_structure(self) -> typing.Optional[str]: ...
    @property
    def consensus_accessibility(self) -> typing.Optional[str]: ...
    @property
    def command_line(self) -> typing.Optional[str]: ...
    @command_line.setter
    def command_line(self, cli: typing.Optional[str]) -> None: ...
    @property
    def nseq(self) -> typing.Optional[int]: ...
    @property
    def nseq_effective(self) -> typing.Optional[int]: ...
325
    @property
326
    def creation_time(self) -> typing.Optional[datetime.datetime]: ...
327
    @creation_time.setter
328
    def creation_time(self, ctime: typing.Optional[datetime.datetime]) -> None: ...
329
330
331
332
    @property
    def evalue_parameters(self) -> EvalueParameters: ...
    @property
    def cutoffs(self) -> Cutoffs: ...
333
    def copy(self) -> HMM: ...
334
    def match_occupancy(self) -> VectorF: ...
335
336
337
    def mean_match_entropy(self) -> float: ...
    def mean_match_information(self, background: Background) -> float: ...
    def mean_match_relative_entropy(self, background: Background) -> float: ...
338
339
    def renormalize(self) -> None: ...
    def scale(self, scale: float, exponential: bool = False) -> None: ...
340
    def set_composition(self) -> None: ...
341
342
    def write(self, fh: typing.BinaryIO, binary: bool = False) -> None: ...
    def zero(self) -> None: ...
343
344

class HMMFile(typing.ContextManager[HMMFile], typing.Iterator[HMM]):
345
346
    _FORMATS: typing.ClassVar[typing.Dict[str, int]]
    _MAGIC: typing.ClassVar[typing.Dict[int, int]]
347
348
    def __init__(
        self,
349
        file: typing.Union[typing.AnyStr, os.PathLike[typing.AnyStr], typing.BinaryIO],
350
        db: bool = True,
351
    ) -> None: ...
352
353
354
355
356
    def __enter__(self) -> HMMFile: ...
    def __exit__(
        self,
        exc_type: typing.Optional[typing.Type[BaseException]],
        exc_value: typing.Optional[BaseException],
357
        traceback: typing.Optional[types.TracebackType],
358
359
360
    ) -> bool: ...
    def __iter__(self) -> HMMFile: ...
    def __next__(self) -> HMM: ...
361
    def __repr__(self) -> str: ...
362
363
364
    @property
    def closed(self) -> bool: ...
    def is_pressed(self) -> bool: ...
365
    def read(self) -> typing.Optional[HMM]: ...
366
    def close(self) -> None: ...
367
    def optimized_profiles(self) -> HMMPressedFile: ...
368

369
370
371
372
373
class HMMPressedFile(typing.Iterator[OptimizedProfile]):
    def __iter__(self) -> HMMPressedFile: ...
    def __next__(self) -> OptimizedProfile: ...
    def read(self) -> typing.Optional[OptimizedProfile]: ...

374
375
376
377
378
379
380
381
class IterationResult(typing.NamedTuple):
    hmm: HMM
    hits: TopHits
    msa: DigitalMSA
    converged: bool
    iteration: int

class IterativeSearch(typing.Iterator[IterationResult]):
382
383
384
385
386
387
388
389
390
391
392
393
394
    pipeline: Pipeline
    builder: Builder
    query: typing.Union[DigitalSequence, HMM]
    converged: bool
    targets: PipelineSearchTargets
    ranking: KeyHash
    iteration: int
    def __init__(
        self,
        pipeline: Pipeline,
        builder: Builder,
        query: typing.Union[DigitalSequence, HMM],
        targets: PipelineSearchTargets,
395
        select_hits: typing.Optional[typing.Callable[[TopHits], None]] = None,
396
397
    ) -> None: ...
    def __iter__(self) -> IterativeSearch: ...
398
399
    def __next__(self) -> IterationResult: ...

400
class OptimizedProfile(object):
401
    alphabet: Alphabet
402
    def __init__(self, M: int, abc: Alphabet) -> None: ...
403
    def __copy__(self) -> OptimizedProfile: ...
404
    def __eq__(self, other: object) -> bool: ...
405
    def __sizeof__(self) -> int: ...
406
    @property
407
408
409
410
411
412
    def M(self) -> int: ...
    @property
    def L(self) -> int: ...
    @L.setter
    def L(self, L: int) -> None: ...
    @property
413
414
415
416
417
418
419
420
421
422
    def name(self) -> typing.Optional[bytes]: ...
    @property
    def accession(self) -> typing.Optional[bytes]: ...
    @property
    def description(self) -> typing.Optional[bytes]: ...
    @property
    def consensus(self) -> typing.Optional[str]: ...
    @property
    def consensus_structure(self) -> typing.Optional[str]: ...
    @property
423
424
425
426
427
428
429
430
431
432
    def tbm(self) -> int: ...
    @property
    def tec(self) -> int: ...
    @property
    def tjb(self) -> int: ...
    @property
    def base(self) -> int: ...
    @property
    def bias(self) -> int: ...
    @property
433
434
435
    def sbv(self) -> MatrixU8: ...
    @property
    def rbv(self) -> MatrixU8: ...
436
437
    @property
    def offsets(self) -> Offsets: ...
438
439
440
441
442
443
    @property
    def evalue_parameters(self) -> EvalueParameters: ...
    @property
    def cutoffs(self) -> Cutoffs: ...
    def is_local(self) -> bool: ...
    def copy(self) -> OptimizedProfile: ...
444
445
446
    def write(
        self, fh_filter: typing.BinaryIO, fh_profile: typing.BinaryIO
    ) -> None: ...
447
448
    def convert(self, profile: Profile) -> None: ...
    def ssv_filter(self, seq: DigitalSequence) -> typing.Optional[float]: ...
449

450
class Offsets(object):
451
    def __init__(self, owner: typing.Union[Profile, OptimizedProfile]) -> None: ...
452
    def __copy__(self) -> Offsets: ...
453
    def __repr__(self) -> str: ...
454
455
456
457
458
459
460
461
462
463
464
465
    @property
    def model(self) -> typing.Optional[int]: ...
    @model.setter
    def model(self, model: typing.Optional[int]) -> None: ...
    @property
    def filter(self) -> typing.Optional[int]: ...
    @filter.setter
    def filter(self, filter: typing.Optional[int]) -> None: ...
    @property
    def profile(self) -> typing.Optional[int]: ...
    @profile.setter
    def profile(self, profile: typing.Optional[int]) -> None: ...
466

467
468
469
470
class PipelineSearchTargets(typing.Sequence[DigitalSequence]):
    def __init__(self, sequences: typing.Iterable[DigitalSequence]) -> None: ...
    def __iter__(self) -> typing.Iterator[DigitalSequence]: ...
    def __len__(self) -> int: ...
471
    @typing.overload
472
    def __getitem__(self, index: int) -> DigitalSequence: ...
473
474
    @typing.overload
    def __getitem__(self, index: slice) -> PipelineSearchTargets: ...
475

476
class Pipeline(object):
477
478
    M_HINT: typing.ClassVar[int] = 100
    L_HINT: typing.ClassVar[int] = 100
479
    _BIT_CUTOFFS: typing.ClassVar[typing.Dict[str, int]]
480
    alphabet: Alphabet
481
    background: Background
482
    profile: typing.Optional[Profile]
483
    randomness: Randomness
484
485
486
    def __init__(
        self,
        alphabet: Alphabet,
487
        background: typing.Optional[Background] = None,
488
489
490
        *,
        bias_filter: bool = True,
        null2: bool = True,
491
        seed: int = 42,
492
493
        Z: typing.Optional[float] = None,
        domZ: typing.Optional[float] = None,
494
495
496
497
        F1: float = 0.02,
        F2: float = 1e-3,
        F3: float = 1e-5,
        E: float = 10.0,
498
        T: typing.Optional[float] = None,
499
        domE: float = 10.0,
500
        domT: typing.Optional[float] = None,
501
        incE: float = 0.01,
502
        incT: typing.Optional[float] = None,
503
        incdomE: float = 0.01,
504
        incdomT: typing.Optional[float] = None,
505
        bit_cutoffs: typing.Optional[BIT_CUTOFFS] = None,
506
    ) -> None: ...
507
508
509
510
511
512
513
514
    @property
    def Z(self) -> typing.Optional[float]: ...
    @Z.setter
    def Z(self, Z: typing.Optional[float]) -> None: ...
    @property
    def domZ(self) -> typing.Optional[float]: ...
    @domZ.setter
    def domZ(self, domZ: typing.Optional[float]) -> None: ...
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
    @property
    def null2(self) -> bool: ...
    @null2.setter
    def null2(self, null2: bool) -> None: ...
    @property
    def bias_filter(self) -> bool: ...
    @bias_filter.setter
    def bias_filter(self, bias_filter: bool) -> None: ...
    @property
    def F1(self) -> float: ...
    @F1.setter
    def F1(self, F1: float) -> None: ...
    @property
    def F2(self) -> float: ...
    @F2.setter
    def F2(self, F2: float) -> None: ...
    @property
    def F3(self) -> float: ...
    @F3.setter
    def F3(self, F3: float) -> None: ...
535
536
537
538
539
    @property
    def E(self) -> float: ...
    @E.setter
    def E(self, E: float) -> None: ...
    @property
540
541
542
543
    def T(self) -> typing.Optional[float]: ...
    @T.setter
    def T(self, T: typing.Optional[float]) -> None: ...
    @property
544
545
546
547
    def domE(self) -> float: ...
    @domE.setter
    def domE(self, domE: float) -> None: ...
    @property
548
549
550
551
    def domT(self) -> typing.Optional[float]: ...
    @domT.setter
    def domT(self, domT: typing.Optional[float]) -> None: ...
    @property
552
553
554
555
    def incE(self) -> float: ...
    @incE.setter
    def incE(self, incE: float) -> None: ...
    @property
556
557
558
559
    def incT(self) -> typing.Optional[float]: ...
    @incT.setter
    def incT(self, incT: typing.Optional[float]) -> None: ...
    @property
560
561
562
    def incdomE(self) -> float: ...
    @incdomE.setter
    def incdomE(self, incdomE: float) -> None: ...
563
    @property
564
565
566
567
    def incdomT(self) -> typing.Optional[float]: ...
    @incdomT.setter
    def incdomT(self, incdomT: typing.Optional[float]) -> None: ...
    @property
568
569
570
    def bit_cutoffs(self) -> typing.Optional[BIT_CUTOFFS]: ...
    @bit_cutoffs.setter
    def bit_cutoffs(self, bit_cutoffs: typing.Optional[BIT_CUTOFFS]) -> None: ...
571
572
573
574
    @property
    def strand(self) -> typing.Optional[STRAND]: ...
    @strand.setter
    def strand(self, strand: typing.Optional[STRAND]) -> None: ...
575
    def arguments(self) -> typing.List[str]: ...
576
    def clear(self) -> None: ...
577
    def search_hmm(
578
        self,
579
        query: typing.Union[HMM, Profile, OptimizedProfile],
580
        sequences: typing.Iterable[DigitalSequence],
581
    ) -> TopHits: ...
582
583
    def search_msa(
        self,
584
        query: DigitalMSA,
585
        sequences: typing.Iterable[DigitalSequence],
586
        builder: typing.Optional[Builder] = None,
587
    ) -> TopHits: ...
588
589
    def search_seq(
        self,
590
        query: DigitalSequence,
591
592
593
        sequences: typing.Iterable[DigitalSequence],
        builder: typing.Optional[Builder] = None,
    ) -> TopHits: ...
594
595
596
597
598
    def scan_hmm(
        self,
        query: DigitalSequence,
        hmms: typing.Iterable[HMM],
    ) -> TopHits: ...
599
600
601
602
603
    def iterate_seq(
        self,
        query: DigitalSequence,
        sequences: typing.Iterable[DigitalSequence],
        builder: typing.Optional[Builder] = None,
604
        select_hits: typing.Optional[typing.Callable[[TopHits], None]] = None,
605
    ) -> typing.Iterator[typing.Tuple[DigitalMSA, HMM, TopHits, bool]]: ...
606
607
608
609
610
611
612
613
    def iterate_hmm(
        self,
        query: HMM,
        sequences: typing.Iterable[DigitalSequence],
        builder: typing.Optional[Builder] = None,
        select_hits: typing.Optional[typing.Callable[[TopHits], None]] = None,
    ) -> typing.Iterator[typing.Tuple[DigitalMSA, HMM, TopHits, bool]]: ...

614
615
616
617
618
619
620
621
622
class LongTargetsPipeline(Pipeline):
    def __init__(
        self,
        alphabet: Alphabet,
        background: typing.Optional[Background] = None,
        *,
        B1: int = 100,
        B2: int = 240,
        B3: int = 1000,
623
        block_length: int = 1024 * 256,
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
        bias_filter: bool = True,
        null2: bool = True,
        seed: typing.Optional[int] = None,
        Z: typing.Optional[float] = None,
        domZ: typing.Optional[float] = None,
        F1: float = 0.02,
        F2: float = 1e-3,
        F3: float = 1e-5,
        E: float = 10.0,
        T: typing.Optional[float] = None,
        domE: float = 10.0,
        domT: typing.Optional[float] = None,
        incE: float = 0.01,
        incT: typing.Optional[float] = None,
        incdomE: float = 0.01,
        incdomT: typing.Optional[float] = None,
        bit_cutoffs: typing.Optional[BIT_CUTOFFS] = None,
    ) -> None: ...
    @property
    def B1(self) -> int: ...
    @B1.setter
    def B1(self, B1: int) -> None: ...
    @property
    def B2(self) -> int: ...
    @B2.setter
    def B2(self, B2: int) -> None: ...
    @property
    def B3(self) -> int: ...
    @B3.setter
    def B3(self, B3: int) -> None: ...
    @property
    def strand(self) -> typing.Optional[STRAND]: ...
    @strand.setter
    def strand(self, strand: typing.Optional[STRAND]) -> None: ...

659
class Profile(object):
660
    alphabet: Alphabet
661
    def __init__(self, M: int, alphabet: Alphabet) -> None: ...
662
    def __copy__(self) -> Profile: ...
663
    def __eq__(self, other: object) -> bool: ...
664
    def __sizeof__(self) -> int: ...
665
666
667
668
669
670
671
672
    @property
    def M(self) -> int: ...
    @property
    def name(self) -> typing.Optional[bytes]: ...
    @property
    def accession(self) -> typing.Optional[bytes]: ...
    @property
    def description(self) -> typing.Optional[bytes]: ...
673
674
675
676
    @property
    def consensus(self) -> typing.Optional[str]: ...
    @property
    def consensus_structure(self) -> typing.Optional[str]: ...
677
678
679
680
681
682
    @property
    def cutoffs(self) -> Cutoffs: ...
    @property
    def evalue_parameters(self) -> EvalueParameters: ...
    @property
    def offsets(self) -> Offsets: ...
683
    def clear(self) -> None: ...
684
685
686
687
688
689
    def configure(
        self,
        hmm: HMM,
        background: Background,
        L: int,
        multihit: bool = True,
690
        local: bool = True,
691
    ) -> None: ...
692
693
694
    def copy(self) -> Profile: ...
    def is_local(self) -> bool: ...
    def is_multihit(self) -> bool: ...
695
    def optimized(self) -> OptimizedProfile: ...
696

697
698
class ScoreData(object):
    Kp: int
699
    def __init__(self, gm: Profile, om: OptimizedProfile) -> None: ...
700
701
702
    def __copy__(self) -> ScoreData: ...
    def copy(self) -> ScoreData: ...

703
704
705
class TopHits(typing.Sequence[Hit]):
    def __init__(self) -> None: ...
    def __bool__(self) -> bool: ...
706
    def __copy__(self) -> TopHits: ...
707
708
709
710
711
712
    def __len__(self) -> int: ...
    @typing.overload
    def __getitem__(self, index: int) -> Hit: ...
    @typing.overload
    def __getitem__(self, index: slice) -> typing.Sequence[Hit]: ...
    def __iadd__(self, other: TopHits) -> TopHits: ...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
    @property
    def Z(self) -> float: ...
    @property
    def domZ(self) -> float: ...
    @property
    def long_targets(self) -> bool: ...
    @property
    def E(self) -> float: ...
    @property
    def T(self) -> typing.Optional[float]: ...
    @property
    def domE(self) -> float: ...
    @property
    def domT(self) -> typing.Optional[float]: ...
    @property
    def incE(self) -> float: ...
    @property
    def incT(self) -> typing.Optional[float]: ...
    @property
    def incdomE(self) -> float: ...
    @property
    def incdomT(self) -> typing.Optional[float]: ...
    @property
    def bit_cutoffs(self) -> typing.Optional[BIT_CUTOFFS]: ...
    @property
    def searched_models(self) -> int: ...
    @property
    def searched_nodes(self) -> int: ...
    @property
    def searched_sequences(self) -> int: ...
    @property
    def searched_residues(self) -> int: ...
    @property
746
    def hits_reported(self) -> int: ...
747
    @property
748
    def hits_included(self) -> int: ...
749
750
751
752
    @property
    def strand(self) -> typing.Optional[STRAND]: ...
    @property
    def block_length(self) -> typing.Optional[int]: ...
753
    def compare_ranking(self, ranking: KeyHash) -> int: ...
754
755
    def sort(self, by: SORT_KEY = "key") -> None: ...
    def is_sorted(self, by: SORT_KEY = "key") -> bool: ...
756
    def copy(self) -> TopHits: ...
757
    def merge(self, *others: TopHits) -> TopHits: ...
758
759
760
    def to_msa(
        self,
        alphabet: Alphabet,
761
762
763
        sequences: typing.Optional[typing.List[Sequence]] = None,
        traces: typing.Optional[typing.List[Trace]] = None,
        *,
764
765
        trim: bool = False,
        digitize: bool = False,
766
        all_consensus_cols: bool = False,
767
    ) -> MSA: ...
768
769

class Trace(object):
770
    def __init__(self, posteriors: bool = False) -> None: ...
771
772
773
774
775
776
    def __eq__(self, other: object) -> bool: ...
    @property
    def M(self) -> int: ...
    @property
    def L(self) -> int: ...
    @property
777
    def posterior_probabilities(self) -> typing.Optional[VectorF]: ...
778
779
780
781
    def expected_accuracy(self) -> float: ...

class Traces(typing.Sequence[Trace]):
    def __init__(self) -> None: ...
782
    def __eq__(self, other: object) -> bool: ...
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
    def __len__(self) -> int: ...
    @typing.overload
    def __getitem__(self, index: int) -> Trace: ...
    @typing.overload
    def __getitem__(self, index: slice) -> typing.Sequence[Trace]: ...

class TraceAligner(object):
    def __init__(self) -> None: ...
    def compute_traces(
        self,
        hmm: HMM,
        sequences: typing.Iterable[DigitalSequence],
    ) -> Traces: ...
    def align_traces(
        self,
        hmm: HMM,
        sequences: typing.Iterable[DigitalSequence],
        traces: Traces,
        trim: bool = False,
        digitize: bool = False,
        all_consensus_cols: bool = False,
    ) -> MSA: ...