Skip to content

froz9/MolNetEnhancerMod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

License Maintenance GitHub contributors GitHub issues

MolNetEnhancerMod

MolNetEnhancerMod is an alternative to the non-working MolNetEnhancer. It uses a modified approximation to retrieve SMILES classification, supporting both NPClassifier and ClassyFire for robust molecular networking and detailed structural insights in metabolomics data.

Select what you need

To map chemical class information to a mass spectral molecular network, you need to:

  • Create a molecular network using the classical or feature-based workflow through the Global Natural Products Social Molecular Networking (GNPS) platform
  • Perform in silico structure annotation using Network Annotation Propagation (NAP), DEREPLICATOR, or another tool of preference for in silico structure annotation

Then execute the code in MolNenEnhancerMod_NPC.R line by line.

Disclaimer: Currently, the code only works with Feature Base Molecular Networking and NAP. DEREPLICATOR will be added soon.

A. For Map chemical class information using NPClassifier to mass spectral molecular networks

This script is a modification of the original MolNetEnhancer workflow published by Madeleine Ernst. This version assigns chemical class annotations using NPClassifier.

The only things that you need to replace are:

  1. Your GNPS Job ID

image

  1. Your NAP Job ID

image

  1. Replace the aforementioned IDs in the R script (To replicate results storage in Madeleine GitHub I will use the same data)

  2. Download the MolNenEnhancerMod_NPC.R

Captura de pantalla 2025-02-27 171412

  1. Open it in your preferred R development environment, in this case, I use RStudio

Captura de pantalla 2025-02-27 171748

  1. Replace the IDs from your work in the corresponding place

Captura de pantalla 2025-02-27 172036

  1. Run the code as usual

  2. After finishing, it will generate a CSV file called Molnetenhancer in your working directory

Captura de pantalla 2025-02-27 172333

  1. Open Cytoscape and import the Molecular Network File (You can find the graphML file inside of the folder called GNPS_output_graphML that was generated after run the previous code) Captura de pantalla 2025-02-27 172818

    The graphML file is located inside of gnps_molecular_network_graphml Captura de pantalla 2025-02-27 172847

    Captura de pantalla 2025-02-27 173349

    Captura de pantalla 2025-02-27 173428

  2. After loaded, the graphML file will look like this:

    Captura de pantalla 2025-02-27 173805

  3. Import the Molnethancer CSV file into the network

    Captura de pantalla 2025-02-27 173945

    Captura de pantalla 2025-02-27 194217

    cluster.index need to have the key

    Captura de pantalla 2025-02-27 194327

    Then press Ok

  4. Navigate to Style -> Fill Color

    Captura de pantalla 2025-02-27 194531

    In Column, select the Classification level that you need (Pathway, Superclass, or Class) For the example, I chose NPC_Pathway_Consensus, in Mapping Type select Discrete Mapping The NPC Pathways will be displayed

    Captura de pantalla 2025-02-27 195019

  5. Select the colors that you want. For example, I right-clicked in the row next to the Alkaloids, and inside Mapping Values Generator, I selected Rainbow

    Captura de pantalla 2025-02-27 195433

  6. Your network enhanced with NPClassifier is ready!

    Captura de pantalla 2025-02-27 195751

B. For Map chemical class information using Classyfire to mass spectral molecular networks

This script is a modification of the original MolNetEnhancer workflow published by Madeleine Ernst. This version assigns chemical class annotations using Classyfire.

The only things that you need to replace are:

  1. Your GNPS Job ID

image

  1. Your NAP Job ID

image

  1. Replace the aforementioned IDs in the R script (To replicate results storage in Madeleine GitHub I will use the same data)

  2. Download the MolNenEnhancerMod_Classyfire.R

Captura de pantalla 2025-03-24 140035

  1. Open it in your preferred R development environment; in this case, I use RStudio

Captura de pantalla 2025-03-24 140239

  1. Replace the IDs from your work in the corresponding place

Captura de pantalla 2025-03-24 140345

  1. Run the code as usual until line #113

  2. Line 113 will generate TSV files in your working directory. Each run in the Classyfire web app needs fewer than 1000 features, so if you have more than 1000 features, the code will divide the features into multiple TSV files containing fewer than 1000 features per file

Captura de pantalla 2025-03-24 141340

  1. After running line 113. You must stop and find the TSV files. For this example, two TSV files were generated

Captura de pantalla 2025-03-24 141536

  1. You need to upload each TSV file individually to the [Classyfire web app] (http://classyfire.wishartlab.com/)

Captura de pantalla 2025-03-24 141832

  1. After running each file individually on the Classyfire web. You need to download the output files in SDF format and save them in the working directory.

Captura de pantalla 2025-05-28 121317

  1. Continue running the script (line 125).

  2. After finishing, it will generate a CSV file called Molnetenhancer in your working directory

Captura de pantalla 2025-02-27 172333

  1. Open Cytoscape and import the Molecular Network File (You can find the graphML file inside of the folder called GNPS_output_graphML that was generated after run the previous code) Captura de pantalla 2025-02-27 172818

The graphML file is located inside of gnps_molecular_network_graphml Captura de pantalla 2025-02-27 172847

Captura de pantalla 2025-02-27 173349

Captura de pantalla 2025-02-27 173428

  1. After loaded, the graphML file will look like this:

    Captura de pantalla 2025-02-27 173805

  2. Import the Molnethancer CSV file into the network

    Captura de pantalla 2025-02-27 173945

    Captura de pantalla 2025-05-28 122040

    cluster.index need to have the key

    Captura de pantalla 2025-05-28 122209

    Then press Ok

  3. Navigate to Style -> Fill Color

    Captura de pantalla 2025-02-27 194531

    In Column, select the Classification level that you need (Superslass, Class, or Subclass) For the example, I chose Superclass_Consensus, in Mapping Type select Discrete Mapping The Superclasses will be displayed

    Captura de pantalla 2025-05-28 122404

  4. Select the colors that you want. For example, I right-clicked in the row next to the Alkaloids and derivatives, and inside Mapping Values Generator, I selected Rainbow

    Captura de pantalla 2025-05-28 122759

  5. Your network enhanced with NPClassifier is ready!

    Captura de pantalla 2025-05-28 122835

About

MolNetEnhancerMod is an alternative to the non-working MolNetEnhancer. It uses a modified approximation to retrieve SMILES classification, supporting both NPClassifier and ClassyFire for robust molecular networking and detailed structural insights in metabolomics data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages