Skip to content

uniroot error #8

@sashagusev

Description

@sashagusev

Hi, I'm getting an error when running SPACox on a matrix of 50k SNPs that looks like this:

Error in uniroot(K1_adj, c(-20, 20), extendInt = "upX", G2NB = G2NB, G2NA = G2NA,  : 
  no sign change found in 1000 iterations

I'm guessing this is a convergence issue from the uniroot call in GetProb_SPA. There's nothing unusual about this variant being tested (MAF or distribution) so I suspect this is just something sporadic about the optimization. However, the entire run crashes as a result and this happens in most of the batches, making it impossible to finish the analysis.

Is there some way a try/catch can be added around this call and NA's returned if the optimization fails?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions