GurobiError in COMPASS: "Element 47 of a double array is Nan or Inf" despite clean input data
1
0
Entering edit mode
4 days ago
Binghong ▴ 40

Hello everyone,

I'm encountering a GurobiError when running COMPASS (Metabolic analysis software for single-cell data) analysis on my single-cell RNA-seq data. The error occurs during the optimization process, but I've verified that my input data does not contain any NaN or Infinite values.

The package is in

https://github.com/wagnerlab-berkeley/Compass

Command Used

compass --data /path/to/my_data.h5ad --num-processes 10 --species homo_sapiens

Error Message

Traceback (most recent call last):
  File "/path/to/compass/bin/compass", line 7, in <module>
    sys.exit(entry())
  File "/path/to/compass/lib/python3.10/site-packages/compass/main.py", line 1438, in entry
    runCompassParallel(args)
  File "/path/to/compass/lib/python3.10/site-packages/compass/main.py", line 1505, in runCompassParallel
    res.get()
  File "/path/to/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
gurobipy._exception.GurobiError: Element 47 of a double array is Nan or Inf.

I have verified that my .h5ad file contains no NaN values in the expression matrix, but I'm unsure how to resolve this error. Any guidance is appreciated!

COMPASS scRNAseq Metabolism Gurobi • 281 views
ADD COMMENT
0
Entering edit mode
3 days ago
Mensur Dlakic ★ 30k

Either something is wrong with program installation, or with your data. In the GitHub repository there are some test files, and I suggest you try them first. If those work, the installation is correct and it must be your data.

Computers generally don't throw these errors for no reasons, so the most likely culprit is still your dataset. You said to have checked for NaN, how about for Inf values? It may help to convert your file to a format that is easier to inspect, and the error tells you exactly where to look. I am not sure whether Element 47 here means row 47 or column 47, but I would check both. Keep in mind that because of python's zero indexing you should be checking the 48th element.

If you share the relevant lines of your data it may be easier to help you.

ADD COMMENT
0
Entering edit mode

Thank you very much for your suggestion. I will check it.

ADD REPLY

Login before adding your answer.

Traffic: 6227 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6