####################################################### # # $Id: webs-test.R 261 2007-04-20 16:36:47Z jari $ # # This is a small test script to test the R/Perl to # Base connection. # ####################################################### library(RSPerl) .PerlPackage("BaseWebService") source("websFunc.R"); # Login onto the BASE server #webobj <- login("http://base2.thep.lu.se:8080/demo", "login", "passwd"); webobj <- login("http://base2.thep.lu.se:8080/demo", "base2", "base2"); # The session ID sessionID <- webobj$sessionID(); # Get the list of projects as a list of lists projs <- getProjects(webobj); # get the ID of the first one id <- projs[[1]]["id"]; # Set to be the active project setActiveProject(webobj, id); # Get the list of experiments as a list of lists exps <- getExperiments(webobj); # Select the first experiment expId <- exps[[1]]["id"]; # Get all rawBioAssays for this experiment as a list of lists raw <- getRawBioAssays_by_expID(webobj, expId); # Now download all files to a local directory downloadRawBioAssays_by_expID(webobj, expId, "./tmp");