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

Error on running background probability calculation #25

Open
idmehta opened this issue Jan 25, 2024 · 1 comment
Open

Error on running background probability calculation #25

idmehta opened this issue Jan 25, 2024 · 1 comment

Comments

@idmehta
Copy link

idmehta commented Jan 25, 2024

In R, when running the discover.matrix() function on a binarised alteration matrix:
D <- discover.matrix(M)

We obtain an output, but receive the following error:

ABNORMAL_TERMINATION_IN_LNSRCH

Line search cannot locate an adequate point after 20 function
and gradient evaluations. Previous x, f and g restored.
Possible causes: 1 error in function or gradient evaluation;
2 rounding error dominate computation.

What does this mean and are we able to trust the output of the function in this case? This error only appears when running discover.matrix on specific binarised alteration matrices. We are unsure what characteristics of the binarised alteration matrix are resulting in this error.

Please find an anonymised binarised alteration matrix which reproduces this error message.
binarise_alteration_matrix_with_error.csv

@scanisius
Copy link
Member

The likely cause of the error you're seeing is the large numbers of genes without any mutation in your matrix. Normally this message is pretty harmless. One way to check if you can trust the output is the following:

summary(rowSums(D$events) - rowSums(D$bg))
#       Min.    1st Qu.     Median       Mean    3rd Qu.       Max.
# -5.526e-05  0.000e+00  0.000e+00 -8.280e-09  0.000e+00  2.360e-05

These differences between observed and expected mutations should be close to zero, which is the case for the matrix you attached.

A way to avoid this message altogether is to exclude genes with no mutations. This will not affect the results of your analyses, since genes without mutations do not contribute to the estimation of the background model.

D2 <- discover.matrix(M[rowSums(M) > 0, ])

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