cBioCache-deprecated: Deprecated cache helper functions

cBioCache-deprecatedR Documentation

Deprecated cache helper functions

Description

'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")
)

removeDataCache(
    cbio, by = "hugoGeneSymbol",
    studyId = "acc_tcga",
    genePanelId = "AmpliSeq",
    molecularProfileIds =
        c("acc_tcga_rppa", "acc_tcga_linear_CNA", "acc_tcga_mutations"),
    dry.run = TRUE
)


waldronlab/cBioPortalData documentation built on Nov. 19, 2024, 12:01 p.m.