ExecuteCommand

From Array Suite Wiki

Jump to: navigation, search

Contents

Overview

ExecuteCommand allows script-based server management, for advanced users. Any of these commands can be run.

Syntax

Begin ExecuteCommand /Namespace=Server;
Server "tcp://pathToServer:8065/RemoteServer" /UserID=UserName /Password=PasswordOfUser;
Command CommandToRun;
Options OptionsForServerCommand;
OutputFile PathToOutputFileForResults;
End;

Note: To write output to standard output, exclude OutputFile line. All available commands to run can be found in WebServiceCommand.

The script can be run in Oshell and also ArrayStudio:

ExecuteCommand.png

Examples

Retrieve expression data

Begin ExecuteCommand /Namespace=Server;
Server "tcp://192.168.3.228:8065/RemoteServer" /UserID=gary /Password=abc123;
Command IA_FetchVariableData;
Options 
"
ProjectID=blueprint expression markers
Name=Blueprint.FPKM.Data
IDs=DDX11L1,TP53";
OutputFile "/IData/OmicTest/ExpressionResults.txt";
End;

Search published projects

Begin ExecuteCommand /Namespace=Server;
Server "tcp://192.168.1.36:8065/RemoteServer" /UserID=admin /Password=omicsoft;
Command IA_SearchPublishedProjects;
Options 
"
ProjectPattern=Affymetrix.RAE230A->Platform
";
OutputFile "/IData/OmicTest/_Oscript/20150828_WebServiceCall.oscript.ouput2.txt";
End;

More commands in ServiceCommand

Manage users

Begin ExecuteCommand /Namespace=Server;
Server "tcp://localhost:8065/RemoteServer" /UserID=admin /Password=xxxxxx;
Command ManageUsers.Update;
Options "
UserID=usera
Password=helloworld
UserGroups=standard users
UserFolderReaders=standard users
UserFolderEditors=
";
OutputFile None;
End;

Manage Land Access

Begin ExecuteCommand /Namespace=Server;
Server "tcp://192.168.1.106:7065/RemoteServer" /UserID=admin /Password=xxxxxx;
Command ManageLandUserControl;
Options 
"LandName=TCGA2015
UserControl.Read=[usergroup]curators, [usergroup]standard users, [usergroup]administrators, gary
UserControl.Write=[usergroup]administrators
UserControl.Download=[usergroup]curators, [usergroup]standard users, [usergroup]administrators, gary
UserControl.Refresh=[usergroup]administrators, gary
UserControl.ManageSet=[usergroup]curators, [usergroup]standard users, gary
UserControl.ManageMetaData=[usergroup]administrators, gary
UserControl.ManageMeasurementData=[usergroup]administrators, gary
UserControl.ViewBamFiles=[usergroup]curators, [usergroup]standard users, [usergroup]administrators, gary
UserControl.AccessClinicalData=[usergroup]administrators, gary";
OutputFile None;
End;

gary is a single user, and user group name requires [usergroup] prefix.