Skip to content

Commit

Permalink
fix: enforce a "None" string instead of a Nonetype used for reference…
Browse files Browse the repository at this point in the history
… prep
  • Loading branch information
florianzwagemaker committed Jul 18, 2023
1 parent 4e24d93 commit f4f7490
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ViroConstrictor/workflow/match-ref.smk
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ def segmented_ref_groups(df: pd.DataFrame) -> pd.DataFrame:
"""
for index, row in df.iterrows():
# if the column "segmented" is False, then place a None in the segment column
# if the value in the "SEGMENTED" column is False then place a None string in the segment column.
# Ensure that the value is a string and not a NoneType.
if not row["SEGMENTED"]:
df.at[index, "segment"] = {None}
df.at[index, "segment"] = {"None"}
continue
refs = read_fasta(row["REFERENCE"])
unique_groups = {x.description.split(" ")[1].split("|")[0] for x in refs}
Expand Down

0 comments on commit f4f7490

Please sign in to comment.