Skip to content

Commit

Permalink
refine: Use METADATA_DATE_COLUMN literal
Browse files Browse the repository at this point in the history
It's best to have this value defined in one central place.
  • Loading branch information
victorlin committed Feb 7, 2024
1 parent ff44fe3 commit e13834d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions augur/refine.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from Bio import Phylo
from .dates import get_numerical_dates
from .dates.errors import InvalidYearBounds
from .io.metadata import DEFAULT_DELIMITERS, DEFAULT_ID_COLUMNS, InvalidDelimiter, read_metadata
from .io.metadata import DEFAULT_DELIMITERS, DEFAULT_ID_COLUMNS, METADATA_DATE_COLUMN, InvalidDelimiter, read_metadata
from .utils import read_tree, write_json, InvalidTreeError
from .errors import AugurError
from treetime.vcf_utils import read_vcf
Expand Down Expand Up @@ -236,8 +236,8 @@ def run(args):

# save input state string for later export
for n in T.get_terminals():
if n.name in metadata.index and 'date' in metadata.columns:
n.raw_date = metadata.at[n.name, 'date']
if n.name in metadata.index and METADATA_DATE_COLUMN in metadata.columns:
n.raw_date = metadata.at[n.name, METADATA_DATE_COLUMN]

if args.date_confidence:
time_inference_mode = 'always' if args.date_inference=='marginal' else 'only-final'
Expand Down

0 comments on commit e13834d

Please sign in to comment.