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: OutputFile must be an absolute/physical path on the machine where this OScript is being executed (i.e. if using oshell.exe --runscript on your local Windows machine, it will be a path on that machine but if sending the OScript to an OmicSoft Server via oshell.exe --queue or through the Run_Script_(Send_To_Queue), it will be a path on the OmicSoft Server host). Virtual paths not allowed even with the @@ prefix. To write output to standard output (so will appear at end of log), exclude OutputFile statement. 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.