get_scores_for_LC_MS {MetID} | R Documentation

## Get scores for metabolite putative IDs by LC-MS .

### Description

Get scores for metabolite putative IDs by LC-MS .

### Usage

    get_scores_for_LC_MS(filename, type = c("data.frame", "csv", "txt"),
      na = "NA", sep = ";", mode = c("POS", "NEG"), Size = 2000,
      delta = 1, gamma_mass = 10, iterations = 500)

### Arguments

`filename` | the name of the file which the data are to be read from. Its type should be chosen in 'type' parameter. Also, it should have columns named exactly 'metid' (IDs for peaks), 'query_m.z' (query mass of peaks), 'exact_m.z' (exact mass of putative IDs), 'kegg_id' (IDs of putative IDs from KEGG Database), 'pubchem_cid' (CIDs of putative IDs from PubChem Database). Otherwise, this function would not work.
`type` | string indicating the type of the file. It can be a 'data.frame' which is already loaded into R, or some other specified types like a csv file.
`na` | a character vector of strings which are to be interpreted as NA values.
`sep` | a character value which seperates multiple IDs in kegg_id or pubchem_cid field, if there are multiple IDs.
`mode` | string indicating the mode of metabolites. It can be positive mode (POS) or negative mode (NEG).
`Size` | an integer which indicates sample size in Gibbs sampling.
`delta` | a hyper-parameter representing the mean value of mass ratio.
`gamma_mass` | a hyper-parameter representing the accuracy of mass measurement.
`iterations` | ask user to input number of interations,default 500

### Value

A dataframe which contains input data together with a column of scores in the end. In the score column, if the row contains NA values or does not has a PubChem cid, the score would be '-', which stands for missing value. Otherwise, each score would be from 0 to 1.

### Examples

    ## check if colnames of dataset meet requirement
    names(demo1)
    ## change colnames
    colnames(demo1) <- c('query_m.z','name','formula','exact_m.z','pubchem_cid','kegg_id')
    ## get scores
    out <- get_scores_for_LC_MS(demo1, type = 'data.frame', na='-', mode='POS')

[Package MetID version 1.6.0 Index]