## ----eval=FALSE--------------------------------------------------------------------------------------------- # library(OmnipathR) # # # Current cache directory # omnipath_get_cachedir() # # # Change to a custom location # omnipath_set_cachedir("/tmp/my_omnipathr_cache") # # # Reset to default # omnipath_set_cachedir() ## ----eval=FALSE--------------------------------------------------------------------------------------------- # # Save an R object into the cache # omnipath_cache_save(my_data, url = "https://example.com/data.tsv") # # # Load it back # my_data <- omnipath_cache_load(url = "https://example.com/data.tsv") ## ----eval=FALSE--------------------------------------------------------------------------------------------- # # Find all cached BioMart queries # omnipath_cache_search("biomart") # # # Find all cached OmniPath downloads # omnipath_cache_search("omnipathdb\\.org") ## ----eval=FALSE--------------------------------------------------------------------------------------------- # # By URL # omnipath_cache_remove(url = "https://example.com/data.tsv") # # # By key # key <- omnipath_cache_key(url = "https://example.com/data.tsv") # omnipath_cache_remove(key = key) ## ----eval=FALSE--------------------------------------------------------------------------------------------- # # Remove everything older than 30 days # omnipath_cache_remove(max_age = 30) # # # Remove failed downloads # omnipath_cache_remove(status = "failed") # # # Keep only the latest version of each entry # omnipath_cache_remove(only_latest = TRUE) ## ----eval=FALSE--------------------------------------------------------------------------------------------- # omnipath_cache_remove(wipe = TRUE) # # or equivalently: # omnipath_cache_wipe() ## ----eval=FALSE--------------------------------------------------------------------------------------------- # omnipath_cache_key(url = "https://omnipathdb.org/interactions") # # [1] "95ee739b50bbfea2c48e5c86a64525084a1dab30" ## ----eval=FALSE--------------------------------------------------------------------------------------------- # omnipath_unlock_cache_db() ## ----session_info, echo=FALSE------------------------------------------------------------------------------- sessionInfo()