Skip to content

A value in x_new is above the interpolation range's maximum value #246

@michaeljon

Description

@michaeljon

Left this on the associated PR without realizing it was PR.

#205

hcov-229e.zip

I have a case where this is 100% reproducible and it may be completely my fault. This is a small sample of sequences within a small time window (jan - may 2020).

The error looks like

6.67    ###TreeTime.run: ITERATION 2 out of 2 iterations
Traceback (most recent call last):
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/treetime.py", line 57, in run
    return self._run(**kwargs)
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/treetime.py", line 332, in _run
    self.calc_rate_susceptibility(params=tt_kwargs)
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/clock_tree.py", line 874, in calc_rate_susceptibility
    self.make_time_tree(**params)
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/clock_tree.py", line 376, in make_time_tree
    self._ml_t_joint()
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/clock_tree.py", line 448, in _ml_t_joint
    msgs_to_multiply.append(self.merger_model.node_contribution(node, time_points))
  File "/home/michaeljon/.local/lib/python3.10/site-packages/treetime/merger_models.py", line 239, in node_contribution
    y = (self.integral_merger_rate(t) - np.log(self.total_merger_rate(t)))*multiplicity
  File "/home/michaeljon/.local/lib/python3.10/site-packages/scipy/interpolate/_polyint.py", line 80, in __call__
    y = self._evaluate(x)
  File "/home/michaeljon/.local/lib/python3.10/site-packages/scipy/interpolate/_interpolate.py", line 752, in _evaluate
    below_bounds, above_bounds = self._check_bounds(x_new)
  File "/home/michaeljon/.local/lib/python3.10/site-packages/scipy/interpolate/_interpolate.py", line 786, in _check_bounds
    raise ValueError("A value ({}) in x_new is above "
ValueError: A value (10034530945.479671) in x_new is above the interpolation range's maximum value (10000000000.0).

ERROR: A value (10034530945.479671) in x_new is above the interpolation range's maximum value (10000000000.0). 
 
ERROR in TreeTime.run: An error occurred which was not properly handled in TreeTime. If this error persists, please let us know by filing a new issue including the original command and the error above at: https://github.com/neherlab/treetime/issues 

ERROR from TreeTime: An error occurred in TreeTime (see above). This may be due to an issue with TreeTime or Augur.
Please report you are calling TreeTime via Augur.

Using this as the command

    augur refine \
        --tree ${VIRUS}/${VIRUS}-raw.nwk \
        --alignment ${VIRUS}/${VIRUS}-aligned.fasta \
        --metadata ${VIRUS}-metadata.tsv \
        --output-tree ${VIRUS}/${VIRUS}.nwk \
        --output-node-data ${VIRUS}/${VIRUS}-branch_lengths.json \
        --timetree \
        --coalescent opt \
        --date-confidence \
        --date-inference marginal \
        --clock-filter-iqd 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions