BACKGROUND
recent discoveries of a large variety of important roles for non-coding rnas , including gene regulation or maturation of mrnas, rrnas and trnas, have been reported by many researchers.
most functional ncrnas form secondary structures related to their functions, and secondary structures without pseudoknots can be modeled by stochastic context-free grammars   <cit> .
therefore, several computational methods based on scfgs have been developed for modeling and analyzing functional ncrna sequences  <cit> .
these grammatical methods work very well if the secondary structures of the target ncrnas are modeled successfully.
however, it is difficult to build such stochastic models since it is necessary to construct complicated models, to prepare the number of training sequences, and/or to obtain prior knowledge for some families containing non-uniform and/or non-homologous sequences such as snorna families.
thus, we need more robust methods for performing structural ncrna analysis.
on the other hand, support vector machines  and other kernel methods are being actively studied, and have been proposed for solving various problems in many research fields, including bioinformatics  <cit> .
these methods are more robust than other existing methods, and we therefore considered using kernel methods including svms instead of the grammatical methods to analyze functional ncrnas.
several kernels for ncrna sequences have been developed so far  <cit> .
kin et al.
have proposed marginalized count kernels for rna sequences  <cit> .
their kernels calculate marginalized count vectors of base-pair features under scfgs trained with a given dataset, and compute the inner products.
therefore, marginalized count kernels inherit the drawback of the grammatical methods.
washietl et al.
have developed a program called rnaz, which detects structurally conserved regions from multiple alignments by using svms  <cit> .
rnaz employs the averaged z-score of the minimum free energy  for each sequence and structure conservation index .
assuming that mfe for the common secondary structure is close to that for each sequence if a given multiple alignment is structurally conserved, sci is defined as the rate of mfe for the common secondary structure to the averaged mfe for each sequence.
these features allow for the detection of structurally conserved regions.
however, since these features cannot measure the structural similarities between rna sequences, it is difficult to apply them to other aspects of structural rna analysis, such as detecting particular families.
several works which involve some helpful features specific to given target families  have been proposed  <cit> .
these family-specific methods perform well in detecting their target families.
however, in order to apply this strategy to other families, it is necessary to develop new features for every family.
for the purpose of analyzing ncrnas using kernel methods including support vector machines, we have proposed stem kernels, which extend the string kernels to measure the similarities between two rna sequences from the viewpoint of secondary structures  <cit> .
the feature space of the stem kernels is defined by enumerating all possible common base pairs and stem structures of arbitrary lengths.
however, since the computational time and memory size required for the naive implementation of stem kernels are of the order of o, where n is the length of the inputted rna sequence, applying stem kernels directly to large data sets of ncrnas is impractical.
therefore, we develop a new technique based on directed acyclic graphs  derived from base-pairing probability matrices of rna sequences, which significantly reduces the computational time of stem kernels.
the time and space complexity of this method are approximately of the order of o. furthermore, we propose profile-profile stem kernels for multiple alignments of rna sequences, which utilize base-pairing probability matrices for multiple alignments instead of those for individual sequences.
methods
in this section, we propose new kernels for analyzing ncrnas.
first, an outline of our previous work is provided, after which the proposed new technique based on directed acyclic graphs  derived from base-pairing probability matrices of rna sequences is described.
finally, the proposed kernels are extended to kernels for multiple alignments of rna sequences by utilizing averaged base-pairing probability matrices.
naive stem kernel algorithms
before proposing the new method, we briefly describe stem kernels which have been proposed as an extension of the string kernels for measuring the similarities between two rna sequences from the viewpoint of secondary structures  <cit> .
the feature space of the stem kernels is defined by enumerating all possible common base pairs and stem structures of arbitrary lengths.
the stem kernel calculates the inner product of common stem structure counts.
in other words, the more stem structures two rna sequences have in common, the more similar they are.
however, the time needed for the explicit enumeration of all substructures obviously grows exponentially, which renders this method infeasible for long sequences.
we have therefore developed an algorithm for calculating stem kernels which is based on the dynamic programming technique.
for an rna sequence x = x1x <dig> ... xn , we denote a contiguous subsequence xj ... xk by x , and the length of x by |x|.
the empty sequence is indicated by ∊.
for a base a, the complementary base is denoted as a¯.
for a string x and a base a, xa denotes the concatenation of x and a. for two rna sequences x and x', the stem kernel k is defined recursively as follows:
k=k= <dig> for ∀x,x′,k=k+∑xk=a¯∑i<j s.t.
x′i=a¯,x′j=ak.
both the time and the memory required for the calculation k are of the order of o, which renders this method impractical for applying to large data sets of ncrnas.
stem kernels with dag representation
here, we develop a new technique based on directed acyclic graphs  derived from base-pairing probability matrices of rna sequences, which significantly reduces the time needed for computing stem kernels.
figure  <dig> contains a diagram illustrating the calculation of the new kernels.
first, for each rna sequence x = x1x <dig> ... xn, we calculate a base-pairing probability matrix px using the mccaskill algorithm  <cit> .
we denote the base-pairing probability of  by pijx, which is defined as:
pijx=e=∑y∈ypiij,
where y is an ensemble of all possible secondary structures of x, p is the posterior probability of y given x, and iij is an indicator function, which equals  <dig> if the i-th and the j-th nucleotides form a base-pair in y or  <dig> otherwise.
we employ the vienna rna package  <cit>  for computing these expected counts  using the mccaskill algorithm.
subsequently, we build a dag for the base-pairing probability matrix, where each vertex corresponds to a base pair whose probability is above a predefined threshold p*.
let gx =  be the dag for an rna sequence x, where vx and ex are vertices and edges in the dag gx, respectively.
for each vi =  ∈ vx,  is a likely base pair, in other words, pklx≥p∗.
each eij ∈ ex is an edge from vertex vi to vertex vj.
for vertices vi =  and vi' = , we can define a partial order, vi ≺ vi' if and only if k <k' and l > l'.
an edge eii' connects vertices vi and vi' if and only if vi ≺ vi' and there exists no vj ∈ vx such that vi ≺ vj ≺ vi'.
finally, we calculate a kernel value between two dags representing rna structure information through the dag kernel using a dynamic programming technique.
the vertices in the dag can be numbered in a topological order such that for every edge eij, i <j is satisfied, in other words, there are no directed paths from vj to vi if i <j.
thus, we can apply the dynamic programming technique as follows:
k=∑vi∈root,vi′∈rootrr={kv+gv+gvkv+gv∑j>iger+gvkv+gv+gv∑j′>i′gerkv∑j>i,j′>i′ker+gv∑j>iger+gv∑j′>i′ger
where root is a set of vertices which have no incoming edges, kv and ke are kernel functions for vertices and edges, respectively, and gv and ge are gap penalties for vertices and edges, respectively.
k calculates the sum of kernel values for all pairs of possible substructures of gx and gx'.
each of these kernel values is composed of the product of the subkernels kv, ke, gv and ge.
therefore, k is a convolution kernel and is positive semi-definite if kv and ke are also positive semi-definite  <cit> .
the time and the memory required for the computation of k are of the order of o and o, respectively, where c is the maximum out-degree of gx and gx'.
we can control |vx| using the predefined threshold for base pairs, p*.
when p* =  <dig>  vx contains all possible base pairs, i.e., |vx| = n/ <dig>  when p* >  <dig>  since each base can take part in vx at most 1/p* times, |vx| is proportional to n of the length of the rna sequence x. since in many cases c ≪ |vx|, the time and the memory required for this algorithm are approximately of the order of o for sufficiently large values of p*.
several choices of sub-kernels kv, ke, gv and ge in eq.
are available.
in order to connect the dag-based stem kernels to the naive stem kernels calculated from eq.
, we first define simple sub-kernels as follows:
kv={1=for v=∈vx and v′=∈vx′) <dig>
ke={ <dig>
gv =  <dig>    ∀v ∈ vx ∪ vx'
ge =  <dig>    ∀e ∈ ex ∪ ex'.
when p* →  <dig>  the dag-based stem kernels calculated form eq.
with the above sub-kernels approach the naive stem kernels calculated from eq.
since both eqs.
and  designate recursive traversal to all substructures of x and x' in the sense of the partial order ≺, and when p* =  <dig>  the substructures of x and x' for both kernels which contribute kernel values are identical to each other due to these sub-kernels.
more sophisticated kernels can be constructed using substitution scoring matrices, as well as local alignment kernels  <cit> :
kv=exp⁡)     ∈vx and v′=∈vx′),
ke={γn+n <dig>
gv = γ <dig>    ∀v ∈ vx ∪ vx'
ge = γn,   ∀e ∈ ex ∪ ex',
where s is a substitution scoring function from a base pair  to a base pair , α >  <dig> is a weight parameter for base pairs, γ >  <dig> is the decoy factor for loop regions, and n is the number of nucleotides in the loop region enclosed by base pairs at both ends of an edge e.
in our experiments, we employed the ribosum 80- <dig>  <cit>  for s, and p* =  <dig> , α =  <dig> , γ =  <dig> , which were optimized by cross-validation tests.
in order to prevent sequence length bias, we normalize our kernels k as follows:
k′=kkk.
stem kernels can be applied only to rna secondary structures.
however, primary sequences are still important for calculating the similarities between a pair of rna sequences.
therefore, in order to take into account both primary sequences and secondary structures, we combine our stem kernels with the local alignment kernels by adding them.
profile-profile stem kernels
if multiple alignments of homologous rna sequences are available, we can calculate their base-paring probability matrices more precisely by taking the averaged sum of individual base-pairing probability matrices in accordance with the given multiple alignment  <cit> .
the algorithm of the dag-based stem kernels for a pair of rna sequences can be extended to that for a pair of multiple alignments of rna sequences using averaged base-pairing probability matrices.
since the method of the averaged base-paring probability matrices has been proven to be accurate and robust by kiryu et al.
<cit> , we can expect this method to improve the proposed stem kernel method.
we call these profile-profile stem kernels.
we denote the i-th column of a multiple alignment a by ai, a nucleotide in ai of the j-th sequence by aij, and the number of aligned sequences in a by num.
we can calculate the averaged base-pairing probability matrix of a given multiple alignment a as follows:
pkla=1num∑x∈ap′klx,p′klx={pρρx′ <dig>
where x' is the sequence x with all gaps removed and ρ is an index on x' of the k-th column of a. after constructing pkla, we can build dags, and the kernel kv for columns can be calculated by replacing the substitution function s in eq.
with
s=1numnum∑i=1num∑i′=1nums′s′={s <dig>
RESULTS
in this section, we present some of the results of our experiments in order to confirm the validity of our method as well as a discussion of those results.
discrimination with svms and other kernel machines
we performed several experiments in which svms based on our kernel attempted to detect known ncrna families.
the accuracy was assessed using the specificity  and the sensitivity , which are defined as follows:
sp=tntn+fp,sn=tptp+fn,
where tp is the number of correctly predicted positives, fp is the number of incorrectly predicted positives, tn is the number of correctly predicted negatives, and fn is the number of incorrectly predicted negatives.
furthermore, the area under the receiver operating characteristic  curve, i.e., the roc score, was also used for evaluation.
the roc curve plots the true positive rates  as a function of the false positive rates  for varying decision thresholds of a classifier.
in our first experiment, the discrimination ability and the execution time of the stem kernels were tested on our previous dataset used in  <cit> , which includes five rna families: trnas, mirnas , 5s rrnas, h/aca snornas, and c/d snornas.
we chose  <dig> sequences in each rna family from the rfam database  <cit>  as positive samples such that the pairwise identity was not above 80% for any pair of sequences, and  <dig> randomly shuffled sequences with the same dinucleotide composition as the positives were generated as negative samples for each family.
the discrimination performance was evaluated using 10-fold cross validation.
in order to determine an appropriate cutoff threshold for the base-pairing probabilities p*, we performed the experiments for various values of p* ∈ { <dig> ,  <dig> ,  <dig> ,  <dig> }.
figure  <dig> shows the accuracy and the calculation time for each threshold.
since the accuracy for p* =  <dig>  was slightly better than that for the other values, and the calculation time in this case was acceptable for practical use, we fixed p* =  <dig>  as the default cutoff threshold of the base-pairing probabilities.
then, we compared the dag-based stem kernels with the naive stem kernels.
the experimental results shown in table  <dig> indicate that the dag-based kernels are significantly faster than the naive kernels owing to the approximation by a predefined threshold of the base-pairing probability.
furthermore, in spite of using an approximation, the dag-based kernels are slightly more accurate than the naive kernels due to the convolution with the local alignment kernels and the removal of low-likelihood base pairs which may create noise.
the dataset contains five rna families: trnas, mirnas, 5s rrnas, h/aca snornas, and c/d snornas.
ncrna type: name of the target ncrna family.
roc: roc score, equal to the area under the roc curve.
sp: specificity of the discrimination of the target ncrna family.
sn: sensitivity of the discrimination of the target ncrna family.
time: averaged time for each kernel computation on a  <dig>  ghz amd opteron processor.
next, we performed the experiment on a large dataset including multiple alignments, which was used to train rnaz  <cit> .
this dataset includes  <dig> ncrna families of  <dig>  original alignments, extracted from the rfam database  <cit> , with the exception of the single-recognition particle  rna and rnasep, which were extracted from  <cit> .
each alignment consists of two to ten sequences aligned by clustal-w  <cit> , and the mean pairwise identities are between 50% and 100%.
the dataset also includes  <dig>  negatives, which were generated from the original alignments by shuffling the columns, where the conservation rate on each column was preserved  <cit> .
in this experiment, for each rna family, svms trained the model which distinguishes the original alignments of a target rna family from all other original and shuffled alignments in the dataset.
we compared the profile-profile stem kernels with the local alignment kernels  <cit> , which only consider primary sequences of rnas.
subsequently, we extended the local alignment kernels using the same technique as in the case of the profile-profile stem kernels in order to account for multiple alignments.
the discrimination performance of both kernels was evaluated with 10-fold cross-validation.
table  <dig> presents the experimental results for this dataset.
the stem kernels attained nearly perfect discrimination for all families in this dataset, while the local alignment kernels failed to discriminate some families.
the performance with respect to tmrna and rnase p in terms of sensitivity was especially low.
furthermore, the stem kernels collected a smaller number of support vectors in comparison with the local alignment kernels due to the robustness of the stem kernels with respect to secondary structures.
this is a desirable feature since the prediction process of svms requires only support vectors for the calculation of kernel values against an input sequence.
ncrna type: name of the target ncrna family.
rfam accession: accession number of the target ncrna family in rfam.
n: number of alignments.
roc: roc score, equal to the area under the roc curve.
sp: specificity of the discrimination of the target ncrna family.
sn: sensitivity of the discrimination of the target ncrna family.
nsv: number of support vectors collected in the training processes and their rates against the numbers of the training alignments within parentheses.
in addition, we employed another kernel machine instead of svm, called support vector data description   <cit> , which calculates a spherically shaped boundary around a dataset so as to increase the robustness against outliers without the need for negative examples.
in other words, svdd does not need to generate artificial negative examples.
many applications of svms to biological problems require the artificial generation of negative examples such as shuffled positive sequences.
however, since most artificial negatives can be easily distinguished from positives in many cases, the generation of artificial negative examples is a crucial problem to attaining practical prediction performance  <cit> .
in this regard, svdd can avoid this problem by using only positive examples.
we applied svdd instead of svms to the above dataset.
table  <dig> shows the surprising discovery that there is little difference in the accuracy of svms and svdd.
this result indicates that negative examples produced by shuffling the alignments make a very small contribution to learning the classifiers with our kernels.
furthermore, the number of support vectors in svdd decreased significantly in comparison to svms.
ncrna type: name of the target ncrna family.
rfam accession: accession number of the target ncrna family in rfam.
n: number of alignments.
roc: roc score, equal to the area under the roc curve.
sp: specificity of the discrimination of the target ncrna family.
sn: sensitivity of the discrimination of the target ncrna family.
nsv: number of support vectors collected in the training processes and their rates against the numbers of the training alignments within parentheses.
in this section, we trained svms with the stem kernels to detect particular ncrna families.
on the other hand, the svms in rnaz are trained to detect any structural ncrnas, including unknown ncrnas  <cit> .
in order to demonstrate that rnaz is capable of discovering unknown ncrnas with no bias toward the ncrna families of the training set, svms were trained by excluding particular families of ncrnas, and were used for classifying the excluded ncrnas and the shuffled negatives.
we attempted the same training scheme as described in  <cit>  to investigate the ability of the stem kernels to discover unknown ncrnas using the same dataset as in the experiment of table  <dig>  as a result, the roc scores in this test were  <dig>  for the stem kernels,  <dig>  for the local alignment kernels, and  <dig>  for rnaz.
this result suggests that the ability of stem kernels to discover unknown ncrnas is weaker than that of rnaz.
the key feature in discovering unknown structural ncrnas is to detect evolutionary conserved structures in multiple sequence alignments.
the sci used in rnaz directly assesses the structure conservation in multiple alignments, and it contributes to the ability of detecting unknown structural ncrnas.
however, since the sci cannot measure the structural similarities between rna sequences, it is difficult to apply it to other aspects of structural rna analysis, such as detecting particular families.
on the other hand, the stem kernels evaluate common stem structures between two multiple alignments, in other words, the stem kernels are not the measure of the structure conservation, but rather are the measure of the structural similarity between ncrnas.
therefore, the stem kernels can be applied to various kernel methods including not only svms but also kernel principal component analysis , kernel canonical correlation analysis , and so on  <cit> .
remote homology search
furthermore, we conducted a remote homology search of ncrnas using svms with our kernel.
our kernel method was compared with infernal  <cit>  based on profile scfgs.
infernal has been recommended for rna homology search by the benchmark of currently available rna homology search tools called bralibase iii  <cit> .
this benchmark dataset contains trnas, 5s rrnas and u <dig> spliceosomal rnas, which have relatively conserved sequences and/or secondary structures, whereby both infernal and our kernel can easily detect homologs .
therefore, we performed a more practical remote homology search on the dataset shown in table  <dig>  which includes  <dig> sequences of h/aca snornas and  <dig> sequences of c/d snornas in c. elegans from the literature  <cit> .
these mean pairwise identities are too low to be discovered by existing methods.
for each family, non-homologs were generated by shuffling every sequence  <dig> times.
the shuffling processes preserved dinucleotide frequencies.
twenty query sets of  <dig> and  <dig> sequences were sampled from each family, respectively.
using these query sets, we attempted to search for homologs among all of the original and the shuffled sequences.
ncrna type: name of the target ncrna family.
n: number of sequences in the dataset of the target ncrna family.
length: average length of the sequences.
%id: mean pairwise identity of the dataset.
for infernal, each query was aligned by clustal-w  <cit> , folded by rnaalifold  <cit> , and converted into a covariance model .
the cm searched for homologous sequences in the dataset, calculating a bit score for each sequence.
a roc curve can be plotted using the bit scores as decision values.
for the stem kernel, every sequence for each query was shuffled  <dig> times in order to generate negative samples.
then, the svm with the stem kernel learned the discrimination model from the query and the negatives.
the model searched for homologous sequences in the dataset, calculating an svm class probability for each sequence.
a roc curve can be plotted in this case using svm class probabilities as decision values.
figures  <dig> and  <dig> display the roc curves of the homology searches of h/aca snornas and c/d snornas by infernal and svms with the stem kernels.
the stem kernel produced more precise results than infernal with respect to searching the target families for homologs.
in particular, in the h/aca snornas experiment, the stem kernel was capable of detecting them accurately even with queries of  <dig> sequences.
however, the accurate identification of c/d snornas was problematic for both methods, which can be attributed to the poor secondary structures of c/d snornas.
in fact, the identification of c/d snornas is difficult for many structure-based methods.
note that the sequences in the datasets shown in table  <dig> are remotely homologous to each other, which makes it difficult for rnaalifold to calculate common secondary structures from alignments produced by clustal-w. infernal searches the common secondary structure of the query sequences for a given sequence, and thus the cm search fails if no acceptable covariance model for the query sequences can be generated.
although using structural alignments for ncrnas might improve the homology search with infernal, it is not certain that given query sequences have common secondary structures.
in such cases, it is difficult for any alignment programs to produce robust alignments with acceptable common secondary structures.
in fact, the secondary structures of snornas used in our experiments are highly diverse so that we often did not obtain suitable multiple alignments for building cms even if using structural alignment programs .
in contrast, svms calculate kernel values, i.e., pairwise similarities, between every pair of examples, and learn the weight parameters for each example in order to maximize the margin between the positives and the negatives.
after this, the trained svms predict the classification of a new example based on the weighted sum of kernel values of the new example and all the training examples.
in other words, svms make a decision about the classification based on the majority voting principle with respect to the optimized weights.
this approach minimizes the risk of mispredictions and makes decisions which are more robust than those of the methods which use only one representative such as a common secondary structure of the query sequences, that is, svms with our kernel require no common secondary structures of the query sequences, and can make robust predictions in performing remote homology search of structural ncrnas.
this approach, however, requires a number of kernel computations for each sequence to be analyzed, proportional to the number of support vectors collected in training svms.
therefore, the prediction process should take a long computation time if the training process could not reduce the number of support vectors.
kernel hierarchical clustering
we attempted to attain a kernel hierarchical clustering using the weighted pair group method algorithm  with the stem kernels for the same dataset as  <cit> , extracted from the rfam database  <cit> , which contains  <dig> ncrna families and a total of  <dig>  sequences that have no more than 80% sequence identity and do not exceed  <dig> nt in length.
figure  <dig> shows the resulting dendrogram of the dataset, indicating some typical families, where sequences of the same family are likely to be contained in the same cluster  be the number of sequence pairs in the same cluster which belong to the same family of rfam.
analogously, let the number of false positives  be the number of sequence pairs in the same cluster which belong to different families, the number of false negatives  be the number of sequence pairs from the same family which lie in different clusters, and the number of true negatives  be the number of sequence pairs from different families which lie in different clusters.
the roc curve plots the true positive rates as a function of the false positive rates for different clustering thresholds.
figure  <dig> shows the roc curves for our kernel and locarna  <cit> .
locarna produced hierarchical clusters whose roc score was  <dig> , while our kernel produced a score of  <dig> .
locarna and the dag-based stem kernels are similar to each other in their approximation technique, in which the base pairs whose base-pairing probability is below a predefined threshold are disregarded.
one of the most important differences between the above two methods is that locarna calculates a score for only the best scoring secondary structure with bifurcations, while stem kernels sum all scores over an ensemble of common stem structures, including any suboptimal structures.
in other words, stem kernels can be regarded as a variant of sankoff algorithm  <cit> , which calculates the partition function without any bifurcations.
this feature of stem kernels determines their robustness with respect to measuring structural similarities.
CONCLUSIONS
we have developed a new technique for analyzing structural rna sequences using kernel methods.
this technique is based on directed acyclic graphs  derived from base-pairing probability matrices of rna sequences, and significantly reduces the computation time for stem kernels.
our method considers only likely base pairs whose base-pairing probability is above a predefined threshold.
the kernel values are calculated using dag kernels, where each dag is produced from these likely base pairs.
furthermore, we have proposed profile-profile stem kernels for multiple alignments of rna sequences, which utilize the averaged base-pairing probability matrices of multiple alignments of rna sequences.
our kernels outperformed the existing methods for detection of known ncrnas by using svms and kernel hierarchical clustering.
in the experiments where svms were used, the stem kernels performed nearly perfect discrimination in the dataset, and collected a smaller number of support vectors in comparison with the local alignment kernels due to the robustness of the stem kernels with respect to secondary structures.
therefore, stem kernels can be used for reliable similarity measurements of structural rnas, and can be utilized in various applications using kernel methods.
the new technique proposed in this paper significantly increases the computation speed for stem kernels, which is a step toward the realization of a genome-scale search of ncrnas using stem kernels.
since our method is capable of detecting remote homology, it is possible to discover new ncrnas which cannot be detected with existing methods.
availability
our implementation of the profile-profile stem kernels is available at  under the gnu public license.
it takes rna sequences or multiple alignments, and calculates a kernel matrix, which can be used as an input for a popular svm tool called libsvm  <cit> .
furthermore, our software is capable of parallel processing using the message passing interface   <cit> .
authors' contributions
ks developed the algorithm, wrote the code and performed all experiments.
tm, ka and ys provided helpful insights in the experiments and the discussion, while ys initiated the project.
ks drafted the manuscript.
all authors read and approved the final manuscript.
supplementary material
additional file 1
a newick format file used for drawing figure  <dig>  figure  <dig> was produced from this file using the r ape package .
click here for file
additional file 2
a magnifiable version of figure  <dig>  similarly to figure  <dig>  this figure was produced from additional file  <dig> using the r ape package, and was stored in pdf format in order to enable magnification.
click here for file
acknowledgements
this work was supported in part by a grant from "functional rna project" funded by the new energy and industrial technology development organization  of japan, and was also supported in part by grant-in-aid for scientific research on priority area "comparative genomics" no.
<dig> from the ministry of education, culture, sports, science and technology of japan.
we thank dr. s. washietl and dr. i. l. hofacker for providing us with their large-scale dataset of multiple alignments of non-coding rnas.
we also thank our colleagues from the rna informatics team at the computational biology research center  for fruitful discussions.

 recent discoveries of a large variety of important roles for non-coding rnas, including gene regulation or maturation of mrnas, rrnas and trnas, have been reported by many researchers. most functional ncrnas form secondary structures related to their functions, and secondary structures without pseudoknots can be modeled by stochastic context-free grammars. therefore, several computational methods based on scfgs have been developed for modeling and analyzing functional ncrna sequences. these grammatical methods work very well if the secondary structures of the target ncrnas are modeled successfully. however, it is difficult to build such stochastic models since it is necessary to construct complicated models, to prepare the number of training sequences, and/or to obtain prior knowledge for some families containing non-uniform and/or non-homologous sequences such as snorna families. thus, we need more robust methods for performing structural ncrna analysis. on the other hand, support vector machines and other kernel methods are being actively studied, and have been proposed for solving various problems in many research fields, including bioinformatics. these methods are more robust than other existing methods, and we therefore considered using kernel methods including svms instead of the grammatical methods to analyze functional ncrnas. several kernels for ncrna sequences have been developed so far. kin et al. have proposed marginalized count kernels for rna sequences. their kernels calculate marginalized count vectors of base-pair features under scfgs trained with a given dataset, and compute the inner products. therefore, marginalized count kernels inherit the drawback of the grammatical methods. washietl et al. have developed a program called rnaz, which detects structurally conserved regions from multiple alignments by using svms. rnaz employs the averaged z-score of the minimum free energy for each sequence and structure conservation index. assuming that mfe for the common secondary structure is close to that for each sequence if a given multiple alignment is structurally conserved, sci is defined as the rate of mfe for the common secondary structure to the averaged mfe for each sequence. these features allow for the detection of structurally conserved regions. however, since these features cannot measure the structural similarities between rna sequences, it is difficult to apply them to other aspects of structural rna analysis, such as detecting particular families. several works which involve some helpful features specific to given target families have been proposed. these family-specific methods perform well in detecting their target families. however, in order to apply this strategy to other families, it is necessary to develop new features for every family. for the purpose of analyzing ncrnas using kernel methods including support vector machines, we have proposed stem kernels, which extend the string kernels to measure the similarities between two rna sequences from the viewpoint of secondary structures. the feature space of the stem kernels is defined by enumerating all possible common base pairs and stem structures of arbitrary lengths. however, since the computational time and memory size required for the naive implementation of stem kernels are of the order of o, where n is the length of the inputted rna sequence, applying stem kernels directly to large data sets of ncrnas is impractical. therefore, we develop a new technique based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences, which significantly reduces the computational time of stem kernels. the time and space complexity of this method are approximately of the order of o. furthermore, we propose profile-profile stem kernels for multiple alignments of rna sequences, which utilize base-pairing probability matrices for multiple alignments instead of those for individual sequences. methods in this section, we propose new kernels for analyzing ncrnas. first, an outline of our previous work is provided, after which the proposed new technique based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences is described. finally, the proposed kernels are extended to kernels for multiple alignments of rna sequences by utilizing averaged base-pairing probability matrices. naive stem kernel algorithms before proposing the new method, we briefly describe stem kernels which have been proposed as an extension of the string kernels for measuring the similarities between two rna sequences from the viewpoint of secondary structures. the feature space of the stem kernels is defined by enumerating all possible common base pairs and stem structures of arbitrary lengths. the stem kernel calculates the inner product of common stem structure counts. in other words, the more stem structures two rna sequences have in common, the more similar they are. however, the time needed for the explicit enumeration of all substructures obviously grows exponentially, which renders this method infeasible for long sequences. we have therefore developed an algorithm for calculating stem kernels which is based on the dynamic programming technique. for an rna sequence x = x1x... xn, we denote a contiguous subsequence xj... xk by x, and the length of x by |x|. the empty sequence is indicated by ∊. for a base a, the complementary base is denoted as a¯. for a string x and a base a, xa denotes the concatenation of x and a. for two rna sequences x and x', the stem kernel k is defined recursively as follows: k=k= for ∀x,x′,k=k+∑xk=a¯∑i<j s.t. x′i=a¯,x′j=ak. both the time and the memory required for the calculation k are of the order of o, which renders this method impractical for applying to large data sets of ncrnas. stem kernels with dag representation here, we develop a new technique based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences, which significantly reduces the time needed for computing stem kernels. figure contains a diagram illustrating the calculation of the new kernels. first, for each rna sequence x = x1x... xn, we calculate a base-pairing probability matrix px using the mccaskill algorithm. we denote the base-pairing probability of by pijx, which is defined as: pijx=e=∑y∈ypiij, where y is an ensemble of all possible secondary structures of x, p is the posterior probability of y given x, and iij is an indicator function, which equals if the i-th and the j-th nucleotides form a base-pair in y or otherwise. we employ the vienna rna package for computing these expected counts using the mccaskill algorithm. subsequently, we build a dag for the base-pairing probability matrix, where each vertex corresponds to a base pair whose probability is above a predefined threshold p*. let gx = be the dag for an rna sequence x, where vx and ex are vertices and edges in the dag gx, respectively. for each vi = ∈ vx, is a likely base pair, in other words, pklx≥p∗. each eij ∈ ex is an edge from vertex vi to vertex vj. for vertices vi = and vi' =, we can define a partial order, vi ≺ vi' if and only if k <k' and l > l'. an edge eii' connects vertices vi and vi' if and only if vi ≺ vi' and there exists no vj ∈ vx such that vi ≺ vj ≺ vi'. finally, we calculate a kernel value between two dags representing rna structure information through the dag kernel using a dynamic programming technique. the vertices in the dag can be numbered in a topological order such that for every edge eij, i <j is satisfied, in other words, there are no directed paths from vj to vi if i <j. thus, we can apply the dynamic programming technique as follows: k=∑vi∈root,vi′∈rootrr={kv+gv+gvkv+gv∑j>iger+gvkv+gv+gv∑j′>i′gerkv∑j>i,j′>i′ker+gv∑j>iger+gv∑j′>i′ger where root is a set of vertices which have no incoming edges, kv and ke are kernel functions for vertices and edges, respectively, and gv and ge are gap penalties for vertices and edges, respectively. k calculates the sum of kernel values for all pairs of possible substructures of gx and gx'. each of these kernel values is composed of the product of the subkernels kv, ke, gv and ge. therefore, k is a convolution kernel and is positive semi-definite if kv and ke are also positive semi-definite. the time and the memory required for the computation of k are of the order of o and o, respectively, where c is the maximum out-degree of gx and gx'. we can control |vx| using the predefined threshold for base pairs, p*. when p* = vx contains all possible base pairs, i.e., |vx| = n/ when p* > since each base can take part in vx at most 1/p* times, |vx| is proportional to n of the length of the rna sequence x. since in many cases c ≪ |vx|, the time and the memory required for this algorithm are approximately of the order of o for sufficiently large values of p*. several choices of sub-kernels kv, ke, gv and ge in eq. are available. in order to connect the dag-based stem kernels to the naive stem kernels calculated from eq., we first define simple sub-kernels as follows: kv={1=for v=∈vx and v′=∈vx′) ke={ gv =    ∀v ∈ vx ∪ vx' ge =    ∀e ∈ ex ∪ ex'. when p* → the dag-based stem kernels calculated form eq. with the above sub-kernels approach the naive stem kernels calculated from eq. since both eqs. and designate recursive traversal to all substructures of x and x' in the sense of the partial order ≺, and when p* = the substructures of x and x' for both kernels which contribute kernel values are identical to each other due to these sub-kernels. more sophisticated kernels can be constructed using substitution scoring matrices, as well as local alignment kernels: kv=exp⁡)     ∈vx and v′=∈vx′), ke={γn+n gv = γ    ∀v ∈ vx ∪ vx' ge = γn,   ∀e ∈ ex ∪ ex', where s is a substitution scoring function from a base pair to a base pair, α > is a weight parameter for base pairs, γ > is the decoy factor for loop regions, and n is the number of nucleotides in the loop region enclosed by base pairs at both ends of an edge e. in our experiments, we employed the ribosum 80- for s, and p* =, α =, γ =, which were optimized by cross-validation tests. in order to prevent sequence length bias, we normalize our kernels k as follows: k′=kkk. stem kernels can be applied only to rna secondary structures. however, primary sequences are still important for calculating the similarities between a pair of rna sequences. therefore, in order to take into account both primary sequences and secondary structures, we combine our stem kernels with the local alignment kernels by adding them. profile-profile stem kernels if multiple alignments of homologous rna sequences are available, we can calculate their base-paring probability matrices more precisely by taking the averaged sum of individual base-pairing probability matrices in accordance with the given multiple alignment. the algorithm of the dag-based stem kernels for a pair of rna sequences can be extended to that for a pair of multiple alignments of rna sequences using averaged base-pairing probability matrices. since the method of the averaged base-paring probability matrices has been proven to be accurate and robust by kiryu et al., we can expect this method to improve the proposed stem kernel method. we call these profile-profile stem kernels. we denote the i-th column of a multiple alignment a by ai, a nucleotide in ai of the j-th sequence by aij, and the number of aligned sequences in a by num. we can calculate the averaged base-pairing probability matrix of a given multiple alignment a as follows: pkla=1num∑x∈ap′klx,p′klx={pρρx′ where x' is the sequence x with all gaps removed and ρ is an index on x' of the k-th column of a. after constructing pkla, we can build dags, and the kernel kv for columns can be calculated by replacing the substitution function s in eq. with s=1numnum∑i=1num∑i′=1nums′s′={s  in this section, we present some of the results of our experiments in order to confirm the validity of our method as well as a discussion of those results. discrimination with svms and other kernel machines we performed several experiments in which svms based on our kernel attempted to detect known ncrna families. the accuracy was assessed using the specificity and the sensitivity, which are defined as follows: sp=tntn+fp,sn=tptp+fn, where tp is the number of correctly predicted positives, fp is the number of incorrectly predicted positives, tn is the number of correctly predicted negatives, and fn is the number of incorrectly predicted negatives. furthermore, the area under the receiver operating characteristic curve, i.e., the roc score, was also used for evaluation. the roc curve plots the true positive rates as a function of the false positive rates for varying decision thresholds of a classifier. in our first experiment, the discrimination ability and the execution time of the stem kernels were tested on our previous dataset used in, which includes five rna families: trnas, mirnas, 5s rrnas, h/aca snornas, and c/d snornas. we chose sequences in each rna family from the rfam database as positive samples such that the pairwise identity was not above 80% for any pair of sequences, and randomly shuffled sequences with the same dinucleotide composition as the positives were generated as negative samples for each family. the discrimination performance was evaluated using 10-fold cross validation. in order to determine an appropriate cutoff threshold for the base-pairing probabilities p*, we performed the experiments for various values of p* ∈ {,,, }. figure shows the accuracy and the calculation time for each threshold. since the accuracy for p* = was slightly better than that for the other values, and the calculation time in this case was acceptable for practical use, we fixed p* = as the default cutoff threshold of the base-pairing probabilities. then, we compared the dag-based stem kernels with the naive stem kernels. the experimental results shown in table indicate that the dag-based kernels are significantly faster than the naive kernels owing to the approximation by a predefined threshold of the base-pairing probability. furthermore, in spite of using an approximation, the dag-based kernels are slightly more accurate than the naive kernels due to the convolution with the local alignment kernels and the removal of low-likelihood base pairs which may create noise. the dataset contains five rna families: trnas, mirnas, 5s rrnas, h/aca snornas, and c/d snornas. ncrna type: name of the target ncrna family. roc: roc score, equal to the area under the roc curve. sp: specificity of the discrimination of the target ncrna family. sn: sensitivity of the discrimination of the target ncrna family. time: averaged time for each kernel computation on a ghz amd opteron processor. next, we performed the experiment on a large dataset including multiple alignments, which was used to train rnaz. this dataset includes ncrna families of original alignments, extracted from the rfam database, with the exception of the single-recognition particle rna and rnasep, which were extracted from. each alignment consists of two to ten sequences aligned by clustal-w, and the mean pairwise identities are between 50% and 100%. the dataset also includes negatives, which were generated from the original alignments by shuffling the columns, where the conservation rate on each column was preserved. in this experiment, for each rna family, svms trained the model which distinguishes the original alignments of a target rna family from all other original and shuffled alignments in the dataset. we compared the profile-profile stem kernels with the local alignment kernels, which only consider primary sequences of rnas. subsequently, we extended the local alignment kernels using the same technique as in the case of the profile-profile stem kernels in order to account for multiple alignments. the discrimination performance of both kernels was evaluated with 10-fold cross-validation. table presents the experimental results for this dataset. the stem kernels attained nearly perfect discrimination for all families in this dataset, while the local alignment kernels failed to discriminate some families. the performance with respect to tmrna and rnase p in terms of sensitivity was especially low. furthermore, the stem kernels collected a smaller number of support vectors in comparison with the local alignment kernels due to the robustness of the stem kernels with respect to secondary structures. this is a desirable feature since the prediction process of svms requires only support vectors for the calculation of kernel values against an input sequence. ncrna type: name of the target ncrna family. rfam accession: accession number of the target ncrna family in rfam. n: number of alignments. roc: roc score, equal to the area under the roc curve. sp: specificity of the discrimination of the target ncrna family. sn: sensitivity of the discrimination of the target ncrna family. nsv: number of support vectors collected in the training processes and their rates against the numbers of the training alignments within parentheses. in addition, we employed another kernel machine instead of svm, called support vector data description, which calculates a spherically shaped boundary around a dataset so as to increase the robustness against outliers without the need for negative examples. in other words, svdd does not need to generate artificial negative examples. many applications of svms to biological problems require the artificial generation of negative examples such as shuffled positive sequences. however, since most artificial negatives can be easily distinguished from positives in many cases, the generation of artificial negative examples is a crucial problem to attaining practical prediction performance. in this regard, svdd can avoid this problem by using only positive examples. we applied svdd instead of svms to the above dataset. table shows the surprising discovery that there is little difference in the accuracy of svms and svdd. this result indicates that negative examples produced by shuffling the alignments make a very small contribution to learning the classifiers with our kernels. furthermore, the number of support vectors in svdd decreased significantly in comparison to svms. ncrna type: name of the target ncrna family. rfam accession: accession number of the target ncrna family in rfam. n: number of alignments. roc: roc score, equal to the area under the roc curve. sp: specificity of the discrimination of the target ncrna family. sn: sensitivity of the discrimination of the target ncrna family. nsv: number of support vectors collected in the training processes and their rates against the numbers of the training alignments within parentheses. in this section, we trained svms with the stem kernels to detect particular ncrna families. on the other hand, the svms in rnaz are trained to detect any structural ncrnas, including unknown ncrnas. in order to demonstrate that rnaz is capable of discovering unknown ncrnas with no bias toward the ncrna families of the training set, svms were trained by excluding particular families of ncrnas, and were used for classifying the excluded ncrnas and the shuffled negatives. we attempted the same training scheme as described in to investigate the ability of the stem kernels to discover unknown ncrnas using the same dataset as in the experiment of table as a result, the roc scores in this test were for the stem kernels, for the local alignment kernels, and for rnaz. this result suggests that the ability of stem kernels to discover unknown ncrnas is weaker than that of rnaz. the key feature in discovering unknown structural ncrnas is to detect evolutionary conserved structures in multiple sequence alignments. the sci used in rnaz directly assesses the structure conservation in multiple alignments, and it contributes to the ability of detecting unknown structural ncrnas. however, since the sci cannot measure the structural similarities between rna sequences, it is difficult to apply it to other aspects of structural rna analysis, such as detecting particular families. on the other hand, the stem kernels evaluate common stem structures between two multiple alignments, in other words, the stem kernels are not the measure of the structure conservation, but rather are the measure of the structural similarity between ncrnas. therefore, the stem kernels can be applied to various kernel methods including not only svms but also kernel principal component analysis, kernel canonical correlation analysis, and so on. remote homology search furthermore, we conducted a remote homology search of ncrnas using svms with our kernel. our kernel method was compared with infernal based on profile scfgs. infernal has been recommended for rna homology search by the benchmark of currently available rna homology search tools called bralibase iii. this benchmark dataset contains trnas, 5s rrnas and u spliceosomal rnas, which have relatively conserved sequences and/or secondary structures, whereby both infernal and our kernel can easily detect homologs. therefore, we performed a more practical remote homology search on the dataset shown in table which includes sequences of h/aca snornas and sequences of c/d snornas in c. elegans from the literature. these mean pairwise identities are too low to be discovered by existing methods. for each family, non-homologs were generated by shuffling every sequence times. the shuffling processes preserved dinucleotide frequencies. twenty query sets of and sequences were sampled from each family, respectively. using these query sets, we attempted to search for homologs among all of the original and the shuffled sequences. ncrna type: name of the target ncrna family. n: number of sequences in the dataset of the target ncrna family. length: average length of the sequences. %id: mean pairwise identity of the dataset. for infernal, each query was aligned by clustal-w, folded by rnaalifold, and converted into a covariance model. the cm searched for homologous sequences in the dataset, calculating a bit score for each sequence. a roc curve can be plotted using the bit scores as decision values. for the stem kernel, every sequence for each query was shuffled times in order to generate negative samples. then, the svm with the stem kernel learned the discrimination model from the query and the negatives. the model searched for homologous sequences in the dataset, calculating an svm class probability for each sequence. a roc curve can be plotted in this case using svm class probabilities as decision values. figures and display the roc curves of the homology searches of h/aca snornas and c/d snornas by infernal and svms with the stem kernels. the stem kernel produced more precise results than infernal with respect to searching the target families for homologs. in particular, in the h/aca snornas experiment, the stem kernel was capable of detecting them accurately even with queries of sequences. however, the accurate identification of c/d snornas was problematic for both methods, which can be attributed to the poor secondary structures of c/d snornas. in fact, the identification of c/d snornas is difficult for many structure-based methods. note that the sequences in the datasets shown in table are remotely homologous to each other, which makes it difficult for rnaalifold to calculate common secondary structures from alignments produced by clustal-w. infernal searches the common secondary structure of the query sequences for a given sequence, and thus the cm search fails if no acceptable covariance model for the query sequences can be generated. although using structural alignments for ncrnas might improve the homology search with infernal, it is not certain that given query sequences have common secondary structures. in such cases, it is difficult for any alignment programs to produce robust alignments with acceptable common secondary structures. in fact, the secondary structures of snornas used in our experiments are highly diverse so that we often did not obtain suitable multiple alignments for building cms even if using structural alignment programs. in contrast, svms calculate kernel values, i.e., pairwise similarities, between every pair of examples, and learn the weight parameters for each example in order to maximize the margin between the positives and the negatives. after this, the trained svms predict the classification of a new example based on the weighted sum of kernel values of the new example and all the training examples. in other words, svms make a decision about the classification based on the majority voting principle with respect to the optimized weights. this approach minimizes the risk of mispredictions and makes decisions which are more robust than those of the methods which use only one representative such as a common secondary structure of the query sequences, that is, svms with our kernel require no common secondary structures of the query sequences, and can make robust predictions in performing remote homology search of structural ncrnas. this approach, however, requires a number of kernel computations for each sequence to be analyzed, proportional to the number of support vectors collected in training svms. therefore, the prediction process should take a long computation time if the training process could not reduce the number of support vectors. kernel hierarchical clustering we attempted to attain a kernel hierarchical clustering using the weighted pair group method algorithm with the stem kernels for the same dataset as, extracted from the rfam database, which contains ncrna families and a total of sequences that have no more than 80% sequence identity and do not exceed nt in length. figure shows the resulting dendrogram of the dataset, indicating some typical families, where sequences of the same family are likely to be contained in the same cluster be the number of sequence pairs in the same cluster which belong to the same family of rfam. analogously, let the number of false positives be the number of sequence pairs in the same cluster which belong to different families, the number of false negatives be the number of sequence pairs from the same family which lie in different clusters, and the number of true negatives be the number of sequence pairs from different families which lie in different clusters. the roc curve plots the true positive rates as a function of the false positive rates for different clustering thresholds. figure shows the roc curves for our kernel and locarna. locarna produced hierarchical clusters whose roc score was, while our kernel produced a score of. locarna and the dag-based stem kernels are similar to each other in their approximation technique, in which the base pairs whose base-pairing probability is below a predefined threshold are disregarded. one of the most important differences between the above two methods is that locarna calculates a score for only the best scoring secondary structure with bifurcations, while stem kernels sum all scores over an ensemble of common stem structures, including any suboptimal structures. in other words, stem kernels can be regarded as a variant of sankoff algorithm, which calculates the partition function without any bifurcations. this feature of stem kernels determines their robustness with respect to measuring structural similarities.  we have developed a new technique for analyzing structural rna sequences using kernel methods. this technique is based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences, and significantly reduces the computation time for stem kernels. our method considers only likely base pairs whose base-pairing probability is above a predefined threshold. the kernel values are calculated using dag kernels, where each dag is produced from these likely base pairs. furthermore, we have proposed profile-profile stem kernels for multiple alignments of rna sequences, which utilize the averaged base-pairing probability matrices of multiple alignments of rna sequences. our kernels outperformed the existing methods for detection of known ncrnas by using svms and kernel hierarchical clustering. in the experiments where svms were used, the stem kernels performed nearly perfect discrimination in the dataset, and collected a smaller number of support vectors in comparison with the local alignment kernels due to the robustness of the stem kernels with respect to secondary structures. therefore, stem kernels can be used for reliable similarity measurements of structural rnas, and can be utilized in various applications using kernel methods. the new technique proposed in this paper significantly increases the computation speed for stem kernels, which is a step toward the realization of a genome-scale search of ncrnas using stem kernels. since our method is capable of detecting remote homology, it is possible to discover new ncrnas which cannot be detected with existing methods. availability our implementation of the profile-profile stem kernels is available at under the gnu public license. it takes rna sequences or multiple alignments, and calculates a kernel matrix, which can be used as an input for a popular svm tool called libsvm. furthermore, our software is capable of parallel processing using the message passing interface. authors' contributions ks developed the algorithm, wrote the code and performed all experiments. tm, ka and ys provided helpful insights in the experiments and the discussion, while ys initiated the project. ks drafted the manuscript. all authors read and approved the final manuscript. supplementary material additional file 1 a newick format file used for drawing figure figure was produced from this file using the r ape package. click here for file additional file 2 a magnifiable version of figure similarly to figure this figure was produced from additional file using the r ape package, and was stored in pdf format in order to enable magnification. click here for file acknowledgements this work was supported in part by a grant from "functional rna project" funded by the new energy and industrial technology development organization of japan, and was also supported in part by grant-in-aid for scientific research on priority area "comparative genomics" no. from the ministry of education, culture, sports, science and technology of japan. we thank dr. s. washietl and dr. i. l. hofacker for providing us with their large-scale dataset of multiple alignments of non-coding rnas. we also thank our colleagues from the rna informatics team at the computational biology research center for fruitful discussions.
we have developed a new technique based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences that significantly increases the computation speed of stem kernels. recent discoveries of a large variety of important roles for non-coding rnas have been reported by numerous researchers. our kernels outperformed the existing methods with respect to the detection of known ncrnas and kernel hierarchical clustering. furthermore, we propose profile-profile stem kernels for multiple alignments of rna sequences which utilize base-pairing probability matrices for multiple alignments instead of those for individual sequences. however, applying stem kernels directly to large data sets of ncrnas is impractical due to their computational complexity. in order to analyze ncrnas by kernel methods including support vector machines, we propose stem kernels as an extension of string kernels for measuring the similarities between two rna sequences from the viewpoint of secondary structures. stem kernels can be utilized as a reliable similarity measure of structural rnas, and can be used in various kernel-based applications.
 recent discoveries of a large variety of important roles for non-coding rnas have been reported by numerous researchers. in order to analyze ncrnas by kernel methods including support vector machines, we propose stem kernels as an extension of string kernels for measuring the similarities between two rna sequences from the viewpoint of secondary structures. however, applying stem kernels directly to large data sets of ncrnas is impractical due to their computational complexity.  we have developed a new technique based on directed acyclic graphs derived from base-pairing probability matrices of rna sequences that significantly increases the computation speed of stem kernels. furthermore, we propose profile-profile stem kernels for multiple alignments of rna sequences which utilize base-pairing probability matrices for multiple alignments instead of those for individual sequences. our kernels outperformed the existing methods with respect to the detection of known ncrnas and kernel hierarchical clustering.  stem kernels can be utilized as a reliable similarity measure of structural rnas, and can be used in various kernel-based applications. 