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

How it works your package in a dataset different from Karlsson et al. data? #12

Open
magibc opened this issue Apr 26, 2023 · 1 comment

Comments

@magibc
Copy link

magibc commented Apr 26, 2023

Dear @ruochenj and mbImpute developers.

I would like to use your tool for zero imputation because zComposition cmultrepl() does not work due to the huge of zeroes in my abundance table.

I followed your README and the package instructions version 0.1.0 and I do not know how to calculate D or previously I need to calculate the edges value. In th mbImpute package help appears some functions incomplete...such as function edges or D...

I tried the following:

data(GlobalPatterns)

gpotu<-as.data.frame(otu_table(GlobalPatterns))
gpotu2<-t(gpotu)

gpotu2[1:6,1:6] # This works

but when I try D[1:6,1:6] automatically redirects to otu_tab matrix (Karlsson data), and I tried some code but appears error and I am not able to calculate the D value...

Could you facilitate me some hints or how can I proceed from GlobalPatterns toy data to use your mbImpute.

Thanks on advance,

Magi

@magibc magibc changed the title How it works your package in a dataset different from Karlsson et al. data How it works your package in a dataset different from Karlsson et al. data? Apr 26, 2023
@ruochenj
Copy link
Owner

Hi, the D matrix is just a distance matrix that indicates the difference / similarities among OTUs (this shall be generated independently based on e.g. phylogenetic information among OTU species). The more similar two OTUs are, the smaller the distance would be. You could overwrite D to be the distance defined in this way on your own, or if you do have the phylogenetic information, you could use distance_mat_gen.R to generate the distance matrix. If the mentioned method does not work for you, you could ignore this entry in the imputation.

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