library(MMRFBiolinks)
devtools::load_all(".")
library(TCGAbiolinks)
library(SummarizedExperiment)
library(dplyr)
library(DT)
Different sources of clinical data
MMRF-Compass clinical data can be retrieved from two different sources: - **GDC Clinical information**: MMRF-Commpass clinical information download from GDC database; - **MMRF-Commpass Clinical information**: Clinical information downloaded directly from MMRF-Commpass Researcher Gateway has more information compared to the previous dataset (e.g Best overall response). So the previous one is only a subset of this last. The user can download this dataset from MMRF-Commpass Researcher Gateway and import it as a dataframe into R environment.

Get MMRF-COMMPASS clinical data at GDC Data Portal

MMRFGDC_QueryClinic

In this example we will fetch clinical GDC data.

clinical <- MMRFGDC_QueryClinic(type = "clinical")
clinical %>% head %>% datatable(options = list(scrollX = TRUE, keys = TRUE))

Get MMRF-COMMPASS data at MMRF-COMMPASS Research Gateway

In this example we will fetch clinical MMRF-COMMPASS Clinical information data form MMRF-COMMPASS Research Gateway. Once the dataset (.csv file) is imported into our own R environment, it is can be explored as a R-dataframe.

clinMMGateway <- read.csv("~/MMRF_CoMMpass_IA14_STAND_ALONE_TRTRESP.csv")
clinMMGateway %>% datatable(options = list(scrollX = TRUE, keys = TRUE))

MMRFRG_GetBorInfo

Get Best Overall Response (BOR) type filtered by sample ID (Case 1) or Get sample ID filtered by BOR type (Case 2)

# case 1

 IDsamples<-MMRFRG_GetBorInfo(clin.rg=clinMMGateway,bor="PR") 

 # case 2

   list.samp<- c("MMRF_0001","MMRF_0002",
                 "MMRF_0003","MMRF_0004",
                 "MMRF_0005","MMRF_0006",
                 "MMRF_0007","MMRF_0008",
                 "MMRF_0009","MMRF_0010")


 bestOverall<-MMRFRG_GetBorInfo(clin.rg=clinMMGateway,listSamples=list.samp)  

MMRFGDC_QuerySamples

Retrieve samples identifiers filtered by the selected type sample (case 2) or Retrieve samples identifiers filtered by the selected therapy (case 3) or Retrieve samples identifiers from both case 1 and case 2.

therapy<-"Dexamethasone" 

tsample<-"TRBM"
clin<-MMRFGDC_QueryClinic(type = "clinical")

query.mm <- GDCquery(project = "MMRF-COMMPASS", 
                             data.category = "Transcriptome Profiling",
                             data.type = "Gene Expression Quantification",
                             experimental.strategy = "RNA-Seq",
                             workflow.type="HTSeq - FPKM")



IDs1<-MMRFGDC_QuerySamples(query=query.mm,typesample=tsample, clin.mm=clin,therapyname=therapy) #case 1
IDs2<-MMRFGDC_QuerySamples(query=query.mm,typesample=tsample) #case 2 
IDs3<-MMRFGDC_QuerySamples(clin.mm=clin,therapyname=therapy) #case 3


marziasettino/MMRFBiolinks documentation built on Jan. 24, 2023, 4:49 a.m.