about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-09-06 14:10:52 +0100
committerArun Isaac2025-09-06 14:10:52 +0100
commit486c8c0d0acfe7b378933c277c2fecf82ae3aac2 (patch)
tree98c66ae45c3b6199ea9fa2939cca851923c08b0e
parentd60a45e13f8d95d41da19ff2cf0e7634e874ef69 (diff)
downloadpyhegp-486c8c0d0acfe7b378933c277c2fecf82ae3aac2.tar.gz
pyhegp-486c8c0d0acfe7b378933c277c2fecf82ae3aac2.tar.lz
pyhegp-486c8c0d0acfe7b378933c277c2fecf82ae3aac2.zip
Split catenable phenotype frames along the index.
Phenotype frames are split by sample IDs. This corresponds to
splitting along the index, unlike genotype frames which need to be
split along the columns.
-rw-r--r--tests/test_pyhegp.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_pyhegp.py b/tests/test_pyhegp.py
index c00a4c8..61bf3a1 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
+from pytest import approx, mark
 
 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
@@ -195,14 +195,9 @@ def test_cat_genotype(genotypes):
 @st.composite
 def catenable_phenotype_frames(draw):
     phenotype = draw(phenotype_frames())
-    metadata = phenotype[list(filter(is_phenotype_metadata_column,
-                                     phenotype.columns))]
-    data = phenotype[list(filter(negate(is_phenotype_metadata_column),
-                                 phenotype.columns))]
-    return ([phenotype]
-            + [pd.concat((metadata, df), axis="columns")
-               for df in split_data_frame(draw, data, axis="columns")])
+    return [phenotype] + split_data_frame(draw, phenotype)
 
+@mark.xfail
 @given(catenable_phenotype_frames())
 def test_cat_phenotype(phenotypes):
     complete_phenotype, *split_phenotypes = phenotypes