Python bindings to use the historical GTFold library natively in the RNADB construction script and natively with Python3. See the WIKI pages for documentation and installation notes.
The autoconf, automake and libtool package versions have updated significantly since the last time I did a deep recompilation of the sources on MacOS. The fix, as is the case for ArchLinux, is to install known good versions of these utilities from source (see the WIKI installation docs). This requires sudo. Should I put some effort into creating brew packages to automate this and remove the sudo dependency? We already have a public GH brew tap formula repository from having to do similar things to make it easy for Mac users to install RNAStructViz.
I noticed doing more testing today that the original code for GTFold prints a lot of extra summary messages to the console for the historical command line utility version of the software. This is annoying in practice and creates extraneous stdout messages when we are trying to run several operations from within Python. For example, running GTFP.SampleBoltzmannStructures(...) at minimum produces a subset of the following output:
Computing stochastic traceback...
Partition Function Value: nan
D2 Traceback initialization (partition functioncomputation) running time: 0.075484 seconds
Stochastic Traceback: Thread count for counts parallelization: 1
Sampling structures...
Scatter plot frequency data for stochastic samples, saved to /Users/mschmidt34/TestGTFoldPython/scatterplot.frequency
Stochastic samples saved to /Users/mschmidt34/TestGTFoldPython/sampleout.samples
D2 Traceback computation running time: 0.021558 seconds
Eventually I am going to need to go into the original GTFold sources included with the Python bindings sources at "mute" this output when run in QUIET mode, e.g., after setting GTFP.Config(quiet=1). I am cataloging this as an issue to now as a reminder for a task to pick up when I have more free time.
I am having to modify the Python/Makefile substantially to get GTFP to build on MacOS (Big Sur). The following is the tail end of what I get after trying to build from source:
$ make clean && make
... MUCH OUTPUT TRUNCATED ...
libtool: link: rm -fr .libs/libgomp.a .libs/libgomp.la .libs/libgomp.lai
libtool: link: ar cr .libs/libgomp.a alloc.o atomic.o barrier.o critical.o env.o error.o icv.o icv-device.o iter.o iter_ull.o loop.o loop_ull.o ordered.o parallel.o sections.o single.o task.o team.o work.o lock.o mutex.o proc.o sem.o bar.o ptrlock.o time.o fortran.o affinity.o target.o splay-tree.o libgomp-plugin.o oacc-parallel.o oacc-host.o oacc-init.o oacc-mem.o oacc-async.o oacc-plugin.o oacc-cuda.o priority_queue.o affinity-fmt.o teams.o oacc-profiling.o oacc-target.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(mutex.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(ptrlock.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(oacc-target.o) has no symbols
libtool: link: /usr/bin/ranlib -c .libs/libgomp.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(mutex.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(ptrlock.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libgomp.a(oacc-target.o) has no symbols
libtool: link: ( cd".libs"&& rm -f "libgomp.la"&& ln -s "../libgomp.la""libgomp.la" )
cd&& /Library/Developer/CommandLineTools/usr/bin/make am--refresh
make[1]: -c: No such file or directory
make[1]: *** [/aclocal.m4] Error 1
make: *** [make_GTFold] Error 2
This issue comes up in testing the new unit tests I added with custom settings and parameter combinations that were not exposed the way they are in the command line versions of GTFold. It is likely that fixing 1-2 single bugs will fix the multitude of failing tests. The plan is to get behavior that is consistent with the output of historical GTFold. It is on my TODO list. Note that many standard combinations available in other tests ARE passing at the moment!