SearchKEGG: Function to find a compound information using his id by...

Usage Arguments Author(s) References Examples

Usage

1

Arguments

id
type

Author(s)

Sarah Cherkaoui

References

1. 4Creek DJ, Jankevics A, Burgess KE, Breitling R, Barrett MP. IDEOM: an Excel interface for analysis of LC-MS-based metabolomics data. Bioinformatics. 2012 Apr 1;28(7):1048-9.

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##---- 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, DBKEGG[, 3])
    }
    if (type == "pubchem") {
        position <- Mmatch(id, DBKEGG[, 9])
    }
    if (type == "hmdb") {
        position <- Mmatch(id, DBKEGG[, 11])
    }
    if (type == "kegg") {
        position <- Mmatch(id, DB1DBKEGG[, 8])
    }
    if (type == "biocyc") {
        position <- Mmatch(id, DBKEGG[, 12])
    }
    if (type == "inchikey") {
        position <- Mmatch(id, DBKEGG[, 15])
    }
    if (length(position) > 0) {
        Name <- fixlc(DBKEGG[position, 3])
        Pubchem <- fixlc(DBKEGG[position, 9])
        HMDB <- fixlc(DBKEGG[position, 11])
        KeggID <- fixlc(DBKEGG[position, 8])
        BioCyc <- fixlc(DBKEGG[position, 12])
        InchiKey <- fixlc(DBKEGG[position, 15])
        Map <- fixlc(DBKEGG[position, 5])
        KeggPathway <- fixlc(strsplit(DBKEGG[position, 6], "__"))
        KeggPathID <- fixlc(DBSMPDB[position, 7])
        return(list(Name = Name, Pubchem = Pubchem, HMDB = HMDB, 
            KeggID = KeggID, BioCyc = BioCyc, InchiKey = InchiKey, 
            Map = Map, KeggPathway = KeggPathway, KeggPathID = KeggPathID))
    }
    else (return("error"))
  }

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