R/loadFederationMetabricTestData1.R

#' Load test data for the metabric re-evaluation with METABRIC 1
#'
#' Loads data for gene expression, copy number, clinical covariates and clinical survival times for the test dataset
#' used to evlauate model scores.
#'
#' @param loadSurvData specifies if survival data is loaded. Should be set to false to users who do not have access
#' to validation data. Set to true for automated model evaluation harness.
#' @return a list with elements: exprData, containing an ExpressionSet of gene expression features;
#' copyData, containing an ExpressionSet of copy number features; clinicalFeaturesData, containing an
#' AnnotatedDataFrame of clinical covariates; and clinicalSurvData, if loadSurvData=TRUE, containing a Surv object
#' of survival times and censor values.
#' @author Adam Margolin and In Sock Jang
#' @export

loadFederationMetabricTestData1 <- function(loadSurvData=FALSE){
  metabricTestData <- list()
  
  idExpressionLayer <- "syn1589199"
  expressionLayer <- loadEntity(idExpressionLayer)
  metabricTestData$exprData <- expressionLayer$objects[[1]]
  
  idCopyLayer <- "syn1589221"
  copyLayer <- loadEntity(idCopyLayer)
  metabricTestData$copyData <- copyLayer$objects[[1]]
    
  idClinicalFeaturesLayer <- "syn1670339"
  clinicalFeaturesLayer <- loadEntity(idClinicalFeaturesLayer)
  metabricTestData$clinicalFeaturesData <- clinicalFeaturesLayer$objects$TestingData1CFData
  
  idClinicalSurvLayer <- "syn1648000"
  clinicalSurvLayer <- loadEntity(idClinicalSurvLayer)
  metabricTestData$clinicalSurvData <- clinicalSurvLayer$objects[[1]]
    
  return(metabricTestData)
}
Sage-Bionetworks/federationPLoSRevision documentation built on May 9, 2019, 12:12 p.m.