diff options
author | Arun Isaac | 2025-09-06 14:17:17 +0100 |
---|---|---|
committer | Arun Isaac | 2025-09-06 14:17:17 +0100 |
commit | e4b2baaac813757585e5027b26f23b39c1b24070 (patch) | |
tree | 509c4eaf25cb751a930973d49a012e6254414657 | |
parent | 486c8c0d0acfe7b378933c277c2fecf82ae3aac2 (diff) | |
download | pyhegp-e4b2baaac813757585e5027b26f23b39c1b24070.tar.gz pyhegp-e4b2baaac813757585e5027b26f23b39c1b24070.tar.lz pyhegp-e4b2baaac813757585e5027b26f23b39c1b24070.zip |
Catenate phenotype frames along the index.
-rw-r--r-- | pyhegp/pyhegp.py | 2 | ||||
-rw-r--r-- | tests/test_pyhegp.py | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/pyhegp/pyhegp.py b/pyhegp/pyhegp.py index cf9f88d..e93c62f 100644 --- a/pyhegp/pyhegp.py +++ b/pyhegp/pyhegp.py @@ -152,7 +152,7 @@ def cat_phenotype(phenotypes): return pd.DataFrame(data={"sample-id": []}, dtype="str") case _: - return cat_data_frames(phenotypes, ["sample-id"]) + return pd.concat(phenotypes) @click.group() def main(): diff --git a/tests/test_pyhegp.py b/tests/test_pyhegp.py index 61bf3a1..d119858 100644 --- a/tests/test_pyhegp.py +++ b/tests/test_pyhegp.py @@ -26,7 +26,7 @@ from hypothesis import given, strategies as st from hypothesis.extra.numpy import arrays, array_shapes import numpy as np import pandas as pd -from pytest import approx, mark +from pytest import approx from pyhegp.pyhegp import Stats, main, hegp_encrypt, hegp_decrypt, random_key, pool_stats, standardize, unstandardize, genotype_summary, encrypt_genotype, encrypt_phenotype, cat_genotype, cat_phenotype from pyhegp.serialization import Summary, read_summary, read_genotype, is_genotype_metadata_column, is_phenotype_metadata_column @@ -197,7 +197,6 @@ def catenable_phenotype_frames(draw): phenotype = draw(phenotype_frames()) return [phenotype] + split_data_frame(draw, phenotype) -@mark.xfail @given(catenable_phenotype_frames()) def test_cat_phenotype(phenotypes): complete_phenotype, *split_phenotypes = phenotypes |