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

Issues when data matrix contain zero values #5

Open
hhageBA opened this issue Jul 18, 2023 · 0 comments
Open

Issues when data matrix contain zero values #5

hhageBA opened this issue Jul 18, 2023 · 0 comments

Comments

@hhageBA
Copy link

hhageBA commented Jul 18, 2023

Hello,
I am using reComBat to remove batch effect from my RNAseq data. My matrix contains zero values for many genes that are not expressed in samples.
This cause an issue of division by zero at the fit_linear_model step 'RuntimeWarning: divide by zero encountered in divide
Z = (data.values.copy() - np.matmul(Covariates[:, num_batches:num_batches+X_covariates_dim], self.beta_x_)'.

When I replace zero values in my matrix by 0.0001 for example, it works without issue.
But its normal in RNAseq matrices to have zero values. Is there an alternative from replacing zero values to not have this error?
Thanks a lot

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

1 participant