Roth-Lab/pyclone-vi

RuntimeWarning on write-results-file, all cellular_prevalence = 1

Closed this issue · 2 comments

Hi,

Thanks for the python3 pyclone, much faster than previous and nice to have on py3.

Wanted to ask about results from a primary/metastases case where I get cellular_prevalence of 1 for every mutation in every sample, and all assigned to cluster_id of 0.

pyclone-vi write-results-file     -i OVBM_test.pyclone-vi-fit.h5 -o OVBM_test.pyclone-vi-fit.tsv

post_process.py:63: RuntimeWarning: invalid value encountered in sqrt
  std = np.sqrt(var)

Presume (/hope) that the warning has something to do with the results that are written(?)

Appreciate any feedback you can give me.

Thanks,

Bruce

Hi Bruce,

Yes, it is likely an error writing the output. In some cases I believe the variational posterior is very peaked at a single value, so computing the variance becomes undefined or numerically unstable. It is related to this bug #3.

Hopefully I can get a fix soon. But it should not affect much, as the error would be in the confidence intervals not the means of cellular prevalence estimates. Clustering should also be fine.

Cheers,
Andy

Hi Andy,

thanks for getting back to me.

I get the same error with original PyClone on the same data, but PyClone gives 13 clusters (although majority are size only 1 or 2), whereas pyclone-vi gives 1 cluster.

Bruce