From bb1db8670ddf1028bfb9c6b1cf217bfcceaf93b7 Mon Sep 17 00:00:00 2001 From: smlmbrt Date: Fri, 15 Dec 2023 15:41:13 +0000 Subject: [PATCH] Make sure that IID isn't converted to numeric during aggreation Signed-off-by: smlmbrt --- pgscatalog_utils/aggregate/aggregate_scores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgscatalog_utils/aggregate/aggregate_scores.py b/pgscatalog_utils/aggregate/aggregate_scores.py index aa1de89..d57943d 100644 --- a/pgscatalog_utils/aggregate/aggregate_scores.py +++ b/pgscatalog_utils/aggregate/aggregate_scores.py @@ -33,7 +33,7 @@ def aggregate(scorefiles: list[str]): for i, path in enumerate(scorefiles): logger.debug(f"Reading {path}") # pandas can automatically detect zst compression, neat! - df = (pd.read_table(path) + df = (pd.read_table(path, converters={"#IID": str}, header=0) .assign(sampleset=path.split('_')[0]) .set_index(['sampleset', '#IID']))