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

Test Mode ValueError #175

Open
JP971 opened this issue Oct 7, 2022 · 1 comment
Open

Test Mode ValueError #175

JP971 opened this issue Oct 7, 2022 · 1 comment

Comments

@JP971
Copy link

JP971 commented Oct 7, 2022

  • spladder version: 3.0.3
  • Python version: 3.7.8
  • Operating System: Ubuntu 20

I am trying to run Spladder on test mode with 6 sorted bam files divided into two conditions. I already ran Spladder on build mode with no significant problems, but it returns "ValueError: zero-size array to reduction operation maximum which has no identity" on test mode.

Here is my input for the build mode:
spladder build --annotation Naegleria_fowleri.gtf --filter-overlap-genes --bams files.txt --outdir spladder

Here is my input for the test mode:
spladder test --conditionA SRR12265722.sorted.bam,SRR12265723.sorted.bam,SRR12265724.sorted.bam --conditionB SRR12265725.sorted.bam,SRR12265726.sorted.bam,SRR12265727.sorted.bam --labelA Livre --labelB Parasita --outdir spladder --out-tag Round1 --parallel 4

And here is the Traceback:
Capped 1935/83124 outlier expression counts (2.33 percent)
Found dispersion fit
Found dispersion fit
Found dispersion fit
Found dispersion fit
Traceback (most recent call last):
File "/home/lenovo/miniconda3/bin/spladder", line 8, in
sys.exit(main())
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/spladder/spladder.py", line 229, in main
options.func(options)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/spladder/spladder_test.py", line 716, in spladder_test
(pvals, cov_used, disp_raw_used, disp_adj_used) = run_testing(cov, dmatrix0, dmatrix1, sf, options, event_type, test_idx)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/spladder/spladder_test.py", line 460, in run_testing
(disp_fitted, Lambda, disp_idx) = fit_dispersion(cov, disp_raw, disp_raw_conv[:, 0][:, np.newaxis], sf, options, dmatrix1, event_type)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/spladder/spladder_test.py", line 178, in fit_dispersion
modGamma = sm.GLM(disp_raw[idx], matrix, family=sm.families.Gamma(sm.families.links.identity()))
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/genmod/generalized_linear_model.py", line 314, in init
var_weights=var_weights, **kwargs)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/model.py", line 237, in init
super(LikelihoodModel, self).init(endog, exog, **kwargs)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/model.py", line 78, in init
**kwargs)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/model.py", line 101, in _handle_data
data = handle_data(endog, exog, missing, hasconst, **kwargs)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/data.py", line 673, in handle_data
**kwargs)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/data.py", line 87, in init
self._handle_constant(hasconst)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/statsmodels/base/data.py", line 131, in _handle_constant
exog_max = np.max(self.exog, axis=0)
File "<array_function internals>", line 6, in amax
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2734, in amax
keepdims=keepdims, initial=initial, where=where)
File "/home/lenovo/miniconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity

Does anyone know any solutions? I am going to upload the directory containing the output of the build mode
spladder.zip

@akahles
Copy link
Member

akahles commented Oct 11, 2022

Dear @JP971 ,

Thank you very much for reporting and for sharing the SplAdder output data. I will have a look and get back to you.

Best,
Andre

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