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

kbb non-positive #1

Open
vperiyasamy opened this issue Mar 27, 2019 · 5 comments
Open

kbb non-positive #1

vperiyasamy opened this issue Mar 27, 2019 · 5 comments

Comments

@vperiyasamy
Copy link

I have been able to run this algorithm on datasets that have been normalized and sqrt transformed, however when running it on direct RSEM values I get the error "kbb non-positive" and an exit. I'm not sure if this is the root cause but I don't exactly understand the error message, any reason why this might be arising in an RSEM dataset?

@amcdavid
Copy link
Owner

This error is saying that the multivariate normal precision was somehow estimated to be zero, or negative (!). Can you provide a reprex, or at least backtrace?
What sort of RSEM values are they? Transcripts per million? You may need some sort of transformation (eg log) to symmetrize them.

@vperiyasamy
Copy link
Author

I see, here is the call trace that was reported:
node=1 nodeId=1110051M20Rik Lambda = 0.513 rounds = 300 NNZ = 0 gamma = 0.016 Error in HurdleLikelihood(y.zif, this.model[, activemm, drop = FALSE], : kbb non-positive Calls: fitHurdle ... applyfun -> FUN -> cgpaths -> refitModel -> HurdleLikelihood In addition: There were 22 warnings (use warnings() to see them)

They are TPM, I will try a log transform and see if that helps.

@amcdavid
Copy link
Owner

I will see about trapping this error and continue fitting, but I definitely don't recommend trying to fit it to regular TPM, as these are probably way too skewed. The data need to be Gaussian-like. Check out the vignette, there are some plotting methods you can use to check your data:
http://htmlpreview.github.io/?https://github.com/amcdavid/HurdleNormal/blob/master/doc/singlecell-networks.html

What are the 22 warnings?

@amcdavid
Copy link
Owner

amcdavid commented Apr 2, 2019

Did log-transforming fix the error?

@vperiyasamy
Copy link
Author

Sorry, I'm not too familiar with R so I don't know how to retroactively look at the warnings. However, we tried a square root transform (which we used on all of our other data) and the error still appeared. We may try to convert the TPM to raw counts and then transform it. But since HurdleNormal is able to run on every other dataset, I think it's just a problem on our end.

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