steverozen / mSigHdp

GNU General Public License v3.0
4 stars 1 forks source link

Error in lower.to.upper.tri.inds(n) : 'n' must be >= 2 #3

Open itsvenu opened 2 years ago

itsvenu commented 2 years ago

Hi @steverozen,

Thanks a lot for the very useful package.

I was running msighdp on our data, however I got the following error which I'm unable to debug. Therefore, I was wondering if you could help with fixing the issue

code

test_spectra_res <- multi.chains.etc <- mSigHdp::RunHdpxParallel(input.catalog = test_spectra,
                                             seedNumber = 1234,
                                             out.dir = "test_res",
                                             K.guess = 10,
                                             multi.types = FALSE,
                                             burnin     = 5000,
                                             burnin.multiplier = 20,
                                             post.n = 200,
                                             post.space = 100,
                                             num.child.process = 20,
                                             CPU.cores = 20,
                                             high.confidence.prop = 0.9,
                                             gamma.alpha = 1,
                                             gamma.beta = 20,
                                             overwrite = T, verbose = TRUE)

Error

calling extract_components 2022-06-07 09:59:50
Error in lower.to.upper.tri.inds(n) : 'n' must be >= 2
Timing stopped at: 20.13 0.013 20.13

I updated both packages according to @jnh01 suggestion on issue #2, however, this didn't fix the issue. It would be great, if you can have a look. FYI, the input spectra contains 7 samples, each with ~2500 total mutations on an average.

Thank you & stay safe!

steverozen commented 2 years ago

Can you tell us what version of hdpx you are using?

Call sessionInfo()

The problem is in package hdpx, which calls cluster::diana(), which calls cluster::lower.to.upper.tri.inds(), which fails if there is only one item to cluster. But it looks like there is already code in hdpx to deal with this case.

steverozen commented 2 years ago

We think the problem was fixed in hdpx v1.0.1-branch

steverozen commented 2 years ago

Update: we think this is a different problem that may be related to the small number of input biological samples. We are investigating

jwayetGIGA commented 1 year ago

Dear @steverozen,

I got exactly same error with a 10 sample library. Did you find a way to fix this problem?

Thanks a lot,

steverozen commented 1 year ago

Let me check again -- it will take about a week. In the mean time, a possible workaround would be to add e.g. 1 melanoma spectrum in your input (assuming you are not already working on melanomas)

hj6-sanger commented 6 months ago

I have the same issue... I am using the singularity. if you have a chance to look into this, I am willing to send my input.

liumoLM commented 6 months ago

Hi, as mentioned above, can adding a melanoma spectrum resolve this issue? if not, please send the input to liumolm@gmail.com and I'm happy to check this issue. Thanks. @hj6-sanger