1 Introduction
Inferring secondary and higher order structure from primary structure is one of the holy grails in structural biology. For ribonucleotide acid (RNA), the primary structure is given by a sequence of nucleobases. RNA consists of a backbone of alternating phosphates and ribose sugar rings, to which the nucleobases are attached, see e.g. Eltzner et al. (2018) for a brief overview of RNA structure. The part of the backbone from one ribose to the next is called a suite, see Figure 1 which also gives the different types of atoms. While to date the primary structure can be quite easily sequenced, see e.g. Stark et al. (2019), assessing the geometric structure, which is crucial for biological function, requires some effort. Molecular geometry is commonly determined from Xray crystallography results. However, these reconstructed 3D structures are not error free, but frequently contain clashes, see e.g. Murray et al. (2003).
Definition 1
A clash is a forbidden molecular configuration, where two atoms are reconstructed closer to each other than is chemically possible.
Correction of clashes is essential before data can be fed to learning algorithms, trained on known primary to higher order structure correspondences, which can predict higher order geometric structure from primary structure, see Jain et al. (2015). To avoid ambiguity, we introduce the following terminology.
Definition 2
We consider a single connected RNA strand with consecutive bases indexed in , see Figure 1.

The th suite comprises the RNA region between a atom and the second next atom and the backbone shape of the suite is described by the seven dihedral angels for .

If two backbone atoms within a suite have a clash with each other, then we call it a clash suite.

Each base comes with a pentagonal ribose sugar ring formed by the atoms , , , and . Denoting their center of gravity (i.e. average location) with , for all , the mesoscopic shape corresponding to the th suite is the similarity sizeandshape in of , see Dryden and Mardia (2016).
For the mesoscopic shapes we include the ribose centers of the suites preceding and the suites following the suite of concern, cf. Figure 1. Choosing reflects the local geometry from a middle viewpoint (mesoscopic) as the bases from the suites correspond roughly to the number of bases involved in a half helix turn, see e.g. Watson et al. (2004).
While there are many types of clashes, most relevant and most difficult to correct are clashes between two backbone atoms (e.g. Murray et al. (2003)) and we deal with such clashes within the same suite. In contrast to well established methods such as ERRASER from Chou et al. (2013) which corrects backbone strands building on elaborate and computationally expensive molecular dynamics (MD) and single nucleotide stepwise assembly (SWA), we determine in Wiechers et al. (2021) the nearest neighbors of the mesoscopic shape (see Figure 1) corresponding to a clash suite and if a plurality of the suites corresponding to these shapes correspond to a torus cluster, we propose the mean of these suites as corrections.
Our clash correction approach requires clusters of RNA suites. RNA suite geometries are very diverse due to two reasons: Firstly, RNA is singlestranded and, secondly, the C2’ atom in RNA carries a hydroxyl group. Therefore, one can expect many clusters and a high number of outliers; to meet this challenge, we use the
torus clustering (TC) method from Eltzner et al. (2015), which has two tuning parameters and . Here, we investigate typical parameter choices leading to three types of clustering: (a) tight, (b) thin and (c) relaxed. Tight clustering has been applied for clash correction in Wiechers et al. (2021).2 Torus Clustering Correction
Note that at suite level, a similarity sizeandshape representation would have excessive degrees of freedom because bond lengths and angles are fixed by the laws of chemistry. In consequence, a similarity sizeandshape mean, see e.g.
Dryden and Mardia (2016), would usually not yield a suite configuration which is possible in reality. Therefore, we describe suite geometry only in terms of the dihedral angles displayed in Figure 1. As detailed in Eltzner et al. (2018), RNA configurations are then represented on the torus with the product distance.We use the torus clustering (TC) method from Eltzner et al. (2015), which builds on torus PCA. In contrast to standard PCA methods in Euclidean space, torus PCA is a challenging problem in directional statistics, see e.g. Mardia and Jupp (2009) for an introduction into the topic. Significant progress on torus PCA has recently been achieved by Eltzner et al. (2018), see also Eltzner et al. (2015); Eltzner and Huckemann (2017). In Eltzner et al. (2015), suites are preclustered based on single linkage clustering depending on two parameters: Initially, in the single linkage branch cutting algorithm, see (Eltzner et al., 2015, Appendix A.7), branches are cut at distance and clusters with less than points are labeled as outliers. In the present paper we subject the resulting clusters to torus PCA from Eltzner et al. (2018), which, highly effectively reducing dimension, usually yields an essentially onedimensional representation on a circular principal component. On these, we apply circular mode hunting from Eltzner et al. (2018), based on Dümbgen and Walther (2008), which often leads to a further and final partitioning.
3 A Comparison Study
A classic dataset from the RCSB PDB Protein Data Bank is used, which was carefully created by Duarte and Pyle Duarte and Pyle (1998) and extended by Wadley et al. (2007) to ensure high experimental Xray precision (3 Ångström). The data set contains 8685 suites. We only work with those suites for which a mesoscopic shape can be defined and we filter out all suites that are involved in clashes between two backbone atoms that are both within the same mesoscopic shape. This leaves 6815 suites, our benchmark data set.
We now compare how different choices for the parameters and in the preclustering affect the resulting overall clustering. Recall from above that due to high variability of RNA structures we expect many clusters and even more outliers.
3.1 Tight clustering

In tight clustering we aim at larger and concentrated clusters at the price of a larger number of outliers which cannot be allocated to any of the clusters. We choose and such that of the suites in the single linkage tree are in a branch with less than data points. The clustering results are summarized in Figure 1(a).
This clustering returned 12 clusters, the largest corresponding to the A helix shape contains 4382 elements is highly dominant. All clusters are rather dense and even the smallest cluster has a credible size with 22 elements. The number of outliers (1289), however, is quite large.
3.2 Thin clustering
In thin clustering we aim at reducing the number of outliers while keeping clusters sizes credible. Thus we choose as before, but change so that only
of the suites in the single linkage tree are in a branch with less than 20 data points. Consequently, we have the same minimal cluster size, but a larger variance within the clusters and fewer outliers, as summarized in Figure
2(a).

The first cluster corresponds to the first cluster in tight clustering and has the same number of elements. The other clusters in tight clustering also occur in thin clustering, but have more elements in thin clustering. As illustrated in Figure 2(b), there are some clusters with large variance. The reason for this is that single linkage clustering often results in thin and elongated clusters due to chaining effects. This effect is more pronounced the lower the number of outliers in the clustering, which is mainly determined by .
3.3 Relaxed clustering
In relaxed clustering we relax the minimal cluster size, here to , but choose such that of the suites in the single linkage tree are in a branch with less than data points, as in tight clustering. The clustering results are summarized in Figure 3(a).

Again, the first cluster corresponds to the first cluster in tight clustering and has the same number of elements. The other clusters from the tight clustering also occur in relaxed clustering, but have different sizes. Remarkably, some clusters, such as the one in Figure 3(b), have visually more than one mode. The reason for this is that in single linkage branch cutting, which is used as preclustering, several different clusters having at least elements are sometimes interpreted as one cluster. For small such additional modes may contain only very few elements, so that the power of the multiscale test by Dümbgen and Walther (2008), translated to the circular case by Eltzner et al. (2018), does not suffice to separate them.
4 Discussion
The task to correct clashes from reconstructions of biomolecules is currently met with high interest in statistics and biophysical chemistry. As powerful statistical learning methods are based on clustering we investigated the challenge of torus clustering (TC), i.e. clustering on the torus. Specifically we have clustered geometric diversity of nonclashing reconstructions of biomolecules with the aim of corrected clashing reconstructions by suitably assigning to clusters in Wiechers et al. (2021). Our TC correction method hinges on two parameters, minimal cluster size and maximal outlier distance and in Section 3 we have reported outcomes for typical parameter choices. These represent many more experiments, we have conducted.
Since the highly efficient underlying torus PCA yields mainly onedimensional preclusters, we can apply circular mode hunting, and in order to build on statistical significance, we find rather reasonable. For smaller such as yielding relaxed clustering from Section 3.3, several modes within clusters are visible, they cannot be separated, however, with statistical significance.
Control of outliers is closely related to cluster density, it turns out that choosing resulting in about outlier out of yields clusters of convincing shape. Aiming at less outliers as in thin clustering, cluster are less tight and new thin clusters appear (see Figure 2(b)), which are of poorer quality.
As a result of this study, we sum up that tight clustering appears to be the most promising for the task of clash correction. Even though statistical clustering is in principle a method of unsupervised learning, the pursuit of optimal choices of tuning parameters warrants supervised learning. Creating suitable objective functions involving expert knowledge remains a challenge.
References
 Chou et al. (2013) Chou, F.C., P. Sripakdeevong, S. M. Dibrov, T. Hermann, and R. Das (2013, January). Correcting pervasive errors in rna crystallography through enumerative structure prediction. Nature methods 10(1), 74—76.
 Dryden and Mardia (2016) Dryden, I. L. and K. V. Mardia (2016). Statistical Shape Analysis, with Applications in R. Second Edition. Chichester: John Wiley and Sons.
 Duarte and Pyle (1998) Duarte, C. M. and A. M. Pyle (1998). Stepping through an RNA structure: A novel approach to conformational analysis 11. Edited by D. Draper. Journal of Molecular Biology 284(5), 1465 – 1478.
 Dümbgen and Walther (2008) Dümbgen, L. and G. Walther (2008, 08). Multiscale inference about a density. Ann. Statist. 36(4), 1758–1785.
 Eltzner and Huckemann (2017) Eltzner, B. and S. Huckemann (2017). Applying backward nested subspace inference to tori and polyspheres. In International Conference on Geometric Science of Information, pp. 587–594. Springer.
 Eltzner et al. (2015) Eltzner, B., S. Huckemann, and K. V. Mardia (2015). Torus principal component analysis with an application to RNA structures. arXiv 1511.04993.

Eltzner
et al. (2018)
Eltzner, B., S. Huckemann, and K. V. Mardia (2018, 06).
Torus principal component analysis with applications to RNA structure.
Ann. Appl. Stat. 12(2), 1332–1359.  Eltzner et al. (2015) Eltzner, B., S. Jung, and S. Huckemann (2015). Dimension reduction on polyspheres with application to skeletal representations. In International Conference on Geometric Science of Information, pp. 22–29. Springer.
 Jain et al. (2015) Jain, S., D. C. Richardson, and J. S. Richardson (2015). Chapter Seven  Computational Methods for RNA Structure Validation and Improvement. In S. A. Woodson and F. H. Allain (Eds.), Structures of Large RNA Molecules and Their Complexes, Volume 558 of Methods in Enzymology, pp. 181 – 212. Academic Press.

Mardia and
Jupp (2009)
Mardia, K. and P. Jupp (2009).
Directional Statistics.
Wiley Series in Probability and Statistics. Wiley.
 Murray et al. (2003) Murray, L. J. W., W. B. Arendall, D. C. Richardson, and J. S. Richardson (2003). RNA backbone is rotameric. Proceedings of the National Academy of Sciences 100(24), 13904–13909.
 Stark et al. (2019) Stark, R., M. Grzelak, and J. Hadfield (2019, Nov). Rna sequencing: the teenage years. Nature Reviews Genetics 20(11), 631–656.
 Wadley et al. (2007) Wadley, L. M., K. S. Keating, C. M. Duarte, and A. M. Pyle (2007). Evaluating and Learning from RNA Pseudotorsional Space: Quantitative Validation of a Reduced Representation for RNA Structure. Journal of Molecular Biology 372(4), 942 – 957.
 Watson et al. (2004) Watson, J., T. Baker, S. Bell, A. Gann, M. Levine, and R. Losick (2004). Molecular Biology of the Gene (Fifth ed.). Pearson Education.
 Wiechers et al. (2021) Wiechers, H., B. Eltzner, K. V. Mardia, and S. F. Huckemann (2021). Clustering on the torus and multiscale RNA structure correction. manuscript.