Mercurial > repos > prog > lcmsmatching
comparison UniprotConn.R @ 2:20d69a062da3 draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8
author | prog |
---|---|
date | Thu, 02 Mar 2017 08:55:00 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:253d531a0193 | 2:20d69a062da3 |
---|---|
1 ##################### | |
2 # CLASS DECLARATION # | |
3 ##################### | |
4 | |
5 UniprotConn <- methods::setRefClass("UniprotConn", contains = "RemotedbConn") | |
6 | |
7 ########################## | |
8 # GET ENTRY CONTENT TYPE # | |
9 ########################## | |
10 | |
11 UniprotConn$methods( getEntryContentType = function() { | |
12 return(BIODB.XML) | |
13 }) | |
14 | |
15 ##################### | |
16 # GET ENTRY CONTENT # | |
17 ##################### | |
18 | |
19 UniprotConn$methods( getEntryContent = function(ids) { | |
20 | |
21 # Initialize return values | |
22 content <- rep(NA_character_, length(ids)) | |
23 | |
24 # Request | |
25 content <- vapply(ids, function(x) .self$.get.url(get.entry.url(BIODB.UNIPROT, x, content.type = BIODB.XML)), FUN.VALUE = '') | |
26 | |
27 return(content) | |
28 }) | |
29 | |
30 ################ | |
31 # CREATE ENTRY # | |
32 ################ | |
33 | |
34 UniprotConn$methods( createEntry = function(content, drop = TRUE) { | |
35 return(createUniprotEntryFromXml(content, drop = drop)) | |
36 }) |