Rxivist logo

Implementations of the chemical structural and compositional similarity metric in R and Python

By Asker Brejnrod, Madeleine Ernst, Piotr Dworzynski, Lasse Buur Rasmussen, Pieter C. Dorrestein, Justin J.J. van der Hooft, Manimozhiyan Arumugam

Posted 11 Feb 2019
bioRxiv DOI: 10.1101/546150

Tandem mass spectrometry (MS/MS) has the potential to substantially improve metabolomics by acquiring spectra of fragmented ions. These fragmentation spectra can be represented as a molecular network, by measuring cosine distances between them, thus identifying signals from the same or similar molecules. Metrics that enable comparison between pairs of samples based on their metabolite profiles are in great need. Taking inspiration from the successful phylogeny-aware beta-diversity measures used in microbiome research, integrating chemical similarity information about the features in addition to their abundances could lead to better insights when comparing metabolite profiles. Chemical Structural and Compositional Similarity (CSCS) is a recently published similarity metric comparing the full set of signals and their chemical similarity between two samples. Efficient, scalable and easily accessible implementations of this algorithm is currently lacking. Here, we present an easily accessible and scalable implementation of CSCS in both python and R, including a version not weighted by intensity information. We provide a new implementation of the CSCS algorithm that is over 300 times faster than the published implementation in R, making the algorithm suitable for large-scale metabolomics applications. We also show that adding chemical information enriches existing methods. Furthermore, the R implementation includes functions for exporting molecular networks directly from the mass spectral molecular networking platform GNPS for ease of use for downstream applications.

Download data

  • Downloaded 813 times
  • Download rankings, all-time:
    • Site-wide: 24,986
    • In bioinformatics: 3,014
  • Year to date:
    • Site-wide: 33,868
  • Since beginning of last month:
    • Site-wide: 90,422

Altmetric data

Downloads over time

Distribution of downloads per paper, site-wide


Sign up for the Rxivist weekly newsletter! (Click here for more details.)