BACKGROUND
current estimates suggest that approximately 30% of human proteins contain multiple repeats of short motifs and could be classified as “periodic proteins”  <cit> .
in many cases, proteins with such motifs fold into three-dimensional structures resembling solenoids  eidos ) and thus are called solenoid or solenoid-like proteins.
a well-known example of solenoid proteins are leucine rich repeats  present in the innate immunity or receptors  and in thousands of other proteins with various other functions and extremely variable consensus sequences  <cit> .
other examples include ankyrin repeats involved in various protein–protein interactions and armadillo repeats that, together with other homologous classes, such as heat repeats, form helical solenoids and are found in proteins involved in cell adhesion  <cit> .
solenoid proteins evolved by a series of duplications of an ancestral motif, but the precise order of duplications is often unknown and may differ between and sometimes even within families.
accumulated mutations, deletions, and insertions lead to increasing divergence between individual repeats.
for many proteins, this divergence can be quite extreme with almost no sequence similarity between individual copies of the ancestral motif  <cit> .
as a result, solenoid repeats are often difficult to recognize in sequence, for instance pfam hidden markov models recognize less than half of the repeats in nlr and tlr proteins.
hence, automated detection of subtle motif variations from sequence is often impossible.
because protein structures tend to be more conserved than sequences, similarity is retained on the structural level and recognition of the repeats is thus easier  <cit> .
still, repeats have significant variations of length and shape, making the precise recognition of individual solenoid units highly nontrivial.
for instance, in lrr proteins the length of the individual repeats varies between  <dig> and  <dig>  and not a single position, including the leucines forming the telltale pattern, is universally conserved in all repeats.
the local divergence of the motifs has consequences on the global-structure level.
in lrr proteins, the curvature of the entire domain varies from an ideal curvature in ribonuclease inhibitors  or nlrs  <cit>  to an irregular curvature of tlrs  <cit> , with consequences for the binding properties within the inner cavity of the protein.
detection of repeats in proteins, both on the sequence and structure level, has gained importance as structures of more proteins with solenoid repeats have become known.
almost simultaneously, the sensitivity of sequence-based recognition has improved.
both these trends resulted in better appreciation of the relative number of proteins with repeats and the importance of the detection problem.
various detection algorithms of repeated motifs in protein sequences have been developed, with gibbs sampling  <cit>  and radar  <cit>  as some of the first, and many others have followed  <cit> .
some of them are focused specifically on solenoid repeats in which fourier-based analysis seems to produce the best results  <cit> .
to the best of our knowledge, only four detectors of repetitive units in protein structures have been described in literature:  davros  <cit>  was probably the first method for this task, with detection based on a self-alignment matrix,  prostrip  <cit>  performs repeat detection based on the cα backbone angles,  raphael  <cit>  is specifically devoted to the detection of solenoid repeats and is based on repeated fourier analysis of cα coordinates with appended machine-learning classification, and  a hierarchical approach based on successive bisection of the structure into tiles for self-alignment  <cit> .
raphael is the best solenoid classifier to date as it significantly exceeds solenoid detection performance of sequence-based methods, while the hierarchical structural analysis from  <cit>  is the most versatile approach to detect all possible types of structural repeats.
here we present console, a new method to determine the presence and specific positions of individual solenoid repeat units within protein structures.
template matching, a popular image-processing procedure, applied to contact maps determines whether individual residues are part of a solenoid domain or part of a non-solenoid segment.
this approach is further generalized to classify whether a whole protein structure under scrutiny is solenoid or non-solenoid.
console is assessed on a benchmark dataset and directly compared to raphael, the only publicly available solenoid detection algorithm.
we furthermore demonstrate how accurate detection and subsequent structural alignment of solenoid units can be used to automatically retrieve the solenoid sequence motif from structure.
finally, as an example of a large-scale analysis enabled by the development of the console algorithm, we analyze the length distribution of solenoid units in a large number of solenoid-like protein structures to automatically detect subtle variations of solenoid units in three solenoid protein families.
methods
pattern of solenoid units in contact maps
contact maps  provide a simple but powerful means for protein structure comparison and alignment  <cit> , prediction  <cit>  and visualization of protein structural features  <cit> .
here we show how cms can be used to identify solenoid proteins and to calculate lengths of individual units, even for very divergent repeats.
below, we briefly specify the contact map definition used here and explain how solenoid unit lengths are estimated.
specifically, we define sidechains of residue i and j of all n residues to be in contact if the distance of any pair of their heavy atoms ai, aj is below a specified threshold:
ci,j:ai−aj≤t
we use the distance threshold of t =  <dig>  Å, following our earlier applications of contact maps  <cit> , and assign a value of  <dig>  or  <dig>  to each of the n × n positions on the map.
as expected, structural repeats in protein structures correspond to repeating patterns in the cm.
the most striking feature of cms for solenoid protein structures is an almost continuous line d <dig> of contacts running parallel to the main diagonal d <dig>  the presence of a point on d <dig> indicates that a residue from one solenoid unit is in contact with a residue in the neighboring units .
we also tested other contact definitions , but they did not reveal alternative significant features in the maps for solenoid detection other than d <dig>
we define λ as the average repeat length in a solenoid protein structure.
in contact maps, the distance between d <dig> and d <dig> is related to the repeat length by a formula λ = | d1- d <dig> |.
because contacts are aligned along the main diagonal in the cm, we have to iterate along d <dig> in order to determine the most frequent contact length:
λ=argmaxn=660∑i=0nci,i+n
argmax returns the argument with the maximum value of a function.
sampling the complete cm to obtain λ is not required since λ is expected to be in the interval  of potentially contacting residues.
these boundaries are based on the fact that contacts shorter than  <dig> residues are within the α-helical contact range and that solenoid unit lengths beyond  <dig> residues are virtually nonexistent  <cit> .
lengths of solenoid repeats are typically in the  interval.
repeat lengths λi of individual solenoids unit spanning over a short segment  can also be calculated when the detection in equation  <dig> is confined to .
rule-based classification of solenoids vs. non-solenoids
in many solenoid proteins, regular repeats are interrupted by insertions that are not part of the solenoid.
we developed a rule-based classifier analyzing only contact information to detect whether a residue is or is not a part of a solenoid unit.
it mimics a human approach on detecting solenoid units in contact maps.
this classifier is based on sampling each line in the contact map for each residue i, starting at the main diagonal  for each sample.
the first step toward determining whether residue i is or is not part of the solenoid unit was to find gaps within d <dig>  gaps in d <dig> indicate insertions where the given segment does not interact with the next turn of the solenoid.
we defined significant contact gaps to be at least  <dig> residues long, without any upper margin.
a gap starting at residue i is defined as:¬
gapi=if∀j∈i;i+ <dig> ∀k∈j+6;j+60:¬cj,k
in order to identify solenoid units with variable lengths, we iterate over the cm and analyze each residue i and the following residues within a window i = .
we assign a solenoid unit starting at residue i by:¬
solenoidi=if∀j∈i:¬gapj∧ <dig> ⋅λ≤λi≤2⋅λ
then, we reassess each solenoid unit by determining the individual unit length λi with equation  <dig>  we annotate a solenoid unit starting at i and ending at i + λi if solenoid is true.
the algorithm then continues at i = i + λi +  <dig>  if solenoid is false, however, we continue either at i = i +  <dig> or at the end of a gap.
template matching and svm-based classification of solenoids vs. non-solenoids
the core algorithm implemented in console is based on image-processing methods to detect solenoids and non-solenoid regions in protein structures.
for this, we apply a template-matching algorithm to the contact map and classify the resulting scores with a trained support vector machine .
template matching in a contact map
template matching  is a popular image-processing technique allowing one to find specific patterns  in images  or other multidimensional data.
a standard approach in tm is to use normalized cross correlation  in order to find potential areas resembling the searched pattern p. i and p must not necessarily match in size.
moreover, it is rather common that p is significantly smaller than i with accurate normalization accounting for the size difference.
the ncc is typically defined as:
ncci,sx,y=∑i,jsi,j−s¯ix+i,y+j−i¯x,yσsσix,y
where s¯ is the mean and σs the standard deviation of s,i¯x,y is the mean and σix,y the standard deviation of a region around x, y in i with the same size as s. ncc returns a matrix containing correlation coefficients in the range of .
a result of  <dig> indicates a perfect match,  <dig> indicates no similarity, and − <dig> indicates inverse similarity  <cit> .
images and cms are usually represented as a matrix of n × m pixels, and, hence, ncc can be used to localize any kind of pattern within a cm.
in order to determine whether a residue is part of a solenoid or not, two patterns are correlated with the structure’s cm:  one pattern representing the typical solenoid contact pattern with two parallel diagonals, resulting in a correlation matrix m <dig> and  one pattern with only one main diagonal for non-solenoids, resulting in a correlation matrix m <dig> .
both patterns are generated dynamically at runtime.
the pattern size in the x and y dimensions are set to 2λ in order to accommodate d <dig> fully in the solenoid pattern.
this way, both patterns used in the analysis are adapted to the specific solenoid length of the given structure.
support vector classification of correlation features
the support vector machine is a machine-learning method used for supervised classification in many computational disciplines  <cit> .
it is especially renowned for being able to classify multidimensional data while maintaining a low error rate based on its maximum margin hyper-plane determined during training.
in console, we make use of the svm to assign residues to solenoid or non-solenoid classes according to their previously determined correlation coefficients.
we therefore collect correlation coefficients around the main diagonal from the ncc results as shown in figure  <dig>  feature vectors are generated by concatenating  <dig> correlation coefficients from m <dig> with  <dig> correlation coefficients from m <dig> .
all coefficients were extracted from their respective matrices at the positions .
visual inspection of the feature vectors clearly indicated significant differences between both correlation features for the same cm regions.
we observed smooth correlation peaks for solenoid segments while correlation features of globular proteins had rather noisy shapes.
conclusively, the shape of the correlation peaks provides a characteristic feature for automated classification.
class labels were available from the corresponding benchmark annotation and assigned to each feature vector prior to svm training.
final classification of structures
in order to compare classification results to the results in literature, we extend classification of individual residues and repeats to the level of complete structures using a simple threshold measure.
if the ratio of the total number of residues classified as being in solenoid units to the number of all residues exceeds the threshold value, the whole structure is classified to be a solenoid :
solenoidstructure=#solenoids#residues≥t
setting the t value to  <dig>  provided the best agreement with benchmark results.
a detailed assessment of different t values is presented in the additional file  <dig>
detection of solenoid sequence-motifs by solenoid unit alignment
we extended the solenoid detection algorithm with an automated feature to recognize individual solenoid motifs.
it is based on the local λi value where units include all residues with the indexes in .
we extend the usage of equation  <dig> to measure the quality of each solenoid unit and accept units as being solenoids only if their solenoid abundance solenoid is larger than  <dig> .
if solenoid <  <dig>  we continue with the next residue i +  <dig>  this condition prevents beginnings or ends of non-solenoid regions from contributing to the motif detection.
in order to improve identification of consensus motifs, we perform structural alignment of all units using rigid alignment in the fatcat  <cit>  and posa  <cit>  pipeline.
we extract the common core determined by posa to build a sequence alignment from the respective common core overlaps  <cit> .
finally, we use weblogo to visualize the consensus motif  <cit>  for the repeat.
solenoid benchmark data
we used a previously published test dataset to assess the accuracy of console.
this dataset was originally established for testing sequence repeat detectors  <cit>  and has since been used as a benchmark for both sequence  <cit>  and structure based repeat detectors  <cit> .
the benchmark comprises  <dig> solenoid structures for which λ, solenoid and non-solenoid residues, have been manually annotated.
a total of  <dig> non-solenoid structures were also included in this dataset to provide a large variety of non-solenoid samples.
the dataset contains  <dig>  residues in total, out of which  <dig>  were annotated as being part of solenoid repeats.
implementation
all the algorithms described here were implemented in python, utilizing additional packages such as biopython  <cit>  for accessing pdb files, pytom  <cit>  for correlation functions and parallel processing on multiple cpus, and scikit  <cit>  to interface with the machine-learning algorithms.
the algorithm used on the server is also available for download from the server page http://console.sanfordburnham.org.
residue classification results are available in xml format containing solenoid unit boundaries for further analysis.
RESULTS
figures of merit
based on the benchmark dataset, we were able to use annotations of  solenoid repeat lengths to evaluate solenoid length detection and  predefined residue labels to evaluate classification results.
hence, we were able to determine true-positive , true-negative , false-positive , and false-negative  rates.
furthermore, sensitivity:tptp+fn,precision:tptp+fnandaccuracy:tp+tntp+fp+fn+tn were determined for the solenoid and the non-solenoid class, respectively.
our final figure of merit for all algorithms was the matthews correlation coefficient  <cit> :
tp×tn−fp×fntp+fptp+fntn+fptn+fn
solenoid unit length estimates
the fidelity of our solenoid detector was tested on each structure from the benchmark dataset.
each automatically detected λ was compared to the manually annotated value.
the accuracy was determined to a mean standard deviation of  <dig>  residues.
the original annotators postulate that an error tolerance of up to  <dig> residues is acceptable for structural solenoid detectors  <cit> , so the accuracy of our method is well within the tolerance level.
assessing automated solenoid classification
first, classification of residues to the solenoid or non-solenoid class was assessed for a random classifier.
the underlying random distribution was adjusted to the distribution in the benchmark annotation of all residues, resulting in a distribution such that ~23% of all residues were annotated as solenoids while the remaining ~77% were non-solenoid residues.
a total of  <dig>  random draws from this distribution were used to calculate the baseline performance for both of our classifiers.
in the random assignments, an average of ~63% of all residues were assigned correctly while ~37% were false assignments.
more precisely,  <dig>  solenoids and  <dig>  non-solenoids were predicted correctly.
the mcc of the random residue classification was ~ <dig> .
extending this random assignment with equation  <dig> and t =  <dig>  or t =  <dig>  to the level of whole structures failed to detect any solenoid structure correctly.
next, we assessed the classification fidelity of our rule-based classifier .
this classifier showed relatively high sensitivity and precision for solenoid residues.
however, results for non-solenoid residues were low, resulting in an mcc of  <dig> .
extending solenoid classification with equation  <dig> and t =  <dig>  to the whole structure level revealed an mcc =  <dig> .
sol.
nsol.
sol.
nsol.
sol.
nsol.
sol.
nsol.
sol.
sol.
evaluation of solenoid/non-solenoid classification accuracies determined for all solenoid classifiers mentioned.
sensitivity, precision, accuracy, and mcc were determined on a standard benchmark dataset of  <dig> solenoid  and  <dig> non-solenoid  protein structures.
results were determined either for individual residues  or for whole structures .
finally, the classification fidelity of console was determined at both the residue and whole-structure level .
consistent with previous studies, a leave-one-out cross validation of the classifier was performed: all features from one structure were excluded for svm training, and this structure was scrutinized  <cit> .
results of this cross validation determined the matthews correlation coefficient for the residue classification to be  <dig> .
figure  <dig> shows classification results of four selected structures, while all results on the benchmark data are visualized online.
details on the svm training parameters and our trials with other classifiers  are provided in the additional file  <dig>
in order to compare console classification to other methods, we generalized classification to entire protein structures based on equation  <dig>  results of this generalized classification are also presented in table  <dig>  and the matthews correlation coefficient was determined here to be  <dig> .
based on the results published for raphael, the mcc was determined to be  <dig>  for svm value >  <dig> and  <dig>  for svm value >  <dig>
additional file 2: figure s <dig> in the presents the roc curve of whole-structure classification and provides an additional means for direct comparison to raphael.
solenoid consensus motif from unit alignments
detecting solenoid motifs in sequence is difficult because  the length of a solenoid repeat is typically short, increasing the signal-to-noise ratio as compared to the typical domains and full-length proteins, and  sequence similarity may be too weak for detection of very divergent repeats.
pfam profiles for solenoid families such as lrr, armadillo, or ankyrin try to address these problems by defining hmms consisting of several repeat units for divergent family members.
for instance, the lrr profile for lrr <dig>  has a length of  <dig> residues that is in accordance with the primary repeat interval —class  <dig> in  <cit> .
however, the hmm for lrr <dig>  has a length of  <dig> residues, encompassing approximately five repeats of the actual motif.
this approach is used for other solenoid families: ankyrin hmms: pf00023— <dig> residues and pf12796— <dig> residues , armadillo/heat: pf02985— <dig> residues and pf13646— <dig> residues , and others.
while improving the recognition sensitivity, this approach is inconsistent and leads to confusing results, where simultaneous high-significance matches to overlapping hmms of different lengths are possible.
we processed structures from the lrr, ankyrin, and armadillo/heat families and determined their respective sequence motifs .
the motifs obtained with console were in excellent agreement with motifs available in literature.
for instance, the sequence motif determined for the ribonuclease inhibitor  was almost identical with the ri typical sequence  <cit> .
the only difference to the known motif was the start position in sequence, which is an arbitrary parameter.
to obtain a perfect alignment of our motif to the standard motif, the motif sequence had to be shifted by  <dig> residues.
unknown solenoid structures in the pdb
many protein coordinate sets in the pdb are not described in a peer-reviewed manuscript and also often lack any significant annotations.
to identify such proteins, we parsed all pdb headers for the keywords “jrnl ref to be published,” which resulted in a large set  of structures.
in the next step, we applied console to identify novel, perhaps unrecognized solenoid protein structures within this set.
indeed,  <dig> structures from this set were classified as solenoids.
next, the sequence similarity of each protein against the complete collection of pdb proteins was determined.
here we ruled out homologs of proteins that have already been annotated as solenoids.
the search for already known solenoid homologs was furthermore extended to the pfam database, eliminating proteins mapping to known solenoid proteins such as ankyrin , armadillo , or leucine rich repeat .
nineteen solenoid structures remained after these steps.
many of them were tim barrels, identified here as solenoids because the torus-like structure also produces the second diagonal feature in contact maps.
hence, they are sometimes referred to as “closed” solenoids  <cit> .
among the remaining true solenoid protein structures we observed were a few interesting lrr domains with an unusual flat structure  or two flat domains connected by a kink , both highly divergent bacterial lrr proteins.
their consensus motifs show an interesting overabundance of phenylalanine residues that could be linked to their atypical, flat structures by stacking interactions .
the conserved region of the sequence motif determined for 4fd <dig>  differs from the classical conserved motif region because there was no significant alignment of asparagine-like residues  as in the standard lrr motif—.
moreover, this conserved motif matches with the tplrr conserved sequence motif, and 4fd <dig> is probably one of the first structures ever to be determined for this lrr family  <cit> .
another unrecognized solenoid protein structure was a hypothetical protein from b. thetaiotaomicron .
interestingly, a domain homologous to this protein is found in one of the classes of immunoglobulin a <dig> proteases, where it overlaps with an n-terminal immunoglobulin a <dig> protease domain.
this domain was not known to consist of repeats, but detailed analysis of the automatically identified repeats performed as described in the previous paragraph suggests that repeats in this domain are distantly related to glug repeats.
glug is found in other classes of immunoglobulin a <dig> proteases, suggesting that the different classes could actually be distantly homologous.
analysis of solenoid unit length distributions in solenoid families
solenoid-like protein structures, by their very nature, generally show a high degree of structural regularity.
however, subtle variations at the level of individual solenoid units are possible, with accumulated mutations, deletions or insertions altering the length and shape of individual units.
such small local irregularities can add up to very significant structural differences between entire proteins and are important for functional adaptations of individual proteins.
reliable and reproducible detection of such subtle irregularities in unit lengths for whole protein families is impossible by manual analysis.
hence, we used console to automatically analyze the leucine rich repeat, ankyrin repeat and armadillo repeat families for length irregularities of solenoid units.
the structures were obtained from a representative set of pdb structures clustered at 90% sequence identity, a total of  <dig> structures  for the lrr family,  <dig> structures  for the ankyrin and  <dig> structures  for the armadillo repeats.
units were assigned to irregularity classes based on the unit-length irregularity measured by |λj– λ|, where j is the index of a respective solenoid unit.
we now can associate length regularity profiles with the regularity of a whole structure .
flat profiles indicate a very regular structure, while peaks in the profile indicate positions of unusual variations in solenoid unit lengths and, as a consequence, a divergent/irregular overall structure.
for instance, the unit-length irregularity distribution of the lrr structures revealed that 57% of all analyzed solenoid units are highly regular  and, such as in the case of ribonuclease inhibitor , result in a regular, torus-like structure.
however, large deviations from the mean length λ were observed in many structures, such as in a structure of the tlr <dig> extracellular domain  where irregularities result in a horseshoe-like structure with varied curvature.
this irregularity provides tlrs with the ability to adjust their shape to bind different ligands  <cit> .
we show that ankyrin repeats are the most regular among the three families we analyzed here, with no deviation from λ for approximately 75% of all solenoid units .
on the other hand, the armadillo repeats turns out to be the most irregular with 23% of all solenoid units being at least two residues off from the average length λ.
CONCLUSIONS
in this work we present console, an algorithm based on a novel combination of contact map analysis and image-processing algorithms that focuses on recognition of solenoid repeats in structures of periodic proteins.
contact maps are naturally suited for solenoid recognition because of the presence of a characteristic line parallel to the main diagonal in the contact map.
albeit being the most intuitive approach for solenoid unit detection, direct analysis of contacts did not provide the desired accuracy of repeat recognition.
to improve the recognition, we used a standard technique of template matching in image analysis based on successive cross correlations of dynamically generated solenoid and non-solenoid patterns.
the further classification of the computed correlation coefficients with a support vector machine allowed high-accuracy solenoid classification as measured by the mcc on the standard solenoid recognition benchmark.
console is both more accurate and much faster than any available solenoid classifier.
however, there are still a few examples of solenoid protein structures that pose challenges for the current implementation.
most notable are protein structures with non-solenoid segments running close to the solenoid domain.
such non-solenoid segments alter the contact patterns in a way that leads console to classify neighboring solenoid residues as non-solenoids.
an example of such a structure is the structure of gamma carbonic anhydrase .
another factor for false classification results were false-negative classifications of complete solenoid units encapsulating long insertions .
while the insertion segment was classified correctly as a non-solenoid, residues in solenoid units in contact with the insertion were wrongly classified as non-solenoids.
one interesting application of console is to analyze individual solenoid units and retrieve their consensus motifs from structural alignments.
as we demonstrated, this application is robust enough to be integrated in a completely automated pipeline.
we proved that separation of individual solenoid units and subsequent multiple structure alignment reliably detects solenoid specific motifs.
consensus motifs stemming from distinctive solenoid families were retrieved successfully for individual structures and indicate that current pfam hmms for solenoids were trained using sequences that were too long.
finally, we extended console analysis from individual structures to large groups of proteins in order to analyze the extent of structural irregularities within each family.
such local irregularities are correlated with function differences between homologs from the same family, such as a difference between ribonuclease inhibitor-like, regular and tlr receptors, the irregular members of the lrr family.
we were also able to compare the irregularity patterns and show that ankyrin structures generally are more regular than lrrs and armadillo repeats.
thus, we believe that console would be useful for further sequence- or structure-based analysis of solenoid proteins as it allows the user to reliably identify consensus motifs and to detect structural irregularities, leading either to developing more accurate motif definitions or to structure analysis of individual units and detecting their variations.
availability of supporting data
the data sets supporting the results of this article are available in online on http://console.sanfordburnham.org in xml format and 3d visualization.
competing interests
the authors declare that they have no competing interests.
authors’ contributions
th carried out development, implementation and assessment of the methods in console.
th also prepared the figures and wrote the manuscript.
ag suggested the project, critically assessed the methodological development, wrote the introduction and edited the manuscript.
both authors read and approved on the manuscript.
supplementary material
additional file 1
parameter test for the svm based classification approach introduced in the main article and performance assessment of alternative classifier combinations.
click here for file
additional file 2: figure s1
roc curve for our solenoid detection algorithms.
a receiver operating characteristic curve determined for the classification of whole structures.
for the support vector machine  based classifier several thresholds scanned are marked on the black curve.
the decision tree based classifier  performed significantly worse.
click here for file
acknowledgements
the authors would like to thank dr. lukasz jaroszewski for valuable discussions and cindy cook for help with editing.
the project was supported by nih r <dig> gm <dig>

 current estimates suggest that approximately 30% of human proteins contain multiple repeats of short motifs and could be classified as “periodic proteins”. in many cases, proteins with such motifs fold into three-dimensional structures resembling solenoids eidos ) and thus are called solenoid or solenoid-like proteins. a well-known example of solenoid proteins are leucine rich repeats present in the innate immunity or receptors and in thousands of other proteins with various other functions and extremely variable consensus sequences. other examples include ankyrin repeats involved in various protein–protein interactions and armadillo repeats that, together with other homologous classes, such as heat repeats, form helical solenoids and are found in proteins involved in cell adhesion. solenoid proteins evolved by a series of duplications of an ancestral motif, but the precise order of duplications is often unknown and may differ between and sometimes even within families. accumulated mutations, deletions, and insertions lead to increasing divergence between individual repeats. for many proteins, this divergence can be quite extreme with almost no sequence similarity between individual copies of the ancestral motif. as a result, solenoid repeats are often difficult to recognize in sequence, for instance pfam hidden markov models recognize less than half of the repeats in nlr and tlr proteins. hence, automated detection of subtle motif variations from sequence is often impossible. because protein structures tend to be more conserved than sequences, similarity is retained on the structural level and recognition of the repeats is thus easier. still, repeats have significant variations of length and shape, making the precise recognition of individual solenoid units highly nontrivial. for instance, in lrr proteins the length of the individual repeats varies between and and not a single position, including the leucines forming the telltale pattern, is universally conserved in all repeats. the local divergence of the motifs has consequences on the global-structure level. in lrr proteins, the curvature of the entire domain varies from an ideal curvature in ribonuclease inhibitors or nlrs to an irregular curvature of tlrs, with consequences for the binding properties within the inner cavity of the protein. detection of repeats in proteins, both on the sequence and structure level, has gained importance as structures of more proteins with solenoid repeats have become known. almost simultaneously, the sensitivity of sequence-based recognition has improved. both these trends resulted in better appreciation of the relative number of proteins with repeats and the importance of the detection problem. various detection algorithms of repeated motifs in protein sequences have been developed, with gibbs sampling and radar as some of the first, and many others have followed. some of them are focused specifically on solenoid repeats in which fourier-based analysis seems to produce the best results. to the best of our knowledge, only four detectors of repetitive units in protein structures have been described in literature: davros was probably the first method for this task, with detection based on a self-alignment matrix, prostrip performs repeat detection based on the cα backbone angles, raphael is specifically devoted to the detection of solenoid repeats and is based on repeated fourier analysis of cα coordinates with appended machine-learning classification, and a hierarchical approach based on successive bisection of the structure into tiles for self-alignment. raphael is the best solenoid classifier to date as it significantly exceeds solenoid detection performance of sequence-based methods, while the hierarchical structural analysis from is the most versatile approach to detect all possible types of structural repeats. here we present console, a new method to determine the presence and specific positions of individual solenoid repeat units within protein structures. template matching, a popular image-processing procedure, applied to contact maps determines whether individual residues are part of a solenoid domain or part of a non-solenoid segment. this approach is further generalized to classify whether a whole protein structure under scrutiny is solenoid or non-solenoid. console is assessed on a benchmark dataset and directly compared to raphael, the only publicly available solenoid detection algorithm. we furthermore demonstrate how accurate detection and subsequent structural alignment of solenoid units can be used to automatically retrieve the solenoid sequence motif from structure. finally, as an example of a large-scale analysis enabled by the development of the console algorithm, we analyze the length distribution of solenoid units in a large number of solenoid-like protein structures to automatically detect subtle variations of solenoid units in three solenoid protein families. methods pattern of solenoid units in contact maps contact maps provide a simple but powerful means for protein structure comparison and alignment, prediction and visualization of protein structural features. here we show how cms can be used to identify solenoid proteins and to calculate lengths of individual units, even for very divergent repeats. below, we briefly specify the contact map definition used here and explain how solenoid unit lengths are estimated. specifically, we define sidechains of residue i and j of all n residues to be in contact if the distance of any pair of their heavy atoms ai, aj is below a specified threshold: ci,j:ai−aj≤t we use the distance threshold of t =   Å, following our earlier applications of contact maps, and assign a value of or to each of the n × n positions on the map. as expected, structural repeats in protein structures correspond to repeating patterns in the cm. the most striking feature of cms for solenoid protein structures is an almost continuous line d of contacts running parallel to the main diagonal d the presence of a point on d indicates that a residue from one solenoid unit is in contact with a residue in the neighboring units. we also tested other contact definitions, but they did not reveal alternative significant features in the maps for solenoid detection other than d we define λ as the average repeat length in a solenoid protein structure. in contact maps, the distance between d and d is related to the repeat length by a formula λ = | d1- d |. because contacts are aligned along the main diagonal in the cm, we have to iterate along d in order to determine the most frequent contact length: λ=argmaxn=660∑i=0nci,i+n argmax returns the argument with the maximum value of a function. sampling the complete cm to obtain λ is not required since λ is expected to be in the interval of potentially contacting residues. these boundaries are based on the fact that contacts shorter than residues are within the α-helical contact range and that solenoid unit lengths beyond residues are virtually nonexistent. lengths of solenoid repeats are typically in the interval. repeat lengths λi of individual solenoids unit spanning over a short segment can also be calculated when the detection in equation  is confined to. rule-based classification of solenoids vs. non-solenoids in many solenoid proteins, regular repeats are interrupted by insertions that are not part of the solenoid. we developed a rule-based classifier analyzing only contact information to detect whether a residue is or is not a part of a solenoid unit. it mimics a human approach on detecting solenoid units in contact maps. this classifier is based on sampling each line in the contact map for each residue i, starting at the main diagonal for each sample. the first step toward determining whether residue i is or is not part of the solenoid unit was to find gaps within d gaps in d indicate insertions where the given segment does not interact with the next turn of the solenoid. we defined significant contact gaps to be at least residues long, without any upper margin. a gap starting at residue i is defined as:¬ gapi=if∀j∈i;i+ ∀k∈j+6;j+60:¬cj,k in order to identify solenoid units with variable lengths, we iterate over the cm and analyze each residue i and the following residues within a window i =. we assign a solenoid unit starting at residue i by:¬ solenoidi=if∀j∈i:¬gapj∧ ⋅λ≤λi≤2⋅λ then, we reassess each solenoid unit by determining the individual unit length λi with equation  we annotate a solenoid unit starting at i and ending at i + λi if solenoid is true. the algorithm then continues at i = i + λi +  if solenoid is false, however, we continue either at i = i +  or at the end of a gap. template matching and svm-based classification of solenoids vs. non-solenoids the core algorithm implemented in console is based on image-processing methods to detect solenoids and non-solenoid regions in protein structures. for this, we apply a template-matching algorithm to the contact map and classify the resulting scores with a trained support vector machine. template matching in a contact map template matching is a popular image-processing technique allowing one to find specific patterns in images or other multidimensional data. a standard approach in tm is to use normalized cross correlation in order to find potential areas resembling the searched pattern p. i and p must not necessarily match in size. moreover, it is rather common that p is significantly smaller than i with accurate normalization accounting for the size difference. the ncc is typically defined as: ncci,sx,y=∑i,jsi,j−s¯ix+i,y+j−i¯x,yσsσix,y where s¯ is the mean and σs the standard deviation of s,i¯x,y is the mean and σix,y the standard deviation of a region around x, y in i with the same size as s. ncc returns a matrix containing correlation coefficients in the range of. a result of indicates a perfect match, indicates no similarity, and − indicates inverse similarity. images and cms are usually represented as a matrix of n × m pixels, and, hence, ncc can be used to localize any kind of pattern within a cm. in order to determine whether a residue is part of a solenoid or not, two patterns are correlated with the structure’s cm: one pattern representing the typical solenoid contact pattern with two parallel diagonals, resulting in a correlation matrix m and one pattern with only one main diagonal for non-solenoids, resulting in a correlation matrix m. both patterns are generated dynamically at runtime. the pattern size in the x and y dimensions are set to 2λ in order to accommodate d fully in the solenoid pattern. this way, both patterns used in the analysis are adapted to the specific solenoid length of the given structure. support vector classification of correlation features the support vector machine is a machine-learning method used for supervised classification in many computational disciplines. it is especially renowned for being able to classify multidimensional data while maintaining a low error rate based on its maximum margin hyper-plane determined during training. in console, we make use of the svm to assign residues to solenoid or non-solenoid classes according to their previously determined correlation coefficients. we therefore collect correlation coefficients around the main diagonal from the ncc results as shown in figure  feature vectors are generated by concatenating correlation coefficients from m with correlation coefficients from m. all coefficients were extracted from their respective matrices at the positions. visual inspection of the feature vectors clearly indicated significant differences between both correlation features for the same cm regions. we observed smooth correlation peaks for solenoid segments while correlation features of globular proteins had rather noisy shapes. conclusively, the shape of the correlation peaks provides a characteristic feature for automated classification. class labels were available from the corresponding benchmark annotation and assigned to each feature vector prior to svm training. final classification of structures in order to compare classification results to the results in literature, we extend classification of individual residues and repeats to the level of complete structures using a simple threshold measure. if the ratio of the total number of residues classified as being in solenoid units to the number of all residues exceeds the threshold value, the whole structure is classified to be a solenoid: solenoidstructure=#solenoids#residues≥t setting the t value to provided the best agreement with benchmark results. a detailed assessment of different t values is presented in the additional file detection of solenoid sequence-motifs by solenoid unit alignment we extended the solenoid detection algorithm with an automated feature to recognize individual solenoid motifs. it is based on the local λi value where units include all residues with the indexes in. we extend the usage of equation  to measure the quality of each solenoid unit and accept units as being solenoids only if their solenoid abundance solenoid is larger than. if solenoid <  we continue with the next residue i +  this condition prevents beginnings or ends of non-solenoid regions from contributing to the motif detection. in order to improve identification of consensus motifs, we perform structural alignment of all units using rigid alignment in the fatcat and posa pipeline. we extract the common core determined by posa to build a sequence alignment from the respective common core overlaps. finally, we use weblogo to visualize the consensus motif for the repeat. solenoid benchmark data we used a previously published test dataset to assess the accuracy of console. this dataset was originally established for testing sequence repeat detectors and has since been used as a benchmark for both sequence and structure based repeat detectors. the benchmark comprises solenoid structures for which λ, solenoid and non-solenoid residues, have been manually annotated. a total of non-solenoid structures were also included in this dataset to provide a large variety of non-solenoid samples. the dataset contains residues in total, out of which were annotated as being part of solenoid repeats. implementation all the algorithms described here were implemented in python, utilizing additional packages such as biopython for accessing pdb files, pytom for correlation functions and parallel processing on multiple cpus, and scikit to interface with the machine-learning algorithms. the algorithm used on the server is also available for download from the server page http://console.sanfordburnham.org. residue classification results are available in xml format containing solenoid unit boundaries for further analysis.  figures of merit based on the benchmark dataset, we were able to use annotations of solenoid repeat lengths to evaluate solenoid length detection and predefined residue labels to evaluate classification results. hence, we were able to determine true-positive, true-negative, false-positive, and false-negative rates. furthermore, sensitivity:tptp+fn,precision:tptp+fnandaccuracy:tp+tntp+fp+fn+tn were determined for the solenoid and the non-solenoid class, respectively. our final figure of merit for all algorithms was the matthews correlation coefficient: tp×tn−fp×fntp+fptp+fntn+fptn+fn solenoid unit length estimates the fidelity of our solenoid detector was tested on each structure from the benchmark dataset. each automatically detected λ was compared to the manually annotated value. the accuracy was determined to a mean standard deviation of residues. the original annotators postulate that an error tolerance of up to residues is acceptable for structural solenoid detectors, so the accuracy of our method is well within the tolerance level. assessing automated solenoid classification first, classification of residues to the solenoid or non-solenoid class was assessed for a random classifier. the underlying random distribution was adjusted to the distribution in the benchmark annotation of all residues, resulting in a distribution such that ~23% of all residues were annotated as solenoids while the remaining ~77% were non-solenoid residues. a total of random draws from this distribution were used to calculate the baseline performance for both of our classifiers. in the random assignments, an average of ~63% of all residues were assigned correctly while ~37% were false assignments. more precisely, solenoids and non-solenoids were predicted correctly. the mcc of the random residue classification was ~. extending this random assignment with equation  and t =  or t =  to the level of whole structures failed to detect any solenoid structure correctly. next, we assessed the classification fidelity of our rule-based classifier. this classifier showed relatively high sensitivity and precision for solenoid residues. however, results for non-solenoid residues were low, resulting in an mcc of. extending solenoid classification with equation  and t =  to the whole structure level revealed an mcc = . sol. nsol. sol. nsol. sol. nsol. sol. nsol. sol. sol. evaluation of solenoid/non-solenoid classification accuracies determined for all solenoid classifiers mentioned. sensitivity, precision, accuracy, and mcc were determined on a standard benchmark dataset of solenoid and non-solenoid protein structures. results were determined either for individual residues or for whole structures. finally, the classification fidelity of console was determined at both the residue and whole-structure level. consistent with previous studies, a leave-one-out cross validation of the classifier was performed: all features from one structure were excluded for svm training, and this structure was scrutinized. results of this cross validation determined the matthews correlation coefficient for the residue classification to be. figure  shows classification results of four selected structures, while all results on the benchmark data are visualized online. details on the svm training parameters and our trials with other classifiers are provided in the additional file in order to compare console classification to other methods, we generalized classification to entire protein structures based on equation  results of this generalized classification are also presented in table  and the matthews correlation coefficient was determined here to be. based on the results published for raphael, the mcc was determined to be for svm value >  and for svm value >  additional file 2: figure s in the presents the roc curve of whole-structure classification and provides an additional means for direct comparison to raphael. solenoid consensus motif from unit alignments detecting solenoid motifs in sequence is difficult because the length of a solenoid repeat is typically short, increasing the signal-to-noise ratio as compared to the typical domains and full-length proteins, and sequence similarity may be too weak for detection of very divergent repeats. pfam profiles for solenoid families such as lrr, armadillo, or ankyrin try to address these problems by defining hmms consisting of several repeat units for divergent family members. for instance, the lrr profile for lrr has a length of residues that is in accordance with the primary repeat interval —class in. however, the hmm for lrr has a length of residues, encompassing approximately five repeats of the actual motif. this approach is used for other solenoid families: ankyrin hmms: pf00023— residues and pf12796— residues, armadillo/heat: pf02985— residues and pf13646— residues, and others. while improving the recognition sensitivity, this approach is inconsistent and leads to confusing results, where simultaneous high-significance matches to overlapping hmms of different lengths are possible. we processed structures from the lrr, ankyrin, and armadillo/heat families and determined their respective sequence motifs. the motifs obtained with console were in excellent agreement with motifs available in literature. for instance, the sequence motif determined for the ribonuclease inhibitor was almost identical with the ri typical sequence. the only difference to the known motif was the start position in sequence, which is an arbitrary parameter. to obtain a perfect alignment of our motif to the standard motif, the motif sequence had to be shifted by residues. unknown solenoid structures in the pdb many protein coordinate sets in the pdb are not described in a peer-reviewed manuscript and also often lack any significant annotations. to identify such proteins, we parsed all pdb headers for the keywords “jrnl ref to be published,” which resulted in a large set of structures. in the next step, we applied console to identify novel, perhaps unrecognized solenoid protein structures within this set. indeed, structures from this set were classified as solenoids. next, the sequence similarity of each protein against the complete collection of pdb proteins was determined. here we ruled out homologs of proteins that have already been annotated as solenoids. the search for already known solenoid homologs was furthermore extended to the pfam database, eliminating proteins mapping to known solenoid proteins such as ankyrin, armadillo, or leucine rich repeat. nineteen solenoid structures remained after these steps. many of them were tim barrels, identified here as solenoids because the torus-like structure also produces the second diagonal feature in contact maps. hence, they are sometimes referred to as “closed” solenoids. among the remaining true solenoid protein structures we observed were a few interesting lrr domains with an unusual flat structure or two flat domains connected by a kink, both highly divergent bacterial lrr proteins. their consensus motifs show an interesting overabundance of phenylalanine residues that could be linked to their atypical, flat structures by stacking interactions. the conserved region of the sequence motif determined for 4fd differs from the classical conserved motif region because there was no significant alignment of asparagine-like residues as in the standard lrr motif—. moreover, this conserved motif matches with the tplrr conserved sequence motif, and 4fd is probably one of the first structures ever to be determined for this lrr family. another unrecognized solenoid protein structure was a hypothetical protein from b. thetaiotaomicron. interestingly, a domain homologous to this protein is found in one of the classes of immunoglobulin a proteases, where it overlaps with an n-terminal immunoglobulin a protease domain. this domain was not known to consist of repeats, but detailed analysis of the automatically identified repeats performed as described in the previous paragraph suggests that repeats in this domain are distantly related to glug repeats. glug is found in other classes of immunoglobulin a proteases, suggesting that the different classes could actually be distantly homologous. analysis of solenoid unit length distributions in solenoid families solenoid-like protein structures, by their very nature, generally show a high degree of structural regularity. however, subtle variations at the level of individual solenoid units are possible, with accumulated mutations, deletions or insertions altering the length and shape of individual units. such small local irregularities can add up to very significant structural differences between entire proteins and are important for functional adaptations of individual proteins. reliable and reproducible detection of such subtle irregularities in unit lengths for whole protein families is impossible by manual analysis. hence, we used console to automatically analyze the leucine rich repeat, ankyrin repeat and armadillo repeat families for length irregularities of solenoid units. the structures were obtained from a representative set of pdb structures clustered at 90% sequence identity, a total of structures for the lrr family, structures for the ankyrin and structures for the armadillo repeats. units were assigned to irregularity classes based on the unit-length irregularity measured by |λj– λ|, where j is the index of a respective solenoid unit. we now can associate length regularity profiles with the regularity of a whole structure. flat profiles indicate a very regular structure, while peaks in the profile indicate positions of unusual variations in solenoid unit lengths and, as a consequence, a divergent/irregular overall structure. for instance, the unit-length irregularity distribution of the lrr structures revealed that 57% of all analyzed solenoid units are highly regular and, such as in the case of ribonuclease inhibitor, result in a regular, torus-like structure. however, large deviations from the mean length λ were observed in many structures, such as in a structure of the tlr extracellular domain where irregularities result in a horseshoe-like structure with varied curvature. this irregularity provides tlrs with the ability to adjust their shape to bind different ligands. we show that ankyrin repeats are the most regular among the three families we analyzed here, with no deviation from λ for approximately 75% of all solenoid units. on the other hand, the armadillo repeats turns out to be the most irregular with 23% of all solenoid units being at least two residues off from the average length λ.  in this work we present console, an algorithm based on a novel combination of contact map analysis and image-processing algorithms that focuses on recognition of solenoid repeats in structures of periodic proteins. contact maps are naturally suited for solenoid recognition because of the presence of a characteristic line parallel to the main diagonal in the contact map. albeit being the most intuitive approach for solenoid unit detection, direct analysis of contacts did not provide the desired accuracy of repeat recognition. to improve the recognition, we used a standard technique of template matching in image analysis based on successive cross correlations of dynamically generated solenoid and non-solenoid patterns. the further classification of the computed correlation coefficients with a support vector machine allowed high-accuracy solenoid classification as measured by the mcc on the standard solenoid recognition benchmark. console is both more accurate and much faster than any available solenoid classifier. however, there are still a few examples of solenoid protein structures that pose challenges for the current implementation. most notable are protein structures with non-solenoid segments running close to the solenoid domain. such non-solenoid segments alter the contact patterns in a way that leads console to classify neighboring solenoid residues as non-solenoids. an example of such a structure is the structure of gamma carbonic anhydrase. another factor for false classification results were false-negative classifications of complete solenoid units encapsulating long insertions. while the insertion segment was classified correctly as a non-solenoid, residues in solenoid units in contact with the insertion were wrongly classified as non-solenoids. one interesting application of console is to analyze individual solenoid units and retrieve their consensus motifs from structural alignments. as we demonstrated, this application is robust enough to be integrated in a completely automated pipeline. we proved that separation of individual solenoid units and subsequent multiple structure alignment reliably detects solenoid specific motifs. consensus motifs stemming from distinctive solenoid families were retrieved successfully for individual structures and indicate that current pfam hmms for solenoids were trained using sequences that were too long. finally, we extended console analysis from individual structures to large groups of proteins in order to analyze the extent of structural irregularities within each family. such local irregularities are correlated with function differences between homologs from the same family, such as a difference between ribonuclease inhibitor-like, regular and tlr receptors, the irregular members of the lrr family. we were also able to compare the irregularity patterns and show that ankyrin structures generally are more regular than lrrs and armadillo repeats. thus, we believe that console would be useful for further sequence- or structure-based analysis of solenoid proteins as it allows the user to reliably identify consensus motifs and to detect structural irregularities, leading either to developing more accurate motif definitions or to structure analysis of individual units and detecting their variations. availability of supporting data the data sets supporting the results of this article are available in online on http://console.sanfordburnham.org in xml format and 3d visualization. competing interests the authors declare that they have no competing interests. authors’ contributions th carried out development, implementation and assessment of the methods in console. th also prepared the figures and wrote the manuscript. ag suggested the project, critically assessed the methodological development, wrote the introduction and edited the manuscript. both authors read and approved on the manuscript. supplementary material additional file 1 parameter test for the svm based classification approach introduced in the main article and performance assessment of alternative classifier combinations. click here for file additional file 2: figure s1 roc curve for our solenoid detection algorithms. a receiver operating characteristic curve determined for the classification of whole structures. for the support vector machine based classifier several thresholds scanned are marked on the black curve. the decision tree based classifier performed significantly worse. click here for file acknowledgements the authors would like to thank dr. lukasz jaroszewski for valuable discussions and cindy cook for help with editing. the project was supported by nih r gm 
periodic proteins, characterized by the presence of multiple repeats of short motifs, form an interesting and seldom-studied group. as a next step of console analysis, we show how detection of solenoid repeats in structures can be used to improve sequence recognition of these motifs and to detect subtle irregularities of repeat lengths in three solenoid protein families. yet, few algorithms have been developed for the detection and analysis of structures of periodic proteins. console recognizes modularity in protein contact maps, allowing for precise identification of repeats in solenoid protein structures, an important subgroup of periodic proteins. the console algorithm provides a fast and accurate tool to recognize solenoid protein structures as a whole and to identify individual solenoid repeat units from a structure. due to often extreme divergence in sequence, detection and analysis of such motifs is performed more reliably on the structural level.
 periodic proteins, characterized by the presence of multiple repeats of short motifs, form an interesting and seldom-studied group. due to often extreme divergence in sequence, detection and analysis of such motifs is performed more reliably on the structural level. yet, few algorithms have been developed for the detection and analysis of structures of periodic proteins.  console recognizes modularity in protein contact maps, allowing for precise identification of repeats in solenoid protein structures, an important subgroup of periodic proteins. tests on benchmarks show that console has higher recognition accuracy as compared to raphael, the only other publicly available solenoid structure detection tool. as a next step of console analysis, we show how detection of solenoid repeats in structures can be used to improve sequence recognition of these motifs and to detect subtle irregularities of repeat lengths in three solenoid protein families.  the console algorithm provides a fast and accurate tool to recognize solenoid protein structures as a whole and to identify individual solenoid repeat units from a structure. console is available as a web-based, interactive server and is available for download at http://console.sanfordburnham.org. protein repeat detectionsolenoid structurecontact maptemplate matchingmachine learning 