mhcseqs 2.6.1__tar.gz → 2.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/PKG-INFO +1 -1
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/domain_grammar.py +1 -1
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/domain_parsing.py +1 -0
- mhcseqs-2.6.2/mhcseqs/version.py +1 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/PKG-INFO +1 -1
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_groove.py +79 -0
- mhcseqs-2.6.1/mhcseqs/version.py +0 -1
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/LICENSE +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/README.md +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/__init__.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/__main__.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/alleles.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/b2m_sequences.csv +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/datafiles.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/diverse_mhc_sequences.csv +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/download.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/imgt.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/mhc_prefix_aliases.csv +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/mouse_h2_sequences.csv +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/pipeline.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/species.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs/validate.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/SOURCES.txt +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/dependency_links.txt +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/entry_points.txt +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/requires.txt +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/mhcseqs.egg-info/top_level.txt +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/pyproject.toml +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/setup.cfg +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_alleles.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_cli.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_curate_diverse_mhc.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_datafiles.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_download.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_evaluate_sp_ground_truth.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_groove_class_ii.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_historical_prefix_provenance.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_imgt.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_mutations.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_package_api.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_pipeline.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_sp_overcapture.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_species.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_species_coverage.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_validate.py +0 -0
- {mhcseqs-2.6.1 → mhcseqs-2.6.2}/tests/test_version.py +0 -0
|
@@ -100,7 +100,7 @@ CLASS_II_ALPHA_FRAGMENT_MAX_LEN = 110
|
|
|
100
100
|
CLASS_II_BETA_FRAGMENT_MAX_LEN = 120
|
|
101
101
|
|
|
102
102
|
MAX_PLAUSIBLE_SP = 50
|
|
103
|
-
PRIMARY_PARSE_CANDIDATE_KEEP =
|
|
103
|
+
PRIMARY_PARSE_CANDIDATE_KEEP = 4
|
|
104
104
|
|
|
105
105
|
NON_GROOVE_GENES = frozenset({"MICA", "MICB", "MIC1", "MIC2", "HFE", "B2M", "MR1", "H60A", "H60B", "H60C"})
|
|
106
106
|
NON_CLASSICAL_CLASS_I_GENE_PATTERNS = (
|
|
@@ -5209,6 +5209,7 @@ def _build_primary_result(
|
|
|
5209
5209
|
groove_subscore=components.groove,
|
|
5210
5210
|
ig_subscore=components.ig,
|
|
5211
5211
|
tail_subscore=components.tail,
|
|
5212
|
+
candidate_score=selection.selection_score,
|
|
5212
5213
|
status="ok",
|
|
5213
5214
|
anchor_type=grammar.anchor_type,
|
|
5214
5215
|
anchor_cys1=anchor_pair[0],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.6.2"
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
from types import SimpleNamespace
|
|
2
|
+
|
|
1
3
|
import pytest
|
|
2
4
|
|
|
5
|
+
import mhcseqs.domain_parsing as domain_parsing
|
|
3
6
|
from mhcseqs.domain_parsing import (
|
|
4
7
|
MAX_PLAUSIBLE_SP,
|
|
5
8
|
MIN_FUNCTIONAL_GROOVE_HALF_LEN,
|
|
@@ -33,6 +36,82 @@ HLA_A0201_MATURE = (
|
|
|
33
36
|
)
|
|
34
37
|
|
|
35
38
|
|
|
39
|
+
def test_primary_candidate_materializes_whole_parse_score():
|
|
40
|
+
"""The score used to form the beam must survive final record ranking."""
|
|
41
|
+
features = domain_parsing.analyze_sequence(HLA_A0201_MATURE)
|
|
42
|
+
grammar = domain_parsing._grammar_spec("I", "alpha")
|
|
43
|
+
early_result, cleaned, _pairs, annotated, sp_estimate = domain_parsing._prepare_parse_inputs(
|
|
44
|
+
HLA_A0201_MATURE,
|
|
45
|
+
grammar=grammar,
|
|
46
|
+
allele="HLA-A*02:01",
|
|
47
|
+
gene="A",
|
|
48
|
+
features=features,
|
|
49
|
+
use_early_shortcuts=False,
|
|
50
|
+
)
|
|
51
|
+
assert early_result is None
|
|
52
|
+
selections = domain_parsing._collect_primary_parse_candidates(
|
|
53
|
+
cleaned,
|
|
54
|
+
grammar=grammar,
|
|
55
|
+
annotated=annotated,
|
|
56
|
+
sp_estimate=sp_estimate,
|
|
57
|
+
features=features,
|
|
58
|
+
secondary_resolver=domain_parsing._build_class_i_secondary_resolver(cleaned, annotated, features),
|
|
59
|
+
)
|
|
60
|
+
assert selections
|
|
61
|
+
|
|
62
|
+
record = domain_parsing._build_primary_result(
|
|
63
|
+
allele="HLA-A*02:01",
|
|
64
|
+
gene="A",
|
|
65
|
+
seq=cleaned,
|
|
66
|
+
grammar=grammar,
|
|
67
|
+
selection=selections[0],
|
|
68
|
+
sp_estimate=sp_estimate,
|
|
69
|
+
features=features,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
assert record.candidate_score == pytest.approx(selections[0].selection_score)
|
|
73
|
+
assert record.parse_score == pytest.approx(record.sp_subscore + record.groove_subscore + record.ig_subscore + record.tail_subscore)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def test_primary_candidate_beam_keeps_four_distinct_architectures(monkeypatch):
|
|
77
|
+
"""Issue #15 calls for a small 3-5 candidate whole-parse beam."""
|
|
78
|
+
annotations = tuple(
|
|
79
|
+
domain_parsing.CysPairAnnotation(
|
|
80
|
+
c1=c1,
|
|
81
|
+
c2=c1 + 40,
|
|
82
|
+
separation=40,
|
|
83
|
+
groove_score=float(c1),
|
|
84
|
+
ig_score=0.0,
|
|
85
|
+
domain_type="groove",
|
|
86
|
+
)
|
|
87
|
+
for c1 in (10, 20, 30, 40, 50)
|
|
88
|
+
)
|
|
89
|
+
monkeypatch.setattr(
|
|
90
|
+
domain_parsing,
|
|
91
|
+
"_build_parse_scaffold",
|
|
92
|
+
lambda _seq, c1, *_args, **_kwargs: SimpleNamespace(c1=c1),
|
|
93
|
+
)
|
|
94
|
+
monkeypatch.setattr(
|
|
95
|
+
domain_parsing,
|
|
96
|
+
"_enumerate_mature_starts",
|
|
97
|
+
lambda scaffold, **_kwargs: scaffold.c1 // 10,
|
|
98
|
+
)
|
|
99
|
+
monkeypatch.setattr(
|
|
100
|
+
domain_parsing,
|
|
101
|
+
"_score_primary_candidate_selection",
|
|
102
|
+
lambda _seq, *, scaffold, **_kwargs: float(scaffold.c1),
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
selections = domain_parsing._collect_primary_parse_candidates(
|
|
106
|
+
"A" * 200,
|
|
107
|
+
grammar=domain_parsing._grammar_spec("II", "alpha"),
|
|
108
|
+
annotated=annotations,
|
|
109
|
+
sp_estimate=0,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
assert [selection.anchor.c1 for selection in selections] == [50, 40, 30, 20]
|
|
113
|
+
|
|
114
|
+
|
|
36
115
|
def test_find_cys_pairs_basic():
|
|
37
116
|
seq = "A" * 20 + "C" + "A" * 60 + "C" + "A" * 20
|
|
38
117
|
pairs = find_cys_pairs(seq)
|
mhcseqs-2.6.1/mhcseqs/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.6.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|