in a typical gas chromatography  mass spectrometry ( gc  ms ) study , analytical chemists will usually submit their electron ionization ( ei ) mass spectra to a software system , which attempts to identify each spectrum by matching it exactly to a reference spectrum from a well curated library ( 1 ) .
these libraries are generated by systematically running pure compounds under standard conditions to generate high - quality reference spectra .
one of the largest libraries to date is the nist 08 ei library ( 2 ) which contains spectra for 191  436 compounds ( in its main library ) .
while the coverage of the nist library ensures that for many of the common small molecules an exact match can be provided , if an exact match is not found , the researcher is left with two choices : ( i ) inspection of the nearest , imperfect hits and ( ii ) de novo elucidation of the compound structure , typically with the help of specialized software . several software systems attempt to provide such de novo assignments including amdis ( 3,4 ) and mass frontier ( thermofisher scientific , waltham , ma , usa ) .
these software solutions ultimately rely on a chemical substructure identification ( 5 ) as a key component of their solution strategy .
instead , it attempts to match spectra directly to averaged spectra corresponding to a formal standardized set of annotations ( chebi , described below ) , without seeking an explicit substructure match with the query spectrum .
aristo leverages the development in the chemical informatics community of a formal ontology which aims to cover chemical entities of biological interest 
aristo was derived by matching 3000 spectra from the nist 08 ei library to their respective chebi entries .
the combination of these two resources is used to derive a directed acyclic graph ( dag ) of 400 canonical annotation spectra corresponding to broad ( > 10 member compounds ) chebi concepts . for each chebi concept ( e.g. chebi:46686 or azaalkane ) , the corresponding ei spectra are averaged to generate a canonical annotation spectrum . a user provided query spectrum can then be scored against each of these averaged annotation spectra . from this score a probability of correctness is derived by comparing each score to a previously stored , comprehensive leave - one - out study which allows the system to estimate the precision of each prediction by linear interpolation against an empirical precision - recall plot ( accessible in the results table ) .
the table contains links allowing the user to inspect the query spectrum aligned with the associated annotation spectrum ( in a so - called mirror plot ) as well as precision - recall plots and receiver operating characteristic ( roc ) curves for the training data .
the table also contains the description of each chebi concept as well as a link to the associated entry on the chebi website .
the ontology supported by aristo is expected to expand in parallel to growth in the chebi annotation scheme .
we propose aristo as a potential complementary approach in cases where exact spectral matches are unavailable and furthermore , in cases where approximate matches fail to support any obvious conserved substructure .
a description of the implementation will be provided herein , along with example analyses and future directions .
aristo is built on chebi , which is a relatively recent ontology of chemical entities with relevance to biological research .
though many other resources exist , which address the space of small - molecules , we focused on chebi exclusively due to its commitment to a comprehensive and fully hierarchical ontology . broadly speaking chebi can be understood as a hierarchical tree of nodes ( actually a dag ) , each with a chebi i d ( e.g. chebi:38728 ) and name ( e.g. monocrotophos ) as well as descriptions , synonyms , cross - references to other databases and detailed chemical structures where appropriate .
the lower levels of the hierarchy , the  leaves of the dag , typically correspond to specific compounds whereas internal nodes mostly correspond to increasingly general concepts in chemistry , culminating in 
chemical entity at the root of the tree ( e.g. chebi:24431 ) . as is the case with the well - known gene ontology ( go ) annotation scheme ( 7 ) , most edges in chebi correspond to  is a edges , though chemistry specific relations such as  is enantiomer of and  has parent hydride are also supported . while chebi has experienced phenomenal growth in recent years , it remains committed to a definitive and thorough annotation of all its entries . in support of this goal
whereas uniprot distinguishes its manually curated ( swiss - prot ) entries , chebi highlights the fully curated subset of its database ( so called , 3 star entries ) .
aristo relies only on these , highest rated entries , and consequently , its growth is projected to be limited primarily by the rate of chebi s manual annotation efforts ( in addition to limiting aristo s growth rate , chebi also limits aristo to essentially un - derivatized molecules since derivatized forms are not often explicitly represented in chemical ontologies ) .
furthermore , to ensure robustness , we have opted to focus exclusively on the subset of chebi made entirely of  is a edges and internal nodes for which we could find at least 10 compounds with ei - spectra .
all the spectra used as a foundation for the aristo system were extracted from the nist 08 ei library , which contains 191  436 reference spectra in its main library . with each spectrum
there is a structure provided as well as a compound name along with common synonyms and external accession numbers . while the compound nomenclature does not consistently correspond to any canonical nomenclature , the structure would be , in principle , sufficient to derive an inchikey ( 8,9 ) identifier to match with the one systematically provided by the chebi ontology .
the matching of ei spectra to broad annotations and chemical identifiers is challenging and prone to severe inconsistency . to overcome such pitfalls ,
the following matching - guidelines were considered : ( i ) the chemical structures provided by the nist library do not contain stereochemistry and therefore are only guaranteed to yield the first 14 characters of the inchikey correctly for any given compound . recall that the first 14 letters of any inchikey e.g. whwzlsfabnneni - oahllokosa - n for s - epinastine ( chebi:51036 ) versus whwzlsfabnneni - hnnxbmfysa - n for r - epinastine ( chebi:51035 ) , are produced by hashing the connectivity layer in the original inchi ( and are therefore equivalent for these two compounds ) .
( ii ) while enantiomers almost always produce identical mass - spectra , the remaining characters of the inchikey do provide information on isotopic composition , which can impact the spectrum .
ultimately , in order to minimize the chance of an incorrect match , especially in a first version of the system , the mapping between nist and chebi was achieved not by inchikey , but rather by cas number .
cas was used as a cross - referenced accession that unifies many of the nist and chebi entries .
the resulting basis - set of annotated spectra available to the aristo system was therefore reduced from a potential 200  000 spectra in the nist 08 ei library , through a maximum of 26  000 chebi entries to a cas - supported matching of 3000 chebi - annotated ei spectra . in future versions of the system , we will attempt a more extensive matching in order to support a broader ontology .
this will be achieved by matching on the first 14 characters of the inchikey (  connectivity hashing ) .
this approach was selected for two main reasons : averaging replicate spectra constitutes a valid step in most library curation pipelines , so in a sense aristo is simply treating spectra from different compounds as replicates of the higher - level concept being represented .
second , spectral averaging simplifies the process of cross - validation since there is no need to  retrain when removing a spectrum from the training set .
given a query spectrum and the averaged training data , aristo can generate a score for each concept by applying a simple dot - product to the query and the representative average spectrum for the concept . in order to translate scores into probabilities
, we conducted a complete leave - one - out cross - validation study from which we generated roc curves and precision - recall curves per concept .
aristo reports the area under the curve ( auc ) of the roc curves to help users filter out concepts , which can not be effectively recognized by our simple dot - product against - average - spectrum strategy .
based on numerous tests ( data not shown ) , the users are encourage to ignore entries with auc < 0.8 .
aristo also reports the precision - recall curve , which it uses to translate scores to probabilities on a per concept basis .
while it is evident that more complex learning schemes are likely to yield better coverage in terms of the chebi concept - space , we were able to find 
indeed , these concepts correspond to classes of compounds which can be identified visually by experienced researchers that are trained in the elucidation of structure from mass - spectrometry data ( such compound classes include , e.g. long - chain fatty acids , steroids , etc . )
. 
 figure 1.learning higher level chebi concepts by a naive process of spectral averaging .
the  learnable chebi concepts ( auc>0.8 ) include long - chain fatty acid and steroid which are considered to be
 easily recognizable by mass spectrometry experts while other broad categories such as natural product are relatively unexpected .
note that with increasing compound coverage some of the broader categories ( n>500 ) may decrease in their auc while categories that currently lack adequate spectral support ( n  <  10 ) are likely to cross the threshold of learnability .
the  learnable chebi concepts ( auc>0.8 ) include long - chain fatty acid and steroid which are considered to be
 easily recognizable by mass spectrometry experts while other broad categories such as natural product are relatively unexpected .
note that with increasing compound coverage some of the broader categories ( n>500 ) may decrease in their auc while categories that currently lack adequate spectral support ( n  <  10 ) are likely to cross the threshold of learnability .
the system is extremely easy to use in that it requires only one element of input , namely , a nominal mass spectrum specified as a series of mass and intensity pairs , optionally separated by new lines .
the user pastes the spectrum into the provided input text box and activates the  ontologize button .
candidate spectra will most likely be generated by tools such as spectconnect ( 10 ) which can indentify reproducibly detected spectra that , while resisting identification , seem to be instrumental in discriminating e.g. biological conditions of interest . in figure 2a , the input field contains a spectrum from a lauric acid derivative ( available as example 5 in the examples tab ) .
note that the example spectra are all members of a randomly selected test set comprised of 32 spectra removed prior to the learning phase and made available in the batch mode tab of the aristo website ( see description below ) . 

( a ) the user loads a mass spectrum corresponding to an unknown compound  in this example the structure is known ( chebi:49519 ) and corresponds to example spectrum # 5 in the examples section of the website . the resulting report produced by chebi shows : ( b ) a dag representing the estimated precision and auc for each concept represented as the color and size of each concept - node along with its location within the supported ontology ( an induced subgraph is highlighted in blue which links all chebi annotations passing aristo s default filter back to the dag s root node ) and ( c ) a tabular report showing the estimated precision of each prediction , the correctness of the call ( marked as true / false and available only for the example input provided by the website ) along with image - links to more supporting information . the first image - link yields a mirror plot ( d ) showing the match between the average annotation - spectrum ( top in blue ) for a given annotation , in this case straight - chain saturated fatty acid ( chebi:39418 ) , and the query spectrum ( bottom in red )
( a ) the user loads a mass spectrum corresponding to an unknown compound  in this example the structure is known ( chebi:49519 ) and corresponds to example spectrum # 5 in the examples section of the website .
the resulting report produced by chebi shows : ( b ) a dag representing the estimated precision and auc for each concept represented as the color and size of each concept - node along with its location within the supported ontology ( an induced subgraph is highlighted in blue which links all chebi annotations passing aristo s default filter back to the dag s root node ) and ( c ) a tabular report showing the estimated precision of each prediction , the correctness of the call ( marked as true / false and available only for the example input provided by the website ) along with image - links to more supporting information . the first image - link yields a mirror plot ( d ) showing the match between the average annotation - spectrum ( top in blue ) for a given annotation , in this case straight - chain saturated fatty acid ( chebi:39418 ) , and the query spectrum ( bottom in red ) .
the system returns a complete assessment of whether the spectrum matches one of 388 chemical concepts .
the results are provided in both graphical form ( figure 2b ) and tabular form ( figure 2c ) .
the directed acyclic graph represents the subset of the chebi ontology currently supported by aristo , where each node corresponds to a chebi concept color - coded by the probability that it is a valid annotation for the query spectrum ( ranging from p = 0.0 in red to p = 1.0 in green ) .
the size of each node is proportional to its auc in the comprehensive leave - one - out analysis mentioned previously .
hovering over the node produces a tooltip specifying the node name and clicking on the node brings the user to the relevant chebi webpage .
the tabular results contain sortable columns for the dot - product scores , the chebi node name , the number of compound spectra used to generate the representative average spectrum for the node , the auc for the concept , as well as the estimated precision of the assignment .
in addition , there is a link per annotation which produces a mirror plot ( figure 2d ) allowing the visual comparison of the average annotation spectrum ( top in blue ) with the query spectrum ( bottom in red ) as well as links to plots showing the data collected during the leave - one - out analysis with an additional red data point corresponding to the score produced for the query spectrum .
when a user submits a spectrum from the examples provided by the website itself , an additional column is appended to the table showing the correctness of the call ( according to release 73 of the chebi ontology made in october 2010 ) . by default
, the table is filtered to include only annotations with an auc > 0.8 and they are sorted according to their estimated precision (  est . precision
column ) , which is the preferred figure of merit by which to investigate aristo s output .
this is because the significance of the raw dot - product score (  score column ) is dependent , among other factors , on the size of the category (  n column ) .
the auc and precision - recall plots are particularly useful in this regard , since they allow the user to see the empirical basis for the translation from raw score to estimated precision .
the user can see every element used in the learning phase and effectively compare the dot - score of the query spectrum to all the data points collected during the leave - one - out learning phase ( the query data point is colored red ) .
in the example illustrated in figure 2 ( corresponding to example # 5 in the examples page of the aristo website ) we can see that straight - chain saturated fatty acid ( chebi:39418 ) corresponds to the node with the strongest absolute score and is one of the four nodes showing maximal estimated precision ( in the full , unfiltered table ) . however , two of these four predictions correspond to extremely broad and uninformative categories that also have relatively weak aucs ( they are in fact not visible in the default , filtered version of the results table ) . the entry for chebi:39418 is based on 19 compounds ( n  =  19 ) and an extremely high auc . consequently , chebi:39418 is selected as the more specific and well discriminated category . by clicking on the image links in the auc column and estimated precision columns , the user can inspect the precision - recall and roc curves for chebi:39418 and confirm that a score of 0.898 corresponds to a high - confidence identification .
chebi:39418 is indeed a useful characterization of the input compound which would benefit an experimentalist interested in the chemical nature of the compound .
it is noteworthy that this association is provided despite the fact that , strictly speaking , according to chebi , our input compound ( chebi:49519 ) can not be linked to the chebi:39418 category exclusively through a series of  is - a links ( hence the false entry in the  correct? column ) , rather it is necessary to go through a  has - functional - parent link to lauric acid ( chebi:30805 ) .
while future versions of aristo may leverage these additional link - types explicitly , it is heartening that a version of aristo trained only on the  is - a subset of chebi can recover such relationships .
example # 6 ( not shown in figure 2 but available in the examples page ) corresponds to a compound from the massbank ( 11 ) site : 3alpha,6alpha - dihydroxy-5alpha - cholan-24-oic acid methyl ester which is not incorporated into the chebi ontology ( and hence was never introduced into aristo ) and is derived ( 12 ) from hyodeoxycholic acid ( chebi:52023 ) ; when submitted to aristo this spectrum is correctly annotated as a 3-hydroxy steroid ( chebi:36834 ) .
example # 7 corresponds to apoatropine ( as in example # 6 , this compound is not currently represented in chebi ) .
the spectrum originates from the analysis of datura inoxia seed extracts conducted by the interdepartmental equipment unit of the faculty of agriculture , food and environment .
ms spectrum proved impossible to characterize using nist s ms - search program and the nist08 library : the correct structure was # 36 on the list of suggested structures and only 1 of the top 10 identifications even contained a nitrogen atom .
in contrast , aristo correctly and confidently ( estimated precision = 1.0 ) characterized the spectrum as containing an azabicycloalkane ( chebi:38295 ) .
a final test case is provided in the batch mode tab of the system where the user can upload a set of 32-spectra specifically excluded from the learning phase of the algorithm .
the user can use this data set to get a sense of the system s coverage ( for what percent of typical input spectra will the system issue a prediction ) and whether or not the estimated precision is correct . under the default filtering ( which allows predictions with a minimal estimated precision of 0.5 , i.e. with an expected failure rate of 50% )
the system returns 33 predictions for 13 of the compounds ( or 40% of the input data ) . of these predictions
17 were correct corresponding to 51% of the predictions as expected under the default filtering .
a stricter filtering at 0.75 yields 15 predictions of which 12 are correct , corresponding again to a well - calibrated 80% of the responses .
however , the coverage has now dropped to only 6 compounds or 19% of the input data
( in fact , the user may recognize some of these compounds as examples 15 in the examples tab ) .
the coverage of the system is expected to increase as it grows beyond the initial basis - set of 3000 spectra . despite the relatively low coverage ,
it is again heartening to see that the system makes correct predictions for every compound except for chebi:49519 where , as described previously , the predictions are indeed meaningful and the annotation in the  correct? column is set to false essentially due to the fact that aristo currently considers only  is - a links in the chebi dictionary .
aristo represents an existence proof for the idea of direct chemical characterization of mass spectra without explicit substructure matching .
we expect aristo to be used primarily by experimentalists and to support the growing field of chemical informatics .
aristo aims to close the gap between the enormous scale of small molecule spectral libraries and the nascent , relatively poor coverage of chemical ontologies associated with the small molecule concept space .
the ei spectra are used as connectors between these spaces with the hope to circumvent the need for substructure identification .
recall that often the identity of a substructure is a poor indicator for the biological activity of the small molecule or its biological relevance . clearly , there is much room for improvements .
as described earlier , the spectral basis set of the system can in principle be increased quite dramatically by shifting from a cas number - based matching between the nist ei library and the chebi ontology to a looser matching based on the connectivity layer of the inchikey .
such a mapping is bound to generate false matches , however it is likely that , while the mismatched pairs will be chemically distinct ( e.g. they may be enantiomers ) , with respect to their ei fragmentation they are likely to be legitimately considered as equivalent . using this alternative mapping , we expect to cover most of the chebi ontology and more importantly , we can automatically track its growth .
in addition to improvements in coverage of chemical space , there is room for increased complexity in the algorithms used to classify spectra .
the current version of aristo aims specifically to test the lower bound of algorithmic complexity , which is why it is based on a simple dot - product against each average class spectrum .
more sophisticated machine learning algorithms are likely to increase the set of learnable concepts ( e.g. algorithms that intelligently leverage the many tms - derivatives present in the gc - ms centric nist 08 ei library ) .
binational science foundation ( bsf ) ( 2007 - 219 ) ; prospects consortium [ eu frvii ] . funding for open access charge : prospects consortium ( eu frvii ) .
 gas chromatography  mass spectrometry ( gc  
 ms ) acquisitions routinely yield hundreds to thousands of electron ionization ( ei ) mass spectra . 
 the chemical identification of these spectra typically involves a search protocol that seeks an exact match to a reference spectrum . 
 reference spectra are found in comprehensive libraries of small molecule ei spectra curated by commercial and public entities . 
 we developed aristo ( automatic reduction of ion spectra to ontology ) , a webtool , which provides information regarding the general chemical nature of the compound underlying an input ei mass spectrum . 
 importantly , aristo can provide such annotation without necessitating an exact match to a specific compound . 
 aristo provides assignments to a subset of the chebi ( chemical entities of biological interest ) dictionary , an ontology , which aims to cover biologically relevant small molecules . 
 our system takes as input a mass spectrum represented as a series of mass and intensity pairs ; the system returns a graphical representation of the supported ontology as well as a detailed table of suggested annotations along with their associated statistical evidence . 
 aristo is accessible at this url : http://www.ionspectra.org/aristo . 
 the system is free , open to all and does not require registration of any sort . 
INTRODUCTION
RATIONALE AND IMPLEMENTATION
TEST CASE ANALYSES
CONCLUSIONS AND FUTURE DIRECTION
FUNDING