Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewer 1 - comment 2 - Cannot change the directory of downloaded Dataset files (using astropy) #112

Closed
JonnyTran opened this issue Feb 17, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request pyopensci-review

Comments

@JonnyTran
Copy link
Owner

  • openOmics version: 0.8.4
  • Python version: 3.7.9
  • Operating System: Ubuntu 20.04 - Linux 64

Description

Running gtex = GTEx(path="https://storage.googleapis.com/gtex_analysis_v8/rna_seq_data/") Results in: OSError: Not enough free space in /homes/.astropy/cache/download/url to download a 3.6G file, only 2.7G left.

Is there a possibility to choose the directory in which the files should be downloaded? This would be great.

What I Did

gtex = GTEx(path="https://storage.googleapis.com/gtex_analysis_v8/rna_seq_data/")

OSError: Not enough free space in /homes/.astropy/cache/download/url to download a 3.6G file, only 2.7G left.

@JonnyTran JonnyTran added enhancement New feature or request pyopensci-review labels Feb 17, 2021
@JonnyTran JonnyTran self-assigned this Feb 17, 2021
@JonnyTran
Copy link
Owner Author

I suggested the following fix:

I used the package astropy to automatically cache downloaded files. It defaults to saving the files at /homes/.astropy/cache/, and ideally it should be in one location for each user-session. But I can see how useful it is for the user to be able to make a setting to choose a directory of their choice - I will see about making an openomics configuration file at the user directory, located at ~/.openomics/conf.json.

@JonnyTran
Copy link
Owner Author

JonnyTran commented Mar 13, 2021

Users can now make the setting openomics.set_cache_dir(path="PATH/OF/YOUR/CHOICE/") which will change the default cache location with https://github.com/BioMeCIS-Lab/OpenOmics/blob/26e2ea4607a3e48f93297abe9f5463ad02c0abe0/openomics/utils/io.py#L18

However, the setting doesn't persist across user sessions. Will implement a ~/.openomics/conf.json settings file later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pyopensci-review
Projects
None yet
Development

No branches or pull requests

1 participant