mbWorkflow {RMassBank} | R Documentation

## MassBank record creation workflow

### Description

Uses data generated by `msmsWorkflow` to create MassBank records.

### Usage

    mbWorkflow(mb, steps = c(1, 2, 3, 4, 5, 6, 7, 8),
      infolist_path = "./infolist.csv", gatherData = "online")

### Arguments

`mb` | The `mbWorkspace` to work in.
`steps` | Which steps in the workflow to perform.
`infolist_path` | A path where to store newly downloaded compound informations, which should then be manually inspected.
`gatherData` | A variable denoting whether to retrieve information using several online databases `gatherData= "online"` or to use the local babel installation `gatherData= "babel"`. Note that babel is used either way, if a directory is given in the settings. This setting will be ignored if retrieval is set to "standard"

### Details

See the vignette `vignette("RMassBank")` for detailed informations about the usage.

Steps:

Step 1: Find which compounds don't have annotation information yet. For these compounds, pull information from several databases (using gatherData).

Step 2: If new compounds were found, then export the infolist.csv and stop the workflow. Otherwise, continue.

Step 3: Take the archive data (in table format) and reformat it to MassBank tree format.

Step 4: Compile the spectra. Using the skeletons from the archive data, create MassBank records per compound and fill them with peak data for each spectrum. Also, assign accession numbers based on scan mode and relative scan no.

Step 5: Convert the internal tree-like representation of the MassBank data into flat-text string arrays (basically, into text-file style, but still in memory)

Step 6: For all OK records, generate a corresponding molfile with the structure of the compound, based on the SMILES entry from the MassBank record. (This molfile is still in memory only, not yet a physical file)

Step 7: If necessary, generate the appropriate subdirectories, and actually write the files to disk.

Step 8: Create the list.tsv in the molfiles folder, which is required by MassBank to attribute substances to their corresponding structure molfiles.

### Value

The processed `mbWorkspace`.

### Author(s)

Michael A. Stravs, Eawag <michael.stravs@eawag.ch>

### See Also

`mbWorkspace-class`

### Examples

    ## Not run:
    		mb <- newMbWorkspace(w) # w being a msmsWorkspace
    		mb <- loadInfolists(mb, "D:/myInfolistPath")
    		mb <- mbWorkflow(mb, steps=c(1:3), "newinfos.csv")

    ## End(Not run)

[Package RMassBank version 2.16.0 Index]