SearchSMPDB:

Usage Arguments Author(s) Examples

Usage

1

Arguments

id
type

Author(s)

Sarah Cherkaoui

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (id, type) 
{
    position <- vector()
    if (type == "name") {
        position <- Mmatch(id, DBSMPDB[, 4])
    }
    if (type == "hmdb") {
        position <- Mmatch(id, DBSMPDB[, 3])
    }
    if (type == "kegg") {
        position <- Mmatch(id, DBSMPDB[, 5])
    }
    if (!length(position) == 0) {
        Name <- fixlc(DBSMPDB[position[1], 4])
        HMDB <- fixlc(DBSMPDB[position[1], 3])
        KeggID <- fixlc(DBSMPDB[position[1], 5])
        SmpdbPathway <- fixlc(DBSMPDB[position, 2])
        return(list(Name = Name, HMDB = HMDB, KeggID = KeggID, 
            SmpdbPathway = SmpdbPathway))
    }
    else (return("error"))
  }

cherkaos/MetabToPathways documentation built on May 13, 2019, 3:54 p.m.