Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Puerto Rico when filtering Nextstrain metadata #21

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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