Example Analyses & Notebooks

Some example code & analyses are provided for you to get started using Service Workbench.

You can find analyses & notebooks here: https://github.com/hms-dbmi/Access-to-Data-and-Compute-using-Service-Workbench . Below are instructions for copying these notebooks in to Service Workbench.

Available Notebooks

Breast Cancer Prediction python

This notebook illustrates how one can use random forest models for prediction. For this illustration, we have taken an example for breast cancer prediction using UCI'S breast cancer diagnostic data set. The purpose here is to use this data set to build a predictive model of whether a breast mass image indicates benign or malignant tumor.

Connecting to OCHIN DB python R

This notebook is for AIM AHEAD users who have access to the OCHIN dataset. To learn more about the OCHIN data, see the Accessing OCHIN Data and Understanding OCHIN Data sections of the user guide.

This notebook will walk you through how to connect to the OCHIN DB while in a Jupyter Notebook. Before you begin, make sure that you have access to the data and check to make sure the db-credentials.txt file is located in your home directory.

Investigating EHR data from PIC-SURE python R

The purpose of this notebook is to help researchers get started with EHR analysis using clinical data exported from PIC-SURE.

How to copy notebooks in to your analysis workspace in Service Workbench

Create a SageMaker workspace if you have not already done so. This will provide you with a Jupyter Notebook interface that you can use to run python or R code.

Create your workspace

Step 1: Navigate to the Studies page. The organization studies are linked to Amazon S3 secure storage. This means that anything saved in these study folders will be securely saved and accessible through any workspace the study is mounted to.

For more information about studies, view the documentation here.

Step 2: Select the Organizations tab

Step 3:Select the study with your project and user name attached

Step 4: Click Next

Step 5: Select the Sagemaker Notebook as shown below

Step 6: Click Next

Step 7: Enter a name: Any name. Note that the Name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.

No change necessary for the Restricted CIDR field

Step 8: Select the Project Id dropdown

Step 9: Select your AIM AHEAD affiliation: For example Research-Fellowship or Consortium-Development-Project

Step 10: Select a sagemaker-small workspace

Step 11: Enter a Description for your benefit: Any description. Note that the Description must be at least 3 characters.

Step 12: Click Create Research Workspace

Step 3: Set your workspace parameters.

Name: Any name. Note that the Name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 character.

Restricted CIDR: No change necessary

Project ID: Select your AIM AHEAD affiliation, for example Research-Fellowship or Consortium-Development-Project

Configuration: sagemaker-small

Description: Any description. Note that the Description must be at least 3 characters.

Wait for your workspace to become available.

This may take 12-20 minutes.

Once your workspace is listed as AVAILABLE, you can connect to it.

Step 5. Connect to your SageMaker workspace.

Click "Connections" and then "Connect". A new window will open with your SageMaker workspace.

Step 6. Open the SageMaker Examples tab.

Step 7. Copy the Access to Data and Compute using Service Workbench folder.

Click "Use" next to any of the notebooks under "Access to Data and Compute Using Service Workbench" and then "Create copy". This will copy the entire example folder to your workspace.

Step 8. Move the desired example code notebooks into your study folder.

When you first copy the examples, a new window will open with the notebook you copied.

If you see a popup that says "Kernel not found", select a kernel from the dropdown menu and click "Set Kernel".

Close out of that tab and navigate back to your Home Page.

Click on the Files tab of your Home page. You will notice the example code folder has been added.

Check the box next to the Access to Data and Compute Using Service Workbench folder and click "Move".

For the directory path, type /studies/ followed by the name of the study folder you linked to your workspace. Click Move.

Last updated