LinearCoFold and LinearCoPartition: Linear-Time Algorithms for Secondary Structure Prediction of Interacting RNA molecules

He Zhang, Sizhen Li, Liang Zhang, David H. Mathews, Liang HuangarXiv 2022 · DOI

RNA molecules frequently interact with other RNA strands to regulate gene expression, facilitate sequence editing, or provide viral defense. Predicting the secondary structure of these interacting pairs—a process known as "cofolding"—is essential for understanding their biological function. However, traditional computational methods face a significant "cubic bottleneck," scaling at $O(n^3)$ relative to sequence length. This complexity makes analyzing long sequences, such as the 30,000-nucleotide SARS-CoV-2 genome, computationally prohibitive.

To address this, researchers have introduced LinearCoFold and LinearCoPartition, the first linear-time algorithms for RNA-RNA interaction prediction. By reducing complexity from cubic to linear ($O(n)$), these tools enable the analysis of massive RNA sequences in minutes while maintaining or even improving prediction accuracy.

The Challenge of RNA Cofolding

Standard tools like Vienna RNAcofold utilize dynamic programming to explore the vast space of possible folding configurations. While effective for short sequences, the cubic scaling means that doubling a sequence's length increases calculation time eightfold. Furthermore, many existing "fast" alternatives simplify the problem by neglecting intramolecular folding (how a single strand folds on itself) while it binds to another, leading to biologically inaccurate models.

Overview of RNA-RNA interactions showing inter- and intra-molecular base pairs alongside functional examples.

Methodology: Nick Points and Beam Pruning

The new framework employs two primary innovations to achieve linear-time performance:

  1. Concatenation with a "Nick Point": The algorithms treat two distinct RNA strands as a single continuous sequence, separated by a virtual break or "nick." This allows the adaptation of established Zuker/Turner energy models to distinguish between intramolecular base pairs (within a strand) and intermolecular pairs (between strands), with specific stability penalties applied to the latter.
  2. Beam Pruning: This is the core mechanism for efficiency. Instead of an exhaustive search, the algorithm processes the sequence from left to right, maintaining only the top $b$ (beam size) most promising partial structures at each step. This reduces complexity to $O(n \cdot b^2)$, which is effectively linear.

Performance and Results

The algorithms were tested against traditional tools using several datasets, including the Meyer dataset (bacterial and fungal RNA pairs), the TargetScan dataset (long mRNA sequences), and experimental data from SARS-CoV-2.

Scaling of runtime and memory usage. LinearCoFold and LinearCoPartition exhibit linear growth ($O(n)$) compared to the cubic growth ($O(n^3)$) of traditional methods.

The results demonstrate a dramatic improvement in both speed and memory efficiency. On a combined sequence length of approximately 26,000 nucleotides, LinearCoFold was 86.8x faster than RNAcofold, while LinearCoPartition achieved a 642.3x speedup. Memory usage was also significantly reduced, with LinearCoFold requiring only 28% of the memory used by standard tools for the same 26k sequence.

Accuracy and Biological Insights

Beyond speed, the "lossy" nature of beam pruning surprisingly improved accuracy by filtering out thermodynamic "noise"—unlikely structures that often mislead global cubic-time algorithms. On the Meyer dataset, LinearCoFold saw a 4.0% increase in Positive Predictive Value (PPV) and an 11.6% increase in Sensitivity over RNAcofold. In a case study involving the SARS-CoV-2 genome and human U4 snRNA, LinearCoFold correctly predicted 11 out of 18 experimental base pairs, whereas RNAcofold failed to identify any correct pairs.

Conclusion

LinearCoFold and LinearCoPartition represent a significant leap forward in RNA bioinformatics. By breaking the cubic bottleneck, they open the door to studying complex interactions in large viral genomes and long mRNAs that were previously inaccessible. Future work aims to extend these capabilities to multi-strand interactions and implement statistical sampling methods.

Summary updated

BibTeX
@misc{zhang2022linearcofold,
  author = {He Zhang and Sizhen Li and Liang Zhang and David H. Mathews and Liang Huang},
  title = {{LinearCoFold and LinearCoPartition: Linear-Time Algorithms for Secondary Structure Prediction of Interacting RNA molecules}},
  year = {2022},
  eprint = {2210.14982},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.14982},
}
Figure