getClinical: Obtain clinical data

View source: R/clinical.R

getClinicalR Documentation

Obtain clinical data

Description

The participant table may contain curated demographic information e.g., sex, age, etc.

Usage

getClinical(
  columnName,
  participants = TRUE,
  tablename = .DEFAULT_TABLENAME,
  workspace = terraTCGAworkspace(),
  namespace = .DEFAULT_NAMESPACE,
  verbose = TRUE,
  metacols = .PARTICIPANT_METADATA_COLS,
  participantIds = NULL
)

Arguments

columnName

The name of the column to extract files, see getClinicalTable table. If not provided, the first column in the table will be used to obtain the clinical information.

participants

logical(1) Whether to merge the participant table from avtable("participant") to the clinical data

tablename

The Terra data model table from which to extract the clinical data (default: "sample")

workspace

character(1) The Terra Data Resources workspace from which to pull TCGA data (default: see terraTCGAworkspace()). This is set to a package-wide option.

namespace

character(1) The Terra Workspace Namespace that defaults to "broad-firecloud-tcga" and rarely needs to be changed.

verbose

logical(1) Whether to output additional information regarding the workspace and namespace (default: TRUE).

metacols

The set of columns that comprise of the metadata columns. See the .PARTICIPANT_METADATA_COLS global variable

participantIds

character() TCGA participant identifiers usually in the form of "TCGA-AB-1234". By default, all available participant identifiers will be used. (default: NULL)

Value

A DataFrame with clinical information from TCGA. The metadata i.e., metadata(object) includes the columnName used to obtain the data.

Examples

if (
    AnVILGCP::gcloud_exists() &&
    identical(AnVILBase::avplatform_namespace(), "AnVILGCP") &&
    nzchar(AnVILGCP::avworkspace_name())
)
  getClinical(
      workspace = "TCGA_ACC_OpenAccess_V1-0_DATA",
      participantIds = c("TCGA-OR-A5J1", "TCGA-OR-A5J2",
          "TCGA-OR-A5J3", "TCGA-OR-A5J4")
  )


waldronlab/terraTCGAdata documentation built on Nov. 2, 2024, 11:38 a.m.