export_ms2_data: Export MS2 Data from mass_dataset Object

View source: R/export_mass_dataset.R

export_ms2_dataR Documentation

Export MS2 Data from mass_dataset Object

Description

Exports the MS2 data contained in a mass_dataset object to files. The files can be in MGF or MSP format.

Usage

export_ms2_data(object, file_type = c("mgf", "msp"), path = ".")

Arguments

object

A mass_dataset object containing MS2 data to be exported.

file_type

The type of file to export the MS2 data to. Options are "mgf" or "msp". Default is "mgf".

path

The directory where the exported MS2 data files will be saved. Default is the current directory.

Value

No return value. The function writes MS2 data files to disk. Returns NULL and a warning if no MS2 data is present in the object.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

## Not run: 
# Assuming 'data' is a mass_dataset object with MS2 data
export_ms2_data(data, file_type = "mgf", path = "output/")

## End(Not run)



tidymass/massdataset documentation built on Sept. 14, 2024, 4:41 p.m.