process_lib2network: Create feature-based molecular networks from a consensus...

View source: R/process_lib2network.R

process_lib2networkR Documentation

Create feature-based molecular networks from a consensus spectra library

Description

Function used by library_generator to create molecular networks

Usage

process_lib2network(
  input_library,
  networking = T,
  polarity = c("Positive", "Negative"),
  params.search = list(mz_search = 0.005, ppm_search = 10),
  params.similarity = list(method = "Cosine", min.frag.match = 6, min.score = 0.6),
  params.network = list(topK = 10, max.comp.size = 50, reaction.type = "Metabolic",
    use.reaction = TRUE)
)

Arguments

input_library

A list object. Must contain consensus library.

networking

Boolean. TRUE to go through the entire molecular networking process. FALSE if only spectra alignment is performed, necessary for spectral library searching

polarity

character. Either "Positive" or "Negative". Ion mode of the LC-MS/MS file.

params.search

List of parameters for feature screening, combining precursor ions and fragments in the input file, as well as for searching in the spectral library. The list must contain following elements:

  • mz_search: Numeric. Absolute mass tolerance in Da.

  • ppm_search: Numeric. Absolute mass tolerance in ppm.

params.similarity

Parameters for MS/MS spectral similarity determination, used for both molecular networking and spectral library search.

  • method: Characeter.Similarity metrics for networking and spectral library search. Must be either "Messar" (library_messar for more details) or "Precision", "Recall", "F1", "Cosine", "Spearman", "MassBank", "NIST" or "All", default is "Cosine" (library_query for more details).

  • min.frag.match: Integer. Minimum number of common fragment ions (or neutral losses) that are shared to be considered for spectral similarity evaluation. We suggest setting this value to at least 6 for statistical meaningfulness. Not applicable if method = "Messar".

  • min.score: Numeric between 0 and 1. Minimum similarity score to annotate an unknown feature with spectral library or to connect two unknown features because they are similar. Not applicable if method = "Messar".

params.network

Parameters for post-filtering and annotation of network edges: based on feature correlation (if feature quantification table is provided) and mass difference

  • topK: Integer higher than 0. For networking, the edge between two nodes are kept only if both nodes are within each other's TopK most similar nodes. For example, if this value is set at 20, then a single node may be connected to up to 20 other nodes. Keeping this value low makes very large networks (many nodes) much easier to visualize. We suggest keeping this value at 10.

  • max.comp.size: Numeric between 0 and 200. Maximum size of nodes allowed in each network component. Default value is 100. Network component = Cluster of connected node. Set to 0 if no limitation on componet size.

  • reaction.type: Character. Either "Metabolic" and "Chemical". Type of transformation list used to annotate mass difference between connected features in molecular network.

  • use.reaction: Boolean. TRUE if keep only edges whose mass difference can be annotated to known metabolic or chemical reactions.


daniellyz/MergeION2 documentation built on Jan. 26, 2024, 6:24 a.m.