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 when running mbImpute #2

Open
zifanzhu opened this issue Jan 29, 2021 · 2 comments
Open

Error when running mbImpute #2

zifanzhu opened this issue Jan 29, 2021 · 2 comments

Comments

@zifanzhu
Copy link

Hello, mbImpute developers,

I read your mbImpute manuscript on bioRxiv recently. I really liked the idea and would like to give it a try on my datasets. However I kept getting the following error when running the imputation:

image

This is the code I'm using:
a_imp <- mbImpute(condition = a_meta_num, otu_tab = otu_tab).

The otu_tab and a_meta_num I used is attached below in RDS format ('data.zip'). The entry of the otu_tab is defined as raw_counts divided by total_counts_in_the_sample, which is similar to the one presented in your manuscript except that it doesn't multiply by 10^6.
data.zip

Could you please help me look into this? Thanks in advance!

Also, there's a small typo in README. It should be
install.packages("glmnet")
instead of
install.pacakges("glmnet").

Best,
Zifan

@ruochenj
Copy link
Owner

ruochenj commented Mar 5, 2021

Hi Zifan,

Since we are using a gamma normal mixture model to identify the zero counts or low values we will impute on, the smallest number cannot be 0. It should be a small positive number instead. You can use the current data scaled by a scalar (e.g. the median of the total counts in each sample) and take log10(scaled_matrix + 1.01) to get a matrix with smallest number not equal to 0.

@zji90
Copy link

zji90 commented Apr 10, 2024

I encountered the same error even if I replaced 0 with a small number log10(1.01) or log10(1.1)

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

3 participants