Transpiling reproducibility: Multi-language implementation for the St. Nicolas House Analysis algorithm using Fusion
The integration of tools written in different programming languages is common in bioinformatics pipelines. When extending these tools, developers are required to either manually port the code or use wrapper libraries, which incurs a substantial "translation tax" on developer time. Transpilers have emerged as a potential solution, enabling the generation of algorithm implementations in multiple…
In bioinformatics, developers often face the challenge of integrating tools written in various programming languages. Typically, this requires either manual code porting or the use of wrapper libraries, both of which are labor-intensive. Transpilers present a promising alternative by generating multiple language implementations from a single source code base, potentially reducing the time and effort required.
However, it is crucial to determine if transpiled code maintains functional correctness and stochastic reproducibility across different language ecosystems.
This case study examined the integration of the Fusion language and its fut transpiler to determine if they could produce functionally identical, stochastically reproducible, and high-performance code for the St. Nicolas House Analysis (SNHA) algorithm. The SNHA algorithm was initially coded in Fusion and then transpiled to nine different target programming languages.
The generated code was assessed against reference R, Python, and Julia implementations, using both a clinical birthwt dataset and a 26-variable synthetic benchmark dataset. The evaluation involved 1,000 bootstrap iterations.
The results showed that all nine transpiled outputs produced network structures identical to the original R implementation. Since the algorithm incorporates the deterministic Xorshift*64 pseudo-random number generator, the transpiled versions generated identical bootstrapped datasets and adjacency matrices across all languages. When it came to performance metrics, there was a vast variance.
The transpiled Python version exhibited an 8.5-fold speedup and an 8.8-fold reduction in peak memory compared to the reference Python implementation. Compiled target languages, including C and C++, achieved speedups exceeding 160-fold and memory reductions up to 36-fold. These findings underscore the potential of modern transpilers to eliminate the cross-ecosystem translation tax in computational biology while ensuring cross-language reproducibility.
Rewritten by urgent.news; may contain errors — check the original.
Source: biorxiv.org