Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings with example data #58

Open
rpensch opened this issue Mar 29, 2022 · 1 comment
Open

Warnings with example data #58

rpensch opened this issue Mar 29, 2022 · 1 comment

Comments

@rpensch
Copy link

rpensch commented Mar 29, 2022

Hi, I have been trying to run PhylogicNDT with the example data as well a my own. Everything seems to work fine, but I am getting runtime warnings (from numpy?) that I can't really explain. I was hoping you might have an idea what is causing them and whether they would affect the output?

These are the warnings I get when using the example data:

/phylogicndt/Cluster/DpEngine.py:591: RuntimeWarning: divide by zero encountered in log
  t1 = sum((np.log(k_prob) * k_prob)[ix])
/phylogicndt/Cluster/DpEngine.py:591: RuntimeWarning: invalid value encountered in multiply
  t1 = sum((np.log(k_prob) * k_prob)[ix])

Edit: This happens both when I run it from the docker and when I install everything manually. I have also tried it on Linux/mac/windows systems. The command I run is the following, taken from the example runs you have provided:

./PhylogicNDT.py Cluster -i Test_Clust -s sample_00:ExampleData/ExampleSamples/MySimulation_0.txt::0.7:0 -s sample_01:ExampleData/ExampleSamples/MySimulation_1.txt::0.7:1 -s sample_02:ExampleData/ExampleSamples/MySimulation_2.txt::0.7:2 -s sample_03:ExampleData/ExampleSamples/MySimulation_3.txt::0.7:3

I did np.seterr(all='raise') and then I get a "FloatingPointError underflow encountered" in DpEngine.py in the function get_gamma_prior_from_k_prior(), specifically in k_prob = stats.gamma.pdf(k_0_map[:, 1], A, scale=1.0 / B) when A and/or B are large numbers.

Some more warnings with my own data:

/phylogicndt/utils/calc_ccf.py:99: RuntimeWarning: invalid value encountered in divide
  subc_ccf_hist /= sum(subc_ccf_hist)
/phylogicndt/Cluster/DpEngine.py:591: RuntimeWarning: divide by zero encountered in log
  t1 = sum((np.log(k_prob) * k_prob)[ix])
/phylogicndt/Cluster/DpEngine.py:591: RuntimeWarning: invalid value encountered in multiply
  t1 = sum((np.log(k_prob) * k_prob)[ix])
/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py:429: DataConversionWarning: Data with input dtype float128 was converted to float64 by the normalize function.
  warnings.warn(msg, _DataConversionWarning)
/phylogicndt/data/Patient.py:349: RuntimeWarning: invalid value encountered in greater
  if np.any(mut_coincidence > 0.):
/phylogicndt/BuildTree/Tree.py:277: RuntimeWarning: divide by zero encountered in log
  log_dist = np.log(dist, dtype=np.float64)
/phylogicndt/BuildTree/CellPopulationEngine.py:58: RuntimeWarning: divide by zero encountered in log
  log_dist = np.log(dist, dtype=np.float32)
@ipstone
Copy link

ipstone commented Oct 1, 2024

I am encountering the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants