Skip to content

Commit

Permalink
Merge pull request #39 from jbloom/fix-pivot-bug
Browse files Browse the repository at this point in the history
`pivot` and `var_names` incompatible in `VariantFrequencies`
  • Loading branch information
marlinfiggins authored Nov 8, 2024
2 parents 20a16b6 + ae469e1 commit 711b2cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evofr/data/variant_frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,20 @@ def __init__(
var_names:
optional list containing names of variants to be present.
The last of these variants is used as the pivot.
pivot:
optional name of variant to place last.
Defaults to "other" if present otherwise.
This will usually used as a reference or pivot strain.
Can only be used if you do not set `var_names`.
Returns
-------
VariantFrequencies
"""
if (pivot is not None) and (var_names is not None):
raise ValueError("cannot set both pivot and var_names")

# Get mapping from date to index
if date_to_index is None:
Expand Down

0 comments on commit 711b2cc

Please sign in to comment.