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

ComplexWarning and RuntimeWarning #20

Open
phycochow opened this issue Nov 20, 2024 · 0 comments
Open

ComplexWarning and RuntimeWarning #20

phycochow opened this issue Nov 20, 2024 · 0 comments

Comments

@phycochow
Copy link

Hello, we have a working version of the tool. As we scale it up, we wanted to report two bugs we encountered, hoping to understand what they mean.

Bug 1 that crashes the program:
INFO:root:log_message(AnnotUnivariateParams(_pi: 1.0, _sig2_beta: 0.05088680883609533, _s: -0.25, _l: -0.274693537774505, _sig2_zeroA: 0.9257157885851576, _sig2_zeroL: 0.0, _p_annot: 1, _p_gene: 1, _n_annot: 76, _n_genes: 144650))
INFO:root:log_message(Computing hessian for 13043 genes on chr 1)
/tools/mixer/precimed/mixer/cli.py:1647: ComplexWarning: Casting complex values to real discards the imaginary part
neg_hess_chr[nonSPD_index, nonSPD_index] = eig_value_min
Traceback (most recent call last):
File "/tools/mixer/precimed/mixer.py", line 16, in
args.func(args)
File "/tools/mixer/precimed/mixer/cli.py", line 1649, in execute_plsa_parser
neg_hess_chr_inv = np.linalg.inv(neg_hess_chr)
File "<array_function internals>", line 180, in inv
File "/usr/local/lib/python3.10/site-packages/numpy/linalg/linalg.py", line 552, in inv
ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
File "/usr/local/lib/python3.10/site-packages/numpy/linalg/linalg.py", line 89, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.LinAlgError: Singular matrix

Bug 2 that is in the log file but doesn't cause observable issues:
INFO:root:log_message(Loading /scratch/project/palpant_scratch/CSYChow/Shim_EpiCop_24/1_Mixer_Annots/1_GenesWithRoI__H3K9ac_Feature_23.tsv with --go-extend-bp=0...)
INFO:root:log_message(Annotating SNPs to GO gene-sets...)
INFO:root:log_message(Done, annotation matrix has 262679 non-zero entries across 141123 SNP and 144650 GO terms)
/tools/mixer/precimed/mixer/cli.py:1436: RuntimeWarning: invalid value encountered in divide
gene_enrich = np.divide(np.divide(gene_h2[0, :], total_h2), np.divide(gene_h2_base, total_h2_base))
/usr/local/lib/python3.10/site-packages/numpy/core/_methods.py:265: RuntimeWarning: Degrees of freedom <= 0 for slice
ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
/usr/local/lib/python3.10/site-packages/numpy/core/_methods.py:223: RuntimeWarning: invalid value encountered in divide
arrmean = um.true_divide(arrmean, div, out=arrmean, casting='unsafe',
/usr/local/lib/python3.10/site-packages/numpy/core/_methods.py:254: RuntimeWarning: invalid value encountered in divide
ret = um.true_divide(
INFO:root:log_message(Enrichment results for /scratch/project/palpant_scratch/CSYChow/Shim_EpiCop_24/1_Mixer_Annots/1_GenesWithRoI_Annot__H3K9ac_Feature_23.tsv are saved to /scratch/project/palpant_scratch/CSYChow/Shim_EpiCop_24/4_Mixer_results/F23/formatted_GCST90278514_imp.sumstat_full.go_test_enrich.csv)

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