Tutorial: select_unique_ngs

Introduction

The genieBPC package allows users to link the clinical data to patients’ corresponding genomic samples.

Modifying Function Arguments

`select_unique_ngs()` Function Arguments
Argument Description

data_cohort

Output object of the create_analytic_cohort function.

oncotree_code

Character vector specifying which sample OncoTree codes to keep. See 'cpt_oncotree_code' column of data_cohort argument above to get options.

sample_type

Character specifying which type of genomic sample to prioritize, options are 'Primary', 'Local' and 'Metastasis'. Default is to not select a NGS sample based on the sample type.

min_max_time

Character specifying if the first or last genomic sample recorded should be kept. Options are 'min' (first) and 'max' (last).

The select_unique_ngs() function returns the ‘cohort_ngs’ object of the create_analytic_cohort with an unique genomic samples taken from each patients.

Setup

Before going through the tutorial, load the {genieBPC} library and log into Synapse using the set_synapse_credentials() function. For more information on set_synapse_credentials(), refer to the Tutorial: pull_data_synapse() vignette.

library(genieBPC)

set_synapse_credentials()

This tutorial will utilize the data downloaded in the Tutorial: pull_data_synapse() vignette, as shown below:

nsclc_2_0 = pull_data_synapse("NSCLC", version = "v2.0-public")

Examples

Example 1

Select unique genomic samples from patients with stage IV NSCLC of histology adenocarcinoma

out <- create_analytic_cohort(data_synapse = nsclc_2_0$NSCLC_v2.0, 
                                             stage_dx = c("Stage IV"), 
                                             histology = "Adenocarcinoma")

samples_data <- select_unique_ngs(data_cohort = out$cohort_ngs)

Example 2

Create a cohort of all NSCLC patients who received Cisplatin, Pemetrexed Disodium or Cisplatin, Etoposide as their first drug regimen, and select corresponding genomic samples.

out <- create_analytic_cohort(data_synapse = nsclc_2_0$NSCLC_v2.0,
                              regimen_drugs = c("Cisplatin, Pemetrexed Disodium", "Cisplatin, Etoposide"), 
                              regimen_order = 1, regimen_order_type = "within regimen")

samples_data <- select_unique_ngs(data_cohort = out$cohort_ngs,
                                  oncotree_code = "LUAD", 
                                  sample_type = "Metastasis", 
                                  min_max_time = "max")