19 lines
642 B
Python
19 lines
642 B
Python
from pathlib import Path
|
|
|
|
from genomic_consultant.panels.resolver import PhenotypeGeneResolver
|
|
|
|
|
|
def test_resolver_build_panel(tmp_path: Path):
|
|
data = {
|
|
"version": "test",
|
|
"source": "example",
|
|
"phenotype_to_genes": {"HP:0001": ["GENE1", "GENE2"]},
|
|
}
|
|
path = tmp_path / "map.json"
|
|
path.write_text('{"version":"test","source":"example","phenotype_to_genes":{"HP:0001":["GENE1","GENE2"]}}')
|
|
resolver = PhenotypeGeneResolver.from_json(path)
|
|
panel = resolver.build_panel("HP:0001")
|
|
assert panel is not None
|
|
assert panel.genes == ["GENE1", "GENE2"]
|
|
assert "phenotype_id" in panel.metadata
|