Skip to content

Commit

Permalink
Include Puerto Rico when filtering Nextstrain metadata
Browse files Browse the repository at this point in the history
Adding Puerto Rico to the US state filter per the WIP variant
nowcast hub guidelines
https://github.com/reichlab/variant-nowcast-hub/pull/39/files#r1759244751
  • Loading branch information
bsweger committed Sep 16, 2024
1 parent 4e1da08 commit 86530eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/virus_clade_utils/util/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def filter_covid_genome_metadata(metadata: pl.LazyFrame, cols: list = []) -> pl.

# There are some other odd divisions in the data, but these are 50 states and DC
states = [state.name for state in us.states.STATES]
states.append("Washington DC")
states.extend(["Washington DC", "Puerto Rico"])

# Filter dataset and do some general tidying
filtered_metadata = (
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test_metadata.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ghi ghi.4 i ❤️ wombats 2024-09-22 Homo sapiens USA Utah BB Cardassia hummus
jkl jkl.1 i ❤️ wombats 2024-09-22 Homo sapiens USA Utah CC Bajor hummus a tune
mno mno.1 i ❤️ wombats 2024-09-22 Homo sapiens Canada Mississippi FF Earth hummus a tune
mno mno.1 i ❤️ wombats 2024-09-22 marmots USA Massachusetts FF Cardassia hummus a tune
mno mno.1 i ❤️ wombats 2024-09-22 Homo sapiens USA Puerto Rico FF Bajor hummus a tune
mno mno.1 i ❤️ wombats 2024-09-22 Homo sapiens USA Guam FF Bajor hummus a tune
2 changes: 1 addition & 1 deletion tests/unit/test_get_clade_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_file_path() -> Path:
(0.1, 3, 9, ["AA", "AA.ZZ", "BB", "CC", "DD", "EE", "FF"]),
(0.3, 3, 9, ["AA", "AA.ZZ", "EE"]),
(0.1, 2, 9, ["AA.ZZ", "AA", "BB", "CC", "DD", "EE", "FF"]),
(0.1, 1, 9, ["AA", "BB", "CC", "FF"]),
(0.1, 1, 9, ["AA", "BB", "CC", "DD", "FF"]),
(0.3, 1, 9, ["AA"]),
(0.1, 3, 4, ["AA", "AA.ZZ", "BB", "CC"]),
(0.3, 3, 2, ["AA", "AA.ZZ"]),
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/util/test_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_filter_covid_genome_metadata():
"date": ["2022-01-01", "2022-01-02", "2022-01-03", "2023-12-25", None, "2023-12-27"],
"host": ["Homo sapiens", "Homo sapiens", "Homo sapiens", "Narwhals", "Homo sapiens", "Homo sapiens"],
"country": ["USA", "Argentina", "USA", "USA", "USA", "USA"],
"division": ["Alaska", "Maine", "Puerto Rico", "Massachusetts", "Utah", "Pennsylvania"],
"division": ["Alaska", "Maine", "Guam", "Puerto Rico", "Utah", "Pennsylvania"],
"clade_nextstrain": ["AAA", "BBB", "CCC", "DDD", "EEE", "FFF"],
"location": ["Vulcan", "Reisa", "Bajor", "Deep Space 9", "Earth", "Cardassia"],
"genbank_accession": ["A1", "A2", "B1", "B2", "C1", "C2"],
Expand Down

0 comments on commit 86530eb

Please sign in to comment.