haplohub-cli 3.2.2__tar.gz → 3.4.0__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.
- {haplohub_cli-3.2.2/haplohub_cli.egg-info → haplohub_cli-3.4.0}/PKG-INFO +2 -2
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/docs/sdk-coupling.md +1 -1
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/_version.py +3 -3
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/sample.py +20 -1
- haplohub_cli-3.4.0/haplohub_cli/commands/cohort/tests/test_genotypes.py +38 -0
- haplohub_cli-3.4.0/haplohub_cli/commands/tests/test_variant.py +116 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/variant.py +70 -8
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/__init__.py +1 -0
- haplohub_cli-3.4.0/haplohub_cli/formatters/genotype.py +35 -0
- haplohub_cli-3.4.0/haplohub_cli/formatters/tests/test_genotype.py +70 -0
- haplohub_cli-3.4.0/haplohub_cli/formatters/tests/test_variant.py +42 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/variant.py +7 -4
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0/haplohub_cli.egg-info}/PKG-INFO +2 -2
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/SOURCES.txt +5 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/requires.txt +1 -1
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/scm_file_list.json +5 -0
- haplohub_cli-3.4.0/haplohub_cli.egg-info/scm_version.json +8 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/pyproject.toml +1 -1
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/uv.lock +1 -1
- haplohub_cli-3.2.2/haplohub_cli.egg-info/scm_version.json +0 -8
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/.github/dependabot.yml +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/.github/workflows/on_pr.yml +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/.github/workflows/on_push_main.yml +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/.gitignore +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/.pre-commit-config.yaml +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/AGENTS.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/CLAUDE.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/README.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/docs/index.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/docs/release.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/docs/stage-verification.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/docs/testing.md +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/auth.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/auth_web_server.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/oauth_client.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/tests/test_auth_web_server.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/tests/test_token_storage.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/auth/token_storage.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/cli.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/algorithm/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/algorithm/result/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/algorithm/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/algorithm/tests/test_result_create.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/biomarker.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/member/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/member/report.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/cohort/tests/test_delete.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/config.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/file.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/login.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/metadata/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/tests/test_file.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/version.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/config/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/config/config.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/config/config_manager.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/api/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/api/client.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/checksum.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/deletion.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/network.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/slug.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/tests/test_checksum.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/tests/test_network.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/tests/test_slug.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/types.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/core/upload.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/algorithm.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/algorithm_result.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/biomarker.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/config.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/decorators.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/file.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/formatter_registry.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/generic.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/generic_table.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/tests/test_generic_table.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/utils.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/settings.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/tests/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/tests/test_cli.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/types/__init__.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/types/variant_range.py +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/dependency_links.txt +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/entry_points.txt +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli.egg-info/top_level.txt +0 -0
- {haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/setup.cfg +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: haplohub-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: HaploHub Command Line Interface
|
|
5
5
|
Author-email: Mike Polcari <mike@haplotype-labs.com>, Ilya Khrustalev <ilya@haplotype-labs.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Requires-Dist: certifi>=2026.10.19
|
|
9
9
|
Requires-Dist: click>=8.1.8
|
|
10
|
-
Requires-Dist: haplohub<4,>=3.
|
|
10
|
+
Requires-Dist: haplohub<4,>=3.10.0
|
|
11
11
|
Requires-Dist: pendulum>=3.0.0
|
|
12
12
|
Requires-Dist: requests>=2.32.0
|
|
13
13
|
Requires-Dist: rich>=13.9.4
|
|
@@ -12,7 +12,7 @@ newer or older than the released SDK.
|
|
|
12
12
|
|
|
13
13
|
## Version constraint
|
|
14
14
|
|
|
15
|
-
`pyproject.toml` pins a range like `haplohub>=3.
|
|
15
|
+
`pyproject.toml` pins a range like `haplohub>=3.10.0,<4`. Policy:
|
|
16
16
|
|
|
17
17
|
- The lower bound is the oldest SDK release whose API surface this code uses.
|
|
18
18
|
Raise it whenever code starts using something newer.
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '3.
|
|
22
|
-
__version_tuple__ = version_tuple = (3,
|
|
21
|
+
__version__ = version = '3.4.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (3, 4, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g10dac29ea'
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import click
|
|
2
|
-
from haplohub import CreateSampleRequest, DeleteMode, UpdateSampleRequest
|
|
2
|
+
from haplohub import CreateSampleRequest, DeleteMode, GetSampleGenotypesRequest, UpdateSampleRequest
|
|
3
3
|
|
|
4
4
|
from haplohub_cli.core import types
|
|
5
5
|
from haplohub_cli.core.api.client import client
|
|
6
6
|
from haplohub_cli.core.deletion import DELETE_MODE_CHOICES, DELETE_MODE_HELP, confirm_hard_delete
|
|
7
7
|
|
|
8
|
+
# The API's limit per genotypes request.
|
|
9
|
+
MAX_RS_IDS = 1000
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
@click.group()
|
|
10
13
|
def sample():
|
|
@@ -82,3 +85,19 @@ def update(id, cohort, member=None, member_external_id=None):
|
|
|
82
85
|
member_external_id=member_external_id,
|
|
83
86
|
)
|
|
84
87
|
return client.sample.update_sample(cohort, id, request)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@sample.command()
|
|
91
|
+
@click.argument("id")
|
|
92
|
+
@click.option("--cohort", "-c", type=types.HAPLOHUB_ID, required=True)
|
|
93
|
+
@click.option("--rs-id", "-r", "rs_ids", type=str, multiple=True, required=True, help="rsID, as rs123 or 123 (repeatable)")
|
|
94
|
+
def genotypes(id, cohort, rs_ids):
|
|
95
|
+
"""
|
|
96
|
+
Raw genotypes by rsID, read from the sample's uploaded SNP-array file.
|
|
97
|
+
|
|
98
|
+
Available seconds after a SNP-array upload, while ingestion is still running.
|
|
99
|
+
Not normalized, lifted over or imputed: use `variant` queries for the processed data.
|
|
100
|
+
"""
|
|
101
|
+
if len(rs_ids) > MAX_RS_IDS:
|
|
102
|
+
raise click.BadParameter(f"at most {MAX_RS_IDS} rsIDs per call.", param_hint="--rs-id")
|
|
103
|
+
return client.sample.get_sample_genotypes(cohort, id, GetSampleGenotypesRequest(rs_ids=[*rs_ids]))
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from unittest import TestCase
|
|
2
|
+
from unittest.mock import patch
|
|
3
|
+
|
|
4
|
+
from click.testing import CliRunner
|
|
5
|
+
from haplohub import GetSampleGenotypesRequest
|
|
6
|
+
|
|
7
|
+
from haplohub_cli.commands.cohort.sample import MAX_RS_IDS, sample
|
|
8
|
+
|
|
9
|
+
COHORT = "coh-abc123"
|
|
10
|
+
SAMPLE = "smp-abc123"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SampleGenotypesCommandTestCase(TestCase):
|
|
14
|
+
def invoke(self, *args):
|
|
15
|
+
with patch("haplohub_cli.commands.cohort.sample.client") as client:
|
|
16
|
+
result = CliRunner().invoke(sample, ["genotypes", SAMPLE, "-c", COHORT, *args])
|
|
17
|
+
return result, client.sample.get_sample_genotypes
|
|
18
|
+
|
|
19
|
+
def test_passes_every_rs_id(self):
|
|
20
|
+
result, get_sample_genotypes = self.invoke("-r", "rs1", "--rs-id", "42")
|
|
21
|
+
|
|
22
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
23
|
+
get_sample_genotypes.assert_called_once_with(COHORT, SAMPLE, GetSampleGenotypesRequest(rs_ids=["rs1", "42"]))
|
|
24
|
+
|
|
25
|
+
def test_requires_an_rs_id(self):
|
|
26
|
+
result, get_sample_genotypes = self.invoke()
|
|
27
|
+
|
|
28
|
+
self.assertEqual(result.exit_code, 2)
|
|
29
|
+
get_sample_genotypes.assert_not_called()
|
|
30
|
+
|
|
31
|
+
def test_rejects_more_rs_ids_than_the_api_takes(self):
|
|
32
|
+
args = [arg for i in range(MAX_RS_IDS + 1) for arg in ("-r", f"rs{i + 1}")]
|
|
33
|
+
|
|
34
|
+
result, get_sample_genotypes = self.invoke(*args)
|
|
35
|
+
|
|
36
|
+
self.assertEqual(result.exit_code, 2)
|
|
37
|
+
self.assertIn("at most 1000 rsIDs", result.output)
|
|
38
|
+
get_sample_genotypes.assert_not_called()
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from unittest import TestCase
|
|
2
|
+
from unittest.mock import patch
|
|
3
|
+
|
|
4
|
+
from click.testing import CliRunner
|
|
5
|
+
|
|
6
|
+
from haplohub_cli.commands.variant import variant
|
|
7
|
+
|
|
8
|
+
COHORT = "coh-abc123"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class VariantCommandTestCase(TestCase):
|
|
12
|
+
def invoke(self, *args):
|
|
13
|
+
with patch("haplohub_cli.commands.variant.client") as client:
|
|
14
|
+
result = CliRunner().invoke(variant, list(args))
|
|
15
|
+
return result, client
|
|
16
|
+
|
|
17
|
+
def sent_request(self, client):
|
|
18
|
+
cohort_id, request = client.variant.get_variant.call_args.args
|
|
19
|
+
self.assertEqual(cohort_id, COHORT)
|
|
20
|
+
return request
|
|
21
|
+
|
|
22
|
+
def test_region_brava_flag_adds_selector(self):
|
|
23
|
+
result, client = self.invoke(
|
|
24
|
+
"region", COHORT, "-s", "smp-1", "-a", "NC_000001.11", "--start", "100", "--end", "200", "--gwas", "--brava"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
28
|
+
self.assertEqual(self.sent_request(client).selectors, ["gwas", "brava"])
|
|
29
|
+
|
|
30
|
+
def test_hgvs_brava_flag_adds_selector(self):
|
|
31
|
+
result, client = self.invoke("hgvs", COHORT, "-s", "smp-1", "-h", "NC_000001.11:g.100A>G", "--brava")
|
|
32
|
+
|
|
33
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
34
|
+
self.assertEqual(self.sent_request(client).selectors, ["brava"])
|
|
35
|
+
|
|
36
|
+
def test_region_without_flags_sends_no_selectors(self):
|
|
37
|
+
result, client = self.invoke("region", COHORT, "-s", "smp-1", "-a", "NC_000001.11", "--start", "1", "--end", "2")
|
|
38
|
+
|
|
39
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
40
|
+
self.assertIsNone(self.sent_request(client).selectors)
|
|
41
|
+
|
|
42
|
+
def test_gwas_brava_flag_adds_selector(self):
|
|
43
|
+
result, client = self.invoke("gwas", COHORT, "-s", "smp-1", "--gene", "TCF7L2", "--brava")
|
|
44
|
+
|
|
45
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
46
|
+
self.assertEqual(self.sent_request(client).selectors, ["gwas", "brava"])
|
|
47
|
+
|
|
48
|
+
def test_brava_builds_brava_target(self):
|
|
49
|
+
result, client = self.invoke(
|
|
50
|
+
"brava",
|
|
51
|
+
COHORT,
|
|
52
|
+
"-s",
|
|
53
|
+
"smp-1",
|
|
54
|
+
"-s",
|
|
55
|
+
"smp-2",
|
|
56
|
+
"--trait",
|
|
57
|
+
"AFib",
|
|
58
|
+
"--gene",
|
|
59
|
+
"PCSK9",
|
|
60
|
+
"--p-value-max",
|
|
61
|
+
"1e-5",
|
|
62
|
+
"--limit",
|
|
63
|
+
"20",
|
|
64
|
+
"--call-state",
|
|
65
|
+
"all",
|
|
66
|
+
"--clinvar",
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
70
|
+
request = self.sent_request(client)
|
|
71
|
+
self.assertEqual(request.sample_ids, ["smp-1", "smp-2"])
|
|
72
|
+
self.assertEqual(request.selectors, ["clinvar", "brava"])
|
|
73
|
+
self.assertEqual(request.filters.call_state, "all")
|
|
74
|
+
self.assertEqual(
|
|
75
|
+
request.to_dict()["targets"],
|
|
76
|
+
[{"type": "brava", "trait": "AFib", "gene": "PCSK9", "p_value_max": 1e-5, "limit": 20}],
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
def test_brava_defaults(self):
|
|
80
|
+
result, client = self.invoke("brava", COHORT, "-s", "smp-1", "--gene", "PCSK9")
|
|
81
|
+
|
|
82
|
+
self.assertEqual(result.exit_code, 0, result.output)
|
|
83
|
+
request = self.sent_request(client)
|
|
84
|
+
self.assertEqual(request.selectors, ["brava"])
|
|
85
|
+
self.assertEqual(
|
|
86
|
+
request.to_dict()["targets"],
|
|
87
|
+
[{"type": "brava", "trait": None, "gene": "PCSK9", "p_value_max": None, "limit": 100}],
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
def test_brava_requires_trait_or_gene(self):
|
|
91
|
+
result, client = self.invoke("brava", COHORT, "-s", "smp-1")
|
|
92
|
+
|
|
93
|
+
self.assertEqual(result.exit_code, 2)
|
|
94
|
+
self.assertIn("Provide at least one of --trait or --gene", result.output)
|
|
95
|
+
client.variant.get_variant.assert_not_called()
|
|
96
|
+
|
|
97
|
+
def test_brava_treats_blank_trait_and_gene_as_missing(self):
|
|
98
|
+
result, client = self.invoke("brava", COHORT, "-s", "smp-1", "--trait", " ", "--gene", "")
|
|
99
|
+
|
|
100
|
+
self.assertEqual(result.exit_code, 2)
|
|
101
|
+
self.assertIn("Provide at least one of --trait or --gene", result.output)
|
|
102
|
+
client.variant.get_variant.assert_not_called()
|
|
103
|
+
|
|
104
|
+
def test_brava_rejects_out_of_range_limit_and_p_value(self):
|
|
105
|
+
for extra in (
|
|
106
|
+
["--limit", "0"],
|
|
107
|
+
["--limit", "1001"],
|
|
108
|
+
["--p-value-max", "0"],
|
|
109
|
+
["--p-value-max", "1.5"],
|
|
110
|
+
["--p-value-max", "nan"],
|
|
111
|
+
):
|
|
112
|
+
with self.subTest(extra=extra):
|
|
113
|
+
result, client = self.invoke("brava", COHORT, "-s", "smp-1", "--trait", "AFib", *extra)
|
|
114
|
+
|
|
115
|
+
self.assertEqual(result.exit_code, 2, result.output)
|
|
116
|
+
client.variant.get_variant.assert_not_called()
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
1
3
|
import click
|
|
2
4
|
from haplohub import (
|
|
5
|
+
BravaTargetSchema,
|
|
3
6
|
GetVariantRequest,
|
|
4
7
|
GwasTargetSchema,
|
|
5
8
|
HgvsTargetSchema,
|
|
@@ -11,13 +14,15 @@ from haplohub import (
|
|
|
11
14
|
from haplohub_cli.core.api.client import client
|
|
12
15
|
|
|
13
16
|
|
|
14
|
-
def _selectors(clinvar: bool, gwas: bool) -> list[str] | None:
|
|
17
|
+
def _selectors(clinvar: bool, gwas: bool, brava: bool) -> list[str] | None:
|
|
15
18
|
"""Build the selector list; None when no annotations were requested."""
|
|
16
19
|
selectors = []
|
|
17
20
|
if clinvar:
|
|
18
21
|
selectors.append("clinvar")
|
|
19
22
|
if gwas:
|
|
20
23
|
selectors.append("gwas")
|
|
24
|
+
if brava:
|
|
25
|
+
selectors.append("brava")
|
|
21
26
|
return selectors or None
|
|
22
27
|
|
|
23
28
|
|
|
@@ -40,7 +45,8 @@ def variant():
|
|
|
40
45
|
@click.option("--call-state", type=click.Choice(["called", "all"]), default="called", help="Filter by call state")
|
|
41
46
|
@click.option("--clinvar", is_flag=True, default=False, help="Include ClinVar annotations")
|
|
42
47
|
@click.option("--gwas", is_flag=True, default=False, help="Include GWAS Catalog annotations")
|
|
43
|
-
|
|
48
|
+
@click.option("--brava", is_flag=True, default=False, help="Include BRaVa rare-variant associations")
|
|
49
|
+
def region(sample_ids, cohort_id, accession, start, end, reference, alternate, call_state, clinvar, gwas, brava):
|
|
44
50
|
"""
|
|
45
51
|
Query variants by genomic region
|
|
46
52
|
"""
|
|
@@ -56,7 +62,7 @@ def region(sample_ids, cohort_id, accession, start, end, reference, alternate, c
|
|
|
56
62
|
sample_ids=list(sample_ids),
|
|
57
63
|
targets=[VariantTargetSchema(target)],
|
|
58
64
|
filters=VariantFilterSchema(call_state=call_state),
|
|
59
|
-
selectors=_selectors(clinvar, gwas),
|
|
65
|
+
selectors=_selectors(clinvar, gwas, brava),
|
|
60
66
|
)
|
|
61
67
|
|
|
62
68
|
return client.variant.get_variant(cohort_id, request)
|
|
@@ -69,7 +75,8 @@ def region(sample_ids, cohort_id, accession, start, end, reference, alternate, c
|
|
|
69
75
|
@click.option("--call-state", type=click.Choice(["called", "all"]), default="called", help="Filter by call state")
|
|
70
76
|
@click.option("--clinvar", is_flag=True, default=False, help="Include ClinVar annotations")
|
|
71
77
|
@click.option("--gwas", is_flag=True, default=False, help="Include GWAS Catalog annotations")
|
|
72
|
-
|
|
78
|
+
@click.option("--brava", is_flag=True, default=False, help="Include BRaVa rare-variant associations")
|
|
79
|
+
def hgvs(sample_ids, cohort_id, hgvs, call_state, clinvar, gwas, brava):
|
|
73
80
|
"""
|
|
74
81
|
Query variants by HGVS notation
|
|
75
82
|
"""
|
|
@@ -79,7 +86,7 @@ def hgvs(sample_ids, cohort_id, hgvs, call_state, clinvar, gwas):
|
|
|
79
86
|
sample_ids=list(sample_ids),
|
|
80
87
|
targets=targets,
|
|
81
88
|
filters=VariantFilterSchema(call_state=call_state),
|
|
82
|
-
selectors=_selectors(clinvar, gwas),
|
|
89
|
+
selectors=_selectors(clinvar, gwas, brava),
|
|
83
90
|
)
|
|
84
91
|
|
|
85
92
|
return client.variant.get_variant(cohort_id, request)
|
|
@@ -95,13 +102,15 @@ def hgvs(sample_ids, cohort_id, hgvs, call_state, clinvar, gwas):
|
|
|
95
102
|
@click.option("--limit", type=int, default=100, help="Max associations to resolve (most significant first)")
|
|
96
103
|
@click.option("--call-state", type=click.Choice(["called", "all"]), default="called", help="Filter by call state")
|
|
97
104
|
@click.option("--clinvar", is_flag=True, default=False, help="Also include ClinVar annotations")
|
|
98
|
-
|
|
105
|
+
@click.option("--brava", is_flag=True, default=False, help="Also include BRaVa rare-variant associations")
|
|
106
|
+
def gwas(sample_ids, cohort_id, gene, trait_id, rs_ids, p_value_max, limit, call_state, clinvar, brava):
|
|
99
107
|
"""
|
|
100
108
|
Genotype the SNPs of GWAS Catalog associations in a sample.
|
|
101
109
|
|
|
102
110
|
Selects associations by --gene, --trait-id and/or --rs (at least one required),
|
|
103
111
|
genotypes their SNP positions in the sample, and attaches the matching GWAS
|
|
104
|
-
associations to each result. Combine with --clinvar to also attach
|
|
112
|
+
associations to each result. Combine with --clinvar or --brava to also attach
|
|
113
|
+
ClinVar or BRaVa annotations.
|
|
105
114
|
"""
|
|
106
115
|
if not (gene or trait_id or rs_ids):
|
|
107
116
|
raise click.UsageError("Provide at least one of --gene, --trait-id or --rs.")
|
|
@@ -118,7 +127,60 @@ def gwas(sample_ids, cohort_id, gene, trait_id, rs_ids, p_value_max, limit, call
|
|
|
118
127
|
sample_ids=list(sample_ids),
|
|
119
128
|
targets=[VariantTargetSchema(target)],
|
|
120
129
|
filters=VariantFilterSchema(call_state=call_state),
|
|
121
|
-
selectors=_selectors(clinvar, gwas=True),
|
|
130
|
+
selectors=_selectors(clinvar, gwas=True, brava=brava),
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
return client.variant.get_variant(cohort_id, request)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@variant.command()
|
|
137
|
+
@click.argument("cohort_id", type=str)
|
|
138
|
+
@click.option("--sample", "-s", "sample_ids", type=str, multiple=True, required=True, help="Sample ID (repeatable)")
|
|
139
|
+
@click.option("--trait", type=str, default=None, help="BRaVa trait code (e.g. AFib)")
|
|
140
|
+
@click.option("--gene", type=str, default=None, help="HGNC gene symbol (e.g. PCSK9)")
|
|
141
|
+
@click.option(
|
|
142
|
+
"--p-value-max",
|
|
143
|
+
type=click.FloatRange(min=0, max=1, min_open=True),
|
|
144
|
+
default=None,
|
|
145
|
+
help="Select only variants with an association p-value <= this (attachments still list all of the variant's associations)",
|
|
146
|
+
)
|
|
147
|
+
@click.option(
|
|
148
|
+
"--limit",
|
|
149
|
+
type=click.IntRange(min=1, max=1000),
|
|
150
|
+
default=100,
|
|
151
|
+
help="Max variants to resolve (most significant first)",
|
|
152
|
+
)
|
|
153
|
+
@click.option("--call-state", type=click.Choice(["called", "all"]), default="called", help="Filter by call state")
|
|
154
|
+
@click.option("--clinvar", is_flag=True, default=False, help="Also include ClinVar annotations")
|
|
155
|
+
@click.option("--gwas", is_flag=True, default=False, help="Also include GWAS Catalog annotations")
|
|
156
|
+
def brava(sample_ids, cohort_id, trait, gene, p_value_max, limit, call_state, clinvar, gwas):
|
|
157
|
+
"""
|
|
158
|
+
Genotype the variants of BRaVa rare-variant associations in a sample.
|
|
159
|
+
|
|
160
|
+
Selects variant associations by --trait and/or --gene (at least one required),
|
|
161
|
+
genotypes those variants in the sample, and attaches the matching BRaVa
|
|
162
|
+
associations to each result. Combine with --clinvar or --gwas to also attach
|
|
163
|
+
ClinVar or GWAS Catalog annotations.
|
|
164
|
+
"""
|
|
165
|
+
trait = (trait or "").strip() or None
|
|
166
|
+
gene = (gene or "").strip() or None
|
|
167
|
+
if not (trait or gene):
|
|
168
|
+
raise click.UsageError("Provide at least one of --trait or --gene.")
|
|
169
|
+
if p_value_max is not None and math.isnan(p_value_max):
|
|
170
|
+
raise click.BadParameter("must be a number greater than 0 and at most 1.", param_hint="--p-value-max")
|
|
171
|
+
|
|
172
|
+
target = BravaTargetSchema(
|
|
173
|
+
trait=trait,
|
|
174
|
+
gene=gene,
|
|
175
|
+
p_value_max=p_value_max,
|
|
176
|
+
limit=limit,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
request = GetVariantRequest(
|
|
180
|
+
sample_ids=list(sample_ids),
|
|
181
|
+
targets=[VariantTargetSchema(target)],
|
|
182
|
+
filters=VariantFilterSchema(call_state=call_state),
|
|
183
|
+
selectors=_selectors(clinvar, gwas, brava=True),
|
|
122
184
|
)
|
|
123
185
|
|
|
124
186
|
return client.variant.get_variant(cohort_id, request)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from haplohub import GetSampleGenotypesResponse
|
|
2
|
+
from rich.table import Table
|
|
3
|
+
|
|
4
|
+
from haplohub_cli.formatters.decorators import register
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@register(GetSampleGenotypesResponse)
|
|
8
|
+
def format_sample_genotypes(data: GetSampleGenotypesResponse):
|
|
9
|
+
if not data.available:
|
|
10
|
+
caption = "No raw genotypes for this sample: not a SNP-array upload, still loading, or the load failed."
|
|
11
|
+
elif data.not_found:
|
|
12
|
+
caption = f"Not on the array: {', '.join(data.not_found)}"
|
|
13
|
+
else:
|
|
14
|
+
caption = None
|
|
15
|
+
table = Table(title="Raw genotypes", caption=caption)
|
|
16
|
+
for column in ("rsID", "Genotype", "Chrom", "Position (GRCh38)", "Ref", "Alt", "Dosage"):
|
|
17
|
+
# Wrap rather than cut: a truncated rsID or position reads as a different one.
|
|
18
|
+
table.add_column(column, overflow="fold")
|
|
19
|
+
|
|
20
|
+
for item in data.items:
|
|
21
|
+
genotype = item.genotype or "[dim]no-call[/dim]"
|
|
22
|
+
if not item.variants:
|
|
23
|
+
table.add_row(item.rs_id, genotype, "", "", "", "", "")
|
|
24
|
+
for i, variant in enumerate(item.variants):
|
|
25
|
+
table.add_row(
|
|
26
|
+
item.rs_id if i == 0 else "",
|
|
27
|
+
genotype if i == 0 else "",
|
|
28
|
+
variant.chromosome,
|
|
29
|
+
str(variant.position_38),
|
|
30
|
+
variant.reference,
|
|
31
|
+
", ".join(variant.alternates),
|
|
32
|
+
"" if variant.dosage is None else str(variant.dosage),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return table
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from types import SimpleNamespace
|
|
2
|
+
from unittest import TestCase
|
|
3
|
+
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
|
|
6
|
+
from haplohub_cli.formatters.genotype import format_sample_genotypes
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def render(data, width=200) -> str:
|
|
10
|
+
console = Console(width=width, record=True)
|
|
11
|
+
console.print(format_sample_genotypes(data))
|
|
12
|
+
return console.export_text()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def placement(**fields):
|
|
16
|
+
return SimpleNamespace(
|
|
17
|
+
**{"chromosome": "22", "position_38": 15925391, "reference": "T", "alternates": ["A", "C"], "dosage": 2, **fields}
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class FormatSampleGenotypesTestCase(TestCase):
|
|
22
|
+
def test_lists_calls_with_placements_and_missing_rsids(self):
|
|
23
|
+
data = SimpleNamespace(
|
|
24
|
+
items=[
|
|
25
|
+
SimpleNamespace(rs_id="rs738829", genotype="CC", variants=[placement()]),
|
|
26
|
+
SimpleNamespace(rs_id="rs2", genotype=None, variants=[]),
|
|
27
|
+
],
|
|
28
|
+
available=True,
|
|
29
|
+
not_found=["rs404"],
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
output = render(data)
|
|
33
|
+
|
|
34
|
+
self.assertIn("rs738829", output)
|
|
35
|
+
self.assertIn("15925391", output)
|
|
36
|
+
self.assertIn("A, C", output)
|
|
37
|
+
self.assertIn("no-call", output)
|
|
38
|
+
self.assertIn("Not on the array: rs404", output)
|
|
39
|
+
|
|
40
|
+
def test_zero_dosage_is_shown_and_unknown_dosage_is_blank(self):
|
|
41
|
+
data = SimpleNamespace(
|
|
42
|
+
items=[
|
|
43
|
+
SimpleNamespace(rs_id="rs1", genotype="TT", variants=[placement(dosage=0)]),
|
|
44
|
+
SimpleNamespace(rs_id="rs3", genotype="DI", variants=[placement(dosage=None)]),
|
|
45
|
+
],
|
|
46
|
+
available=True,
|
|
47
|
+
not_found=[],
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
rows = [line for line in render(data).splitlines() if "rs1 " in line or "rs3 " in line]
|
|
51
|
+
|
|
52
|
+
self.assertIn(" 0 ", rows[0])
|
|
53
|
+
self.assertNotRegex(rows[1], r"\s\d\s+│$")
|
|
54
|
+
|
|
55
|
+
def test_narrow_terminal_wraps_instead_of_truncating(self):
|
|
56
|
+
data = SimpleNamespace(
|
|
57
|
+
items=[SimpleNamespace(rs_id="rs738829", genotype="CC", variants=[placement()])], available=True, not_found=[]
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
output = render(data, width=60)
|
|
61
|
+
|
|
62
|
+
self.assertNotIn("…", output)
|
|
63
|
+
|
|
64
|
+
def test_says_when_the_sample_has_no_raw_genotypes(self):
|
|
65
|
+
output = render(SimpleNamespace(items=[], available=False, not_found=["rs1"]))
|
|
66
|
+
|
|
67
|
+
self.assertIn(
|
|
68
|
+
"No raw genotypes for this sample: not a SNP-array upload, still loading, or the load failed.",
|
|
69
|
+
" ".join(output.split()),
|
|
70
|
+
)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from types import SimpleNamespace
|
|
2
|
+
from unittest import TestCase
|
|
3
|
+
|
|
4
|
+
from haplohub_cli.formatters.variant import _format_annotations
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class FormatAnnotationsTestCase(TestCase):
|
|
8
|
+
def test_counts_each_source(self):
|
|
9
|
+
attachments = SimpleNamespace(clinvar=[object()], gwas=[object()] * 5, brava=[object()] * 2)
|
|
10
|
+
|
|
11
|
+
self.assertEqual(_format_annotations(attachments), "clinvar:1 gwas:5 brava:2")
|
|
12
|
+
|
|
13
|
+
def test_brava_only(self):
|
|
14
|
+
attachments = SimpleNamespace(clinvar=None, gwas=[], brava=[object()])
|
|
15
|
+
|
|
16
|
+
self.assertEqual(_format_annotations(attachments), "brava:1")
|
|
17
|
+
|
|
18
|
+
def test_no_attachments(self):
|
|
19
|
+
self.assertEqual(_format_annotations(None), "")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class FormatVariantResultsTestCase(TestCase):
|
|
23
|
+
def _item(self, target):
|
|
24
|
+
variant = SimpleNamespace(accession="chr13", position=101, reference="A", alternate=["G", "T"], quality=None)
|
|
25
|
+
sample = SimpleNamespace(sample_id="smp-1", is_called=True, dosage=1)
|
|
26
|
+
return SimpleNamespace(error_message=None, target=target, variant=variant, samples=[sample], attachments=None)
|
|
27
|
+
|
|
28
|
+
def _target_cell(self, target):
|
|
29
|
+
from haplohub_cli.formatters.variant import format_variant_results
|
|
30
|
+
|
|
31
|
+
table = format_variant_results(SimpleNamespace(items=[self._item(target)]))
|
|
32
|
+
return table.columns[0]._cells[0]
|
|
33
|
+
|
|
34
|
+
def test_brava_row_shows_the_counted_allele(self):
|
|
35
|
+
target = SimpleNamespace(type="brava", input="trait=AFib", resolved="chr13:101:A>T")
|
|
36
|
+
|
|
37
|
+
self.assertEqual(self._target_cell(target), "chr13:101:A>T")
|
|
38
|
+
|
|
39
|
+
def test_other_rows_keep_the_input(self):
|
|
40
|
+
target = SimpleNamespace(type="region", input="chr13:101", resolved="chr13:101:A>T")
|
|
41
|
+
|
|
42
|
+
self.assertEqual(self._target_cell(target), "chr13:101")
|
|
@@ -32,12 +32,15 @@ def format_variant_results(data: GetVariantResponse):
|
|
|
32
32
|
alternate = ", ".join(variant.alternate) if variant and variant.alternate else ""
|
|
33
33
|
quality = f"{variant.quality:.4f}" if variant and variant.quality is not None else ""
|
|
34
34
|
annotations = _format_annotations(item.attachments)
|
|
35
|
+
# A BRaVa target counts one allele (chr:pos:ref>alt in `resolved`); show it, since the
|
|
36
|
+
# Alt column lists every ALT of a multi-allelic record.
|
|
37
|
+
target_label = item.target.resolved if item.target.type == "brava" and item.target.resolved else item.target.input
|
|
35
38
|
|
|
36
39
|
if not samples:
|
|
37
|
-
table.add_row(
|
|
40
|
+
table.add_row(target_label, accession, position, reference, alternate, quality, "", "", "", annotations)
|
|
38
41
|
else:
|
|
39
42
|
for i, sample in enumerate(samples):
|
|
40
|
-
target_col =
|
|
43
|
+
target_col = target_label if i == 0 else ""
|
|
41
44
|
acc_col = accession if i == 0 else ""
|
|
42
45
|
pos_col = position if i == 0 else ""
|
|
43
46
|
ref_col = reference if i == 0 else ""
|
|
@@ -56,11 +59,11 @@ def format_variant_results(data: GetVariantResponse):
|
|
|
56
59
|
|
|
57
60
|
|
|
58
61
|
def _format_annotations(attachments) -> str:
|
|
59
|
-
"""Summarize per-source attachment counts, e.g. "clinvar:1 gwas:5"."""
|
|
62
|
+
"""Summarize per-source attachment counts, e.g. "clinvar:1 gwas:5 brava:2"."""
|
|
60
63
|
if attachments is None:
|
|
61
64
|
return ""
|
|
62
65
|
parts = []
|
|
63
|
-
for source in ("clinvar", "gwas"):
|
|
66
|
+
for source in ("clinvar", "gwas", "brava"):
|
|
64
67
|
rows = getattr(attachments, source, None) or []
|
|
65
68
|
if rows:
|
|
66
69
|
parts.append(f"{source}:{len(rows)}")
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: haplohub-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: HaploHub Command Line Interface
|
|
5
5
|
Author-email: Mike Polcari <mike@haplotype-labs.com>, Ilya Khrustalev <ilya@haplotype-labs.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Requires-Dist: certifi>=2026.10.19
|
|
9
9
|
Requires-Dist: click>=8.1.8
|
|
10
|
-
Requires-Dist: haplohub<4,>=3.
|
|
10
|
+
Requires-Dist: haplohub<4,>=3.10.0
|
|
11
11
|
Requires-Dist: pendulum>=3.0.0
|
|
12
12
|
Requires-Dist: requests>=2.32.0
|
|
13
13
|
Requires-Dist: rich>=13.9.4
|
|
@@ -50,9 +50,11 @@ haplohub_cli/commands/cohort/member/__init__.py
|
|
|
50
50
|
haplohub_cli/commands/cohort/member/report.py
|
|
51
51
|
haplohub_cli/commands/cohort/tests/__init__.py
|
|
52
52
|
haplohub_cli/commands/cohort/tests/test_delete.py
|
|
53
|
+
haplohub_cli/commands/cohort/tests/test_genotypes.py
|
|
53
54
|
haplohub_cli/commands/metadata/__init__.py
|
|
54
55
|
haplohub_cli/commands/tests/__init__.py
|
|
55
56
|
haplohub_cli/commands/tests/test_file.py
|
|
57
|
+
haplohub_cli/commands/tests/test_variant.py
|
|
56
58
|
haplohub_cli/config/__init__.py
|
|
57
59
|
haplohub_cli/config/config.py
|
|
58
60
|
haplohub_cli/config/config_manager.py
|
|
@@ -79,10 +81,13 @@ haplohub_cli/formatters/file.py
|
|
|
79
81
|
haplohub_cli/formatters/formatter_registry.py
|
|
80
82
|
haplohub_cli/formatters/generic.py
|
|
81
83
|
haplohub_cli/formatters/generic_table.py
|
|
84
|
+
haplohub_cli/formatters/genotype.py
|
|
82
85
|
haplohub_cli/formatters/utils.py
|
|
83
86
|
haplohub_cli/formatters/variant.py
|
|
84
87
|
haplohub_cli/formatters/tests/__init__.py
|
|
85
88
|
haplohub_cli/formatters/tests/test_generic_table.py
|
|
89
|
+
haplohub_cli/formatters/tests/test_genotype.py
|
|
90
|
+
haplohub_cli/formatters/tests/test_variant.py
|
|
86
91
|
haplohub_cli/tests/__init__.py
|
|
87
92
|
haplohub_cli/tests/test_cli.py
|
|
88
93
|
haplohub_cli/types/__init__.py
|
|
@@ -35,12 +35,14 @@
|
|
|
35
35
|
"haplohub_cli/commands/cohort/sample.py",
|
|
36
36
|
"haplohub_cli/commands/cohort/tests/__init__.py",
|
|
37
37
|
"haplohub_cli/commands/cohort/tests/test_delete.py",
|
|
38
|
+
"haplohub_cli/commands/cohort/tests/test_genotypes.py",
|
|
38
39
|
"haplohub_cli/commands/config.py",
|
|
39
40
|
"haplohub_cli/commands/file.py",
|
|
40
41
|
"haplohub_cli/commands/login.py",
|
|
41
42
|
"haplohub_cli/commands/metadata/__init__.py",
|
|
42
43
|
"haplohub_cli/commands/tests/__init__.py",
|
|
43
44
|
"haplohub_cli/commands/tests/test_file.py",
|
|
45
|
+
"haplohub_cli/commands/tests/test_variant.py",
|
|
44
46
|
"haplohub_cli/commands/variant.py",
|
|
45
47
|
"haplohub_cli/commands/version.py",
|
|
46
48
|
"haplohub_cli/config/__init__.py",
|
|
@@ -69,8 +71,11 @@
|
|
|
69
71
|
"haplohub_cli/formatters/formatter_registry.py",
|
|
70
72
|
"haplohub_cli/formatters/generic.py",
|
|
71
73
|
"haplohub_cli/formatters/generic_table.py",
|
|
74
|
+
"haplohub_cli/formatters/genotype.py",
|
|
72
75
|
"haplohub_cli/formatters/tests/__init__.py",
|
|
73
76
|
"haplohub_cli/formatters/tests/test_generic_table.py",
|
|
77
|
+
"haplohub_cli/formatters/tests/test_genotype.py",
|
|
78
|
+
"haplohub_cli/formatters/tests/test_variant.py",
|
|
74
79
|
"haplohub_cli/formatters/utils.py",
|
|
75
80
|
"haplohub_cli/formatters/variant.py",
|
|
76
81
|
"haplohub_cli/settings.py",
|
|
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
|
{haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/commands/algorithm/result/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haplohub_cli-3.2.2 → haplohub_cli-3.4.0}/haplohub_cli/formatters/tests/test_generic_table.py
RENAMED
|
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
|