How delete the AnnotationHub downloaded datasets
1
0
Entering edit mode
@00a12689
Last seen 3.1 years ago
Germany

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 • 1.5k views
ADD COMMENT
1
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 26 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()
AnnotationHub::hubCache(ah)

## [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.

ADD COMMENT
0
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?

ADD REPLY
0
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/>

ADD REPLY

Login before adding your answer.

Traffic: 957 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6