source: webservices/se.lu.thep.webservices/trunk/webs-test.R @ 1430

Last change on this file since 1430 was 261, checked in by Jari Häkkinen, 16 years ago

Changed samples and code to refer to the demo server.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1#######################################################
2#
3# $Id: webs-test.R 261 2007-04-20 16:36:47Z jari $
4#
5# This is a small test script to test the R/Perl to
6# Base connection.
7#
8#######################################################
9
10library(RSPerl)
11.PerlPackage("BaseWebService")
12source("websFunc.R");
13
14
15# Login onto the BASE server
16#webobj <- login("http://base2.thep.lu.se:8080/demo", "login", "passwd");
17webobj <- login("http://base2.thep.lu.se:8080/demo", "base2", "base2");
18
19# The session ID
20sessionID <- webobj$sessionID();
21
22# Get the list of projects as a list of lists
23projs <- getProjects(webobj);
24
25# get the ID of the first one
26id <- projs[[1]]["id"];
27
28# Set to be the active project
29setActiveProject(webobj, id);
30
31# Get the list of experiments as a list of lists
32exps <- getExperiments(webobj);
33
34# Select the first experiment
35expId <- exps[[1]]["id"];
36
37# Get all rawBioAssays for this experiment as a list of lists
38raw <- getRawBioAssays_by_expID(webobj, expId);
39
40# Now download all files to a local directory
41downloadRawBioAssays_by_expID(webobj, expId, "./tmp");
42
Note: See TracBrowser for help on using the repository browser.