Mercurial > repos > prog > lcmsmatching
annotate KeggConn.R @ 1:45e985cd8e9e draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
| author | prog |
|---|---|
| date | Tue, 31 Jan 2017 05:27:24 -0500 |
| parents | 3afe41d3e9e7 |
| children |
| rev | line source |
|---|---|
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
1 ##################### |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
2 # CLASS DECLARATION # |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
3 ##################### |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
4 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
5 KeggConn <- methods::setRefClass("KeggConn", contains = "RemotedbConn") |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
6 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
7 ########################## |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
8 # GET ENTRY CONTENT TYPE # |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
9 ########################## |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
10 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
11 KeggConn$methods( getEntryContentType = function() { |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
12 return(BIODB.TXT) |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
13 }) |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
14 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
15 ##################### |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
16 # GET ENTRY CONTENT # |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
17 ##################### |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
18 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
19 KeggConn$methods( getEntryContent = function(id) { |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
20 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
21 # Initialize return values |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
22 content <- rep(NA_character_, length(id)) |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
23 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
24 # Request |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
25 content <- vapply(id, function(x) .self$.get.url(get.entry.url(BIODB.KEGG, x, content.type = BIODB.TXT)), FUN.VALUE = '') |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
26 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
27 return(content) |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
28 }) |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
29 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
30 ################ |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
31 # CREATE ENTRY # |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
32 ################ |
|
0
3afe41d3e9e7
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit bb4d3e23d99828bfee16d31d794c49a17313ec2f
prog
parents:
diff
changeset
|
33 |
|
1
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
34 KeggConn$methods( createEntry = function(content, drop = TRUE) { |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
35 return(createKeggEntryFromTxt(content, drop = drop)) |
|
45e985cd8e9e
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
prog
parents:
0
diff
changeset
|
36 }) |
