SystemsBioinformatics / ecmtool

Uncover organisms' metabolic blueprints
MIT License
12 stars 6 forks source link

lrslib on CentOS 7 #17

Closed maxEntropyProd closed 2 years ago

maxEntropyProd commented 2 years ago

This is an OS issue and not ecmtool, but if you have a quick answer, that would be great. I'm trying to run ecmtool on a CentOS 7 box, but I can't find any repo for lrslib, so I grabbed the source from here http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/ and have a redund executable, but when I run the ecmtool example "python main.py --model_path models/e_coli_core.xml --auto_direction true --out_path core_conversions.csv"

ecmtool errors with this from redund:

Iteration 24/25
Adding 8 candidates
Removing 6 rays

Running redund

*lrs:overflow possible: restarting with 128 bit arithmetic

Traceback (most recent call last):
  File "main.py", line 297, in <module>
    remove_infeasible=args.remove_infeasible)
  File "/home/jvallino/Software/ecmtool/ecmtool-master/ecmtool/network.py", line 409, in compress
    remove_infeasible=remove_infeasible)
  File "/home/jvallino/Software/ecmtool/ecmtool-master/ecmtool/network.py", line 444, in compress_inner
    self.cancel_clementine(verbose=verbose)
  File "/home/jvallino/Software/ecmtool/ecmtool-master/ecmtool/network.py", line 702, in cancel_clementine
    self.output_metabolite_indices())
  File "/home/jvallino/Software/ecmtool/ecmtool-master/ecmtool/network.py", line 103, in clementine_equality_compression
    G = redund(G, verbose=verbose)
  File "/home/jvallino/Software/ecmtool/ecmtool-master/ecmtool/helpers.py", line 275, in redund
    matrix_nored = np.append(matrix_nored, [row], axis=0)
  File "<__array_function__ internals>", line 6, in append
  File "/home/jvallino/Software/ecmtool/ecmtool-master/python3-virtualenv/lib64/python3.6/site-packages/numpy/lib/function_base.py", line 4671, in append
    return concatenate((arr, values), axis=axis)
  File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 54 and the array at index 1 has size 8

I've tried using versions lrs version 71a and 71b, which generate the above, and version 72 generates a syntax like error. Assuming I'm doing this correctly (probably not), what version of lrslib does ecmtool use?

thanks! -joe

tjclement commented 2 years ago

Hi Joe,

More recent versions of lrslib should be expected to work with ecmtool, so this is something we'll have to investigate and fix.

To help you out quickly now: at time of development of ecmtool I believe the version of lrslib that was available on debian-like distributions was 0.62. You can find it here: https://packages.ubuntu.com/bionic/amd64/lrslib/download. You can compile 0.62 yourself as you did with the other versions: http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-062.tar.gz. Alternatively you can convert the Ubuntu .deb package to .rpm using something like this: https://linuxconfig.org/how-to-install-deb-file-in-redhat-linux-8. Then you can just install the prebuilt package.

maxEntropyProd commented 2 years ago

Thanks Tom!! I'll let you know what I find. -joe

maxEntropyProd commented 2 years ago

I used lrslib-062.tar.gz version with "make all" and that worked! Newer versions must have some change in input arguments?