Skip to content

Commit

Permalink
fixes multi-release cohort issue and adds test
Browse files Browse the repository at this point in the history
  • Loading branch information
cclarkson committed Oct 22, 2021
1 parent f88b1bd commit e163562
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions malariagen_data/ag3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_ag3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit e163562

Please sign in to comment.