separate_polarity: Separate positive and negative modes in MS2 library

View source: R/organize_libraries_MS2.R

separate_polarityR Documentation

Separate positive and negative modes in MS2 library

Description

separate_polarity offers a way to separate a MS2 library based on polarity.

Usage

separate_polarity(lib, polarity)

Arguments

lib

A MS2 library mixed with positive and negative modes.

polarity

The polarity, can be either "pos" or "neg"

Details

Some libraries, e.g., NIST and GNPS have both positive and negative MS2 records mixed in a singled file. However, in practice, a MS2 library should be either positive or negative based on the polarity used in the experiment. Therefore, this function provides a way to separate positive and negative modes in MS2 library.

Value

A list, being positive or negative


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