assign_smiles: Assign SMILES

View source: R/organize_libraries_EI_and_MS2.R

assign_smilesR Documentation

Assign SMILES

Description

assign_smiles offers a way to assign SMILES to the library obtained from NIST format (exported by Lib2NIST with structure information separately stored in mol files).

Usage

assign_smiles(lib, structure_data, match = "name")

Arguments

lib

The library generated by read_lib.

structure_data

the correspondent structure data generated by extract_structure.

match

Correspondence can be done by either "name" or "inchikey".

Details

The msp file obtained from Lib2NIST has no SMILES and the structure information is stored in multiple mol files. After transforming all mol files into a single sdf file by combine_mol2sdf and retrieving structure information by extract_structure, SMILES is available. This function provides a way to assign SMILES to correspondent compound in the msp file. If you are working with Linux-based or Mac OS system, it is better to use "inchikey" for matching. However, if you are working with Windows, the only option is to use "name" for matching, which is a kind of compromise as some chemicals in the *.mol files do not have full chemical names. Hence they will not be matched. This function is useful for both EI and MS2 libraries. This function supports parallel computing.

Value

A list with SMILES assigned.


QizhiSu/mspcompiler documentation built on May 7, 2024, 4:25 a.m.