Skip to contents

cBioPortalData no longer caches data from API responses; therefore, removeDataCache is no longer needed. It will be removed as soon as the next release of Bioconductor.

Usage

removeDataCache(
  api,
  studyId = NA_character_,
  genePanelId = NA_character_,
  genes = NA_character_,
  molecularProfileIds = NULL,
  sampleListId = NULL,
  sampleIds = NULL,
  by = c("entrezGeneId", "hugoGeneSymbol"),
  dry.run = TRUE,
  ...
)

Arguments

api

An API object of class cBioPortal from the cBioPortal function

studyId

character(1) Indicates the "studyId" as taken from getStudies

genePanelId

character(1) Identifies the gene panel, as obtained from the genePanels function

genes

character() Either Entrez gene identifiers or Hugo gene symbols. When included, the 'by' argument indicates the type of identifier provided and 'genePanelId' is ignored. Preference is given to Entrez IDs due to faster query responses.

molecularProfileIds

character() A vector of molecular profile IDs

sampleListId

character(1) A sample list identifier as obtained from sampleLists()

sampleIds

character() Sample identifiers

by

character(1) Either 'entrezGeneId' or 'hugoGeneSymbol' for row metadata (default: 'entrezGeneId')

dry.run

logical Whether or not to remove cache files (default TRUE).

...

Additional arguments to lower level API functions

Value

removeDataCache: The path to the cache location when dry.run = FALSE if the file exists. Otherwise, when dry.run = TRUE, the function return the output of the file.remove operation.

removeDataCache

Remove the computed cache location based on the function inputs to cBioPortalData(). To remove the cache, simply replace the cBiocPortalData() function name with removeDataCache(); see the example. If the computed cache location is not found, it will return an empty vector.

Examples


cbio <- cBioPortal()

cBioPortalData(
    cbio, by = "hugoGeneSymbol",
    studyId = "acc_tcga",
    genePanelId = "AmpliSeq",
    molecularProfileIds =
        c("acc_tcga_rppa", "acc_tcga_linear_CNA", "acc_tcga_mutations")
)
#> harmonizing input:
#>   removing 1 colData rownames not in sampleMap 'primary'
#> A MultiAssayExperiment object of 3 listed
#>  experiments with user-defined names and respective classes.
#>  Containing an ExperimentList class object of length 3:
#>  [1] acc_tcga_mutations: RangedSummarizedExperiment with 25 rows and 20 columns
#>  [2] acc_tcga_linear_CNA: SummarizedExperiment with 8 rows and 90 columns
#>  [3] acc_tcga_rppa: SummarizedExperiment with 1 rows and 46 columns
#> Functionality:
#>  experiments() - obtain the ExperimentList instance
#>  colData() - the primary/phenotype DataFrame
#>  sampleMap() - the sample coordination DataFrame
#>  `$`, `[`, `[[` - extract colData columns, subset, or experiment
#>  *Format() - convert into a long or wide DataFrame
#>  assays() - convert ExperimentList to a SimpleList of matrices
#>  exportClass() - save data to flat files

removeDataCache(
    cbio, by = "hugoGeneSymbol",
    studyId = "acc_tcga",
    genePanelId = "AmpliSeq",
    molecularProfileIds =
        c("acc_tcga_rppa", "acc_tcga_linear_CNA", "acc_tcga_mutations"),
    dry.run = TRUE
)
#> Warning: 'removeDataCache' is deprecated.
#>   See help('cBioCache-deprecated').
#> named character(0)