seByTumor: Given a BigQueryConnection to the 2017 GDC-oriented ISB TCGA...

View source: R/seByTumor.R

seByTumorR Documentation

Given a BigQueryConnection to the 2017 GDC-oriented ISB TCGA bigtables, obtain a SummarizedExperiment 'shell' rowData and colData

Description

Given a BigQueryConnection to the 2017 GDC-oriented ISB TCGA bigtables, obtain a SummarizedExperiment 'shell' rowData and colData

Usage

seByTumor(tumorCode = "LUAD", assayTblName = "RNAseq_Gene_Expression",
  rdColsToKeep = c("gene_name", "Ensembl_gene_id", "gene_type"),
  bqConnClinical, bqConnAssay, rowkey = "Ensembl_gene_id",
  colkey = "case_barcode", assayvbl = "HTSeq__Counts")

Arguments

tumorCode

one of the concise TCGA codes in a character string – not checked, defaults to "LUAD", lung adenocarcinoma

assayTblName

the name of the assay whose annotation will be used as rowData

rdColsToKeep

columns of assay table to use in rowData component

bqConnClinical

instance of BigQueryConnection from bigrquery, for access to clinical metadata – current expectation is that the BigQuery dataset is named "TCGA_bioclin_v0" and has a table called "Clinical"

bqConnAssay

instance of BigQueryConnection from bigrquery – current expectation is that the BigQuery dataset is named "TCGA_hg19_data_v0"

rowkey

name of a field to be used as key for rows

colkey

name of a field to use as key for samples

assayvbl

name of field to use for numerical values

Value

SummarizedExperiment

Note

This function demonstrates the use of external resources for rowData, colData and assay components of a SummarizedExperiment instance. The intention is that the full complement of activities supported by SummarizedExperiment-class are likewise supported through this class, with assay data and sample and feature metadata all external and in BigQuery projects. The seByTumor function is provided to generate an example of this approach with minimal user configuration.

Examples

if (interactive()) {
 require(bigrquery)
 # be sure that .cgcBilling is set 
 code = Sys.getenv("CGC_BILLING")
 if (!(nchar(code)==0)) {
  clinQ = cgcConn(billing=code)
  assayQ = cgcConn( dataset = "TCGA_hg38_data_v0", billing=code )
  myexpShell = seByTumor( bqConnClinical=clinQ,
        bqConnAssay=assayQ)
  print(myexpShell)
  print(nrow(myexpShell) == 60483)
  print(ncol(myexpShell) == 515) # 7/18/2018
  assay(myexpShell[11:15,1:4]) # some case_barcodes repeat
  }
 }

shwetagopaul92/restfulSE documentation built on Oct. 12, 2022, 10:51 p.m.