convert_bigg_universal2metid | R Documentation |
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.
convert_bigg_universal2metid(data, path = ".", threads = 5)
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. |
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.
An invisible object containing the converted database.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.