Skip to content

Commit

Permalink
fix: fix filtering for resistance mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
boasvdp committed Jan 26, 2024
1 parent 4cb2cbf commit 7d61cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workflow/scripts/filter_res_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def process_df(input_path: str, ab_column: str, output_path: str) -> None:
"""
Filter out table rows if these have NA/NaN in both RESISTANCE_AB and RESISTANCE_AB_CLASS columns
"""
df = pd.read_csv(input_path, sep="\t", dtype=str)
df = pd.read_csv(input_path, sep="\t", dtype=str, na_values=["-"])
filter_ab = ~df[ab_column].isna()
df = df[filter_ab]
df.to_csv(output_path, sep="\t", index=False)
Expand Down

0 comments on commit 7d61cff

Please sign in to comment.