Using Google Life Sciences API in Sandbox

Cloud Life Sciences will be deprecated on July 8, 2025. It will be replaced by Batch.

Introduction

Sandbox pipelines are executed using Cromwell. Cromwell is a scientific workflow management system that can be configured to execute jobs using different backends. In the Sandbox, Cromwell has been configured to use the Cloud Life Sciences API. The Cloud Life Sciences API can also be used directly in the sandbox, for example, to retrieve information about specific jobs.

Preparing to use Cloud Life Sciences API in the terminal

Follow these instructions to call the Cloud Life Sciences API in your Sandbox iVM terminal.

To call the Cloud Life Sciences REST API you will need to provide:

  • access token

  • project id

  • location

The access token has a short lifetime and it is best to define it each time the REST API is called. The project id is available in the$SANDBOX_PROJECTenvironment variable. You will need to define the location of the Cloud Life Sciences API in the sandbox.

  • Save the Cloud Life Sciences API location in the $LOCATION environmental variable by executing the following command:

LOCATION=europe-west4

Using the Cloud Life Sciences API in the terminal

You can use the Cloud Life Sciences API to retrieve job information after you have defined the $LOCATION environmental variable. The REST API operations are documented in Cloud Life Sciences REST reference.

  • You can list all running jobs (operations) by using the following command:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" https://lifesciences.googleapis.com/v2beta/projects/$SANDBOX_PROJECT/locations/$LOCATION/operations

Above, we used the $(gcloud auth print-access-token) command to retrieve the access token.

  • You will need to parse the JSON output to find information about the jobs.

Sandbox users do not currently have permission to use the Cloud Life Sciences API run command. Please contact the humgen service desk (humgen-servicedesk@helsinki.fi) if you would like to use it.\

Further information

Last updated