How delete the AnnotationHub downloaded datasets
Entering edit mode
Last seen 2.1 years ago

Hi guys!

I was wondering where the datasets downloaded by AnnotationHub are locally saved. I was practicing with different datasets and I realized that there is only 6GB of free space on my drive C. I have two questions:

  1. Where the datasets are downloaded and how can I clear those files?
  2. How can I change the default path used by AnnotationHub so I could save the downloaded data elsewhere.

I would appreciate it if you could help me with this problem.

AnnotationHub • 955 views
Entering edit mode
Mike Smith ★ 6.2k
Last seen 21 minutes ago
EMBL Heidelberg

You can find the current location of you AnnotationHub cache with hubCache() e.g. for me that's:

ah <- AnnotationHub::AnnotationHub()

## [1] "/mnt/data/AnnotationHub"

You can clear the entire cache with removeCache() or individual records with removeResources(). There's a section in the Troubleshoot The Hubs vignette that details how to move an existing cache, so you don't have to download everything again if you already have a lot of resources.

Personally I choose to use a different location by setting the environment variable ANNOTATION_HUB_CACHE=</my/annotationhub/cache/location/>. Exactly how you should do that depends on what operating system you're using. One option is to include it in your ".Rprofile" file.

Entering edit mode

Thank you so much Mike. It was a great help. I am using Windows. I couldn't find the ".Rprofile" file. Is there any other way to change the environmental variable by Windows cmd?

Entering edit mode

Thinking about it a bit more, this would be better set in the file .Renviron - that's specifically for setting environment variables. I can't remember the location of .Renviron on Windows, but my suggestion would be to install the usethis package with install.packages('usethis') and then run usethis::edit_r_environ(). That should open the appropriate file in an editor for you.

You set the variable with a line like ANNOTATION_HUB_CACHE=</my/annotationhub/cache/location/>


Login before adding your answer.

Traffic: 581 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6