Skip to content

Commit

Permalink
Update test_export.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danrlu authored Sep 10, 2024
1 parent efb7012 commit e9031fa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/backend/aspen/workflows/nextstrain_run/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def test_targeted_config_simple(mocker, session, postgres_database, split_client
subsampling_scheme = nextstrain_config["subsampling"][tree_type.value]

# Just some placeholder sanity-checks
assert subsampling_scheme["closest"]["max_sequences"] == 100
assert subsampling_scheme["closest"]["max_sequences"] == 250
assert subsampling_scheme["group"]["max_sequences"] == 50
assert subsampling_scheme["state"]["max_sequences"] == 50
assert subsampling_scheme["country"]["max_sequences"] == 25
Expand Down Expand Up @@ -430,7 +430,7 @@ def test_targeted_config_regions(mocker, session, postgres_database, split_clien
)

# Just some placeholder sanity-checks
assert subsampling_scheme["closest"]["max_sequences"] == 100
assert subsampling_scheme["closest"]["max_sequences"] == 250
assert subsampling_scheme["group"]["max_sequences"] == 50
assert subsampling_scheme["international"]["max_sequences"] == 100
assert len(selected.splitlines()) == 10 # 5 gisaid samples + 5 selected samples
Expand Down Expand Up @@ -468,18 +468,18 @@ def test_targeted_config_large(mocker, session, postgres_database, split_client)
mock_remote_db_uri(mocker, postgres_database.as_uri())

tree_type = TreeType.TARGETED
phylo_run = create_test_data(session, split_client, tree_type, 200, 110, 10)
phylo_run = create_test_data(session, split_client, tree_type, 200, 270, 10)
sequences, selected, metadata, nextstrain_config = generate_run(phylo_run.id)

subsampling_scheme = nextstrain_config["subsampling"][tree_type.value]

# Just some placeholder sanity-checks
assert subsampling_scheme["closest"]["max_sequences"] == 120
assert subsampling_scheme["group"]["max_sequences"] == 60
assert subsampling_scheme["state"]["max_sequences"] == 60
assert subsampling_scheme["country"]["max_sequences"] == 30
assert subsampling_scheme["international"]["max_sequences"] == 30
assert len(selected.splitlines()) == 120 # 10 gisaid samples + 110 selected samples
assert subsampling_scheme["closest"]["max_sequences"] == 280
assert subsampling_scheme["group"]["max_sequences"] == 140
assert subsampling_scheme["state"]["max_sequences"] == 140
assert subsampling_scheme["country"]["max_sequences"] == 70
assert subsampling_scheme["international"]["max_sequences"] == 70
assert len(selected.splitlines()) == 280 # 10 gisaid samples + 270 selected samples
assert len(metadata.splitlines()) == 201 # 200 samples + 1 header line
assert len(sequences.splitlines()) == 400 # 200 county samples, @2 lines each

Expand Down

0 comments on commit e9031fa

Please sign in to comment.