convert_bigg_universal2metid: Convert BiGG Universal Metabolite Data to MetID Format

convert_bigg_universal2metidR Documentation

Convert BiGG Universal Metabolite Data to MetID Format

Description

This function converts the BiGG universal metabolite database into a format compatible with the 'metid' package. It processes the metabolite formulas, calculates mass-to-charge ratios (m/z), and maps various IDs for downstream use.

Usage

convert_bigg_universal2metid(data, path = ".", threads = 5)

Arguments

data

A data frame containing BiGG metabolite information, including formulas and IDs.

path

A string specifying the directory where the output data will be saved. Defaults to the current directory ('"."').

threads

An integer specifying the number of threads to use for parallel processing. Defaults to 5.

Details

The function processes the provided metabolite data by: - Handling missing formulas and modifying them based on charge. - Calculating the mass-to-charge ratio (m/z) for each metabolite using 'Rdisop'. - Renaming and reformatting columns for compatibility with the 'metid' package. - Writing the processed data to a temporary CSV file and creating a 'metid'-compatible database.

The final processed database is saved as 'bigg_ms1' in the specified path, and intermediate files are cleaned up.

Value

An invisible object containing the converted database.

Examples

## Not run: 
# Convert BiGG metabolite data to MetID format and save to the current directory
convert_bigg_universal2metid(data = bigg_data)

# Save the converted data to a custom directory using multiple threads
convert_bigg_universal2metid(data = bigg_data, path = "metid_data", threads = 10)

## End(Not run)


tidymass/massdatabase documentation built on Oct. 18, 2024, 3:56 p.m.