This page walks you through the setup steps required to use the Cloud Life Sciences API.
(If you've completed the Quickstart, you've already done some of these steps. Review this page to make sure you're ready to use the Cloud Life Sciences API).
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.
Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.
- Enable the Cloud Life Sciences API.
Understand service accounts and default roles
When you run a pipeline
for the first time (using the
gcloud tool or the RPC and REST APIs),
the following authentication steps occur:
- A service account called the Cloud Life Sciences Service Agent service account is created.
- The service account is automatically assigned the default role
lifesciences.workflowsRunner. The role enables starting and stopping Compute Engine instances inside your project.
If you later remove the default role from the relevant project service account, you might encounter the following errors:
- Attempts to run pipelines using the API result in permission errors. To fix this issue, see Troubleshooting.
- The API cannot shut down running instances when pipelines complete, and you will continue to be billed for these resources. To fix this issue, see Troubleshooting.
Set up Cloud SDK and the
gcloud command-line tool
Install Cloud SDK to use the tools and libraries in
Cloud Life Sciences, Compute Engine, Cloud Storage, and
BigQuery. The SDK includes the
bq command-line tools.
After you've initialized the SDK, install the Cloud Life Sciences components:
gcloud components update beta
If you're using a Compute Engine VM with the default installation of the
gcloudtool, you can't install the components using the previous command. To enable the Cloud Life Sciences API on a Compute Engine VM, reinstall the
gcloudtool by running the following commands:
sudo apt-get remove google-cloud-sdk curl https://sdk.cloud.google.com | bash exec -l $SHELL gcloud init
Download credentials for API access
You must download a service account key file for your project if you are using either of the following methods to access the Cloud Life Sciences API:
- A code sample from the Cloud Life Sciences GitHub repository
- A tool other than the
gcloudcommand-line tool that accesses the Cloud Life Sciences API directly
Complete the following steps to create a service account key file:
Go to the Credentials page in Cloud Console.
Click Create credentials > Service account.
On the Service account details page, enter a service account name, and then click Create.
In the Grant this service account access to project tab, select the role for the service account. For the broadest access to Cloud Life Sciences, select Cloud Life Sciences > Cloud Life Sciences Workflows Runner, and then click Continue.
(Optional) Fill out the Grant users access to this service account tab.
To download the service account key, complete the following steps:
Go to the Service Accounts page in Cloud Console.
Find the row of the service account that you want to create a key for. In that row, click, and then click Manage keys.
On the Keys page, click Add key, and then click Create new key.
Select JSON for the Key type and click Create.
Clicking Create downloads a service account key file. Make sure to store this file securely, because it can be used to authenticate as your service account. You can move and rename this file.
- Analyze variants with BigQuery.
- Store and load variants in Cloud Storage and BigQuery.
- View tutorials on running pipelines with the Cloud Life Sciences API.