terraTCGAdata: Obtain a MultiAssayExperiment from the Terra workspace

View source: R/terraTCGAdata.R

terraTCGAdataR Documentation

Obtain a MultiAssayExperiment from the Terra workspace

Description

Workspaces on Terra come pre-loaded with TCGA Data. The examples in the documentation correspond to the TCGA_COAD_OpenAccess_V1 workspace that can be found on app.terra.bio.

Usage

terraTCGAdata(
  clinicalName,
  assays,
  participants = TRUE,
  sampleCode = NULL,
  split = FALSE,
  workspace = terraTCGAworkspace(),
  namespace = .DEFAULT_NAMESPACE,
  tablename = .DEFAULT_TABLENAME,
  verbose = TRUE,
  sampleIdx = TRUE
)

Arguments

clinicalName

character(1) The column name taken from getClinicalTable() and downloaded to be included as the colData.

assays

character() A character vector of assay names taken from getAssayTable()

participants

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

sampleCode

character() A character vector of sample codes from sampleTypesTable(). By default, (NULL) all samples are downloaded and kept in the data.

split

logical(1L) Whether or not to split the MultiAssayExperiment by sample types using splitAssays helper function (default FALSE).

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.

tablename

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

verbose

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

sampleIdx

numeric() index or TRUE. Specify an index for subsetting the assay data. This argument is mainly used for example and vignette purposes. To use all the data, use the default value (default: TRUE)

Value

A MultiAssayExperiment object with n number of assays corresponding to the assays argument.

Examples

if (
    AnVILGCP::gcloud_exists() &&
    identical(AnVILBase::avplatform_namespace(), "AnVILGCP")
)
  terraTCGAdata(
      clinicalName = "clin__bio__nationwidechildrens_org__Level_1__biospecimen__clin",
      assays = c("protein_exp__mda_rppa_core__mdanderson_org__Level_3__protein_normalization__data",
      "rnaseqv2__illuminahiseq_rnaseqv2__unc_edu__Level_3__RSEM_genes_normalized__data"),
      workspace = "TCGA_COAD_OpenAccess_V1-0_DATA",
      sampleCode = NULL,
      sampleIdx = 1:4,
      split = FALSE
  )


LiNk-NY/terraTCGAdata documentation built on Nov. 4, 2024, 2:07 p.m.