From e16356272e3bc095ef25dbfaea50aeccb53f279b Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 22 Oct 2021 16:31:20 +0100 Subject: [PATCH 1/3] fixes multi-release cohort issue and adds test --- malariagen_data/ag3.py | 4 +--- tests/test_ag3.py | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/malariagen_data/ag3.py b/malariagen_data/ag3.py index 4083db977..a8e337051 100644 --- a/malariagen_data/ag3.py +++ b/malariagen_data/ag3.py @@ -1997,9 +1997,7 @@ def sample_cohorts(self, sample_sets="v3_wild", cohorts_analysis="20210927"): else: # concatenate multiple sample sets dfs = [ - self._read_cohort_metadata( - sample_set=c, cohorts_analysis=cohorts_analysis - ) + self.sample_cohorts(sample_sets=c, cohorts_analysis=cohorts_analysis) for c in sample_sets ] df = pandas.concat(dfs, axis=0, sort=False).reset_index(drop=True) diff --git a/tests/test_ag3.py b/tests/test_ag3.py index 5e45fd3bd..ec02eab94 100644 --- a/tests/test_ag3.py +++ b/tests/test_ag3.py @@ -1161,7 +1161,8 @@ def test_haplotypes(sample_sets, contig, analysis): # test v3 sample sets @pytest.mark.parametrize( - "sample_sets", ["v3_wild", "v3", "AG1000G-UG", ["AG1000G-AO", "AG1000G-FR"]] + "sample_sets", + ["v3_wild", "v3", ["v3_wild", "v3"], "AG1000G-UG", ["AG1000G-AO", "AG1000G-FR"]], ) def test_sample_cohorts(sample_sets): expected_cols = ( From 3edd8d74b265940456cbed75b4b071e47d6ccb14 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 22 Oct 2021 16:52:30 +0100 Subject: [PATCH 2/3] doc changes for release --- README.md | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5cda55016..4a42918d9 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,10 @@ $ poetry publish ## Release notes +### 0.12.1 + +* Bug fix to Ag3.sample_cohorts() + ### 0.12.0 * Updates default cohort parameter to latest analysis (20210927). diff --git a/pyproject.toml b/pyproject.toml index 7760c4c35..d2b69d229 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "malariagen_data" -version = "0.12.0" +version = "0.12.1" description = "A package for accessing MalariaGEN public data." authors = ["Alistair Miles ", "Chris Clarkson "] license = "MIT" From 875ff6b0a6c6b5a47ce0021b39499ca6bf94aa5f Mon Sep 17 00:00:00 2001 From: Chris Clarkson Date: Fri, 22 Oct 2021 18:26:20 +0100 Subject: [PATCH 3/3] Update README.md Co-authored-by: Alistair Miles --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a42918d9..b0e2b3cc7 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ $ poetry publish ### 0.12.1 -* Bug fix to Ag3.sample_cohorts() +* Bug fix to `Ag3.sample_cohorts()`. ### 0.12.0