Skip to content

Dataverse data access module#170

Open
abearab wants to merge 17 commits into
scverse:devfrom
abearab:dev
Open

Dataverse data access module#170
abearab wants to merge 17 commits into
scverse:devfrom
abearab:dev

Conversation

@abearab

@abearab abearab commented Dec 24, 2024

Copy link
Copy Markdown

Aim

Including a draft dataverse data collector as part of gget tool boxes.

e.g.

gget dataverse -t dataverse.tsv -o path-to-dir
import gget
# df table with `id`, `name`, and `type` columns
gget.dataverse(df = df,  path = 'path-to-dir')

Tasks

  • make a python module and CLI for data collection from dataverse
  • collect data for a list of datasets defined as a JSON
  • build a JSON file for a list of datasets deposited in a given dataverse DOI at certain version
  • collect data by providing a dataverse DOI and version
  • collect data by providing a list of dataverse datafiles (i.e. id, name, and type) in dataframe or csv/tsv file
  • collect data by providing a list of dataverse datafiles (i.e. id, name, and type) as arguments

#170 (comment)

  • Add documentation pages in docs/src/en
  • Check/improve error handling
  • Match the logging of other gget modules instead of using the print_sys function
  • The table arg should be the positional argument for use from command line – gget dataverse table.tsv
  • Make out a non-required argument with the current working directory as default

History

As part of GilbertLabUCSF/CanDI#34, related to #121, I draft a module to collect data from dataverse. Then I thought data collection from dataverse can be a more general functionality here as part of gget.

I mostly borrowed codes from gears/utils.py or TDC/load.py. However, there are other efforts such as pyDataverse and easyDataverse.

References

@abearab

abearab commented Dec 24, 2024

Copy link
Copy Markdown
Author

@lauraluebbert – I simplified this feature as discussed here #124 (comment). It should be more straightforward now and it works smoothly on my end, let me know what you think!

@lauraluebbert

lauraluebbert commented Feb 4, 2025

Copy link
Copy Markdown
Collaborator

This looks great already!

I have two comments and a few minor requests listed below:

  1. Please add documentation pages for your tool. Make sure to list yourself as the developer of this tool so you can get due credit (example: https://pachterlab.github.io/gget/en/bgee.html)
  2. Error handling: I haven't played around with this yet, but what does your error handling look like (e.g. what if the user inputs a dataframe that does not have 'name', 'id', 'type' columns or there is a server error with Dataverse)? Please make sure the error messages are clear and tell the user what to do.
  • Add documentation pages in docs/src/en (feel free to skip the Spanish versions for now or draft something with Google translate and I'll check it later)
  • Check/improve error handling
  • Match the logging of other gget modules instead of using the print_sys function
  • The table arg should be the positional argument for use from command line (see other modules for examples). Like that, the user does not need to specify gget dataverse --table table.tsv, but can just run gget dataverse table.tsv
  • Make out a non-required argument with the current working directory as default

@lauraluebbert lauraluebbert deleted the branch scverse:dev January 19, 2026 00:19
@lauraluebbert lauraluebbert reopened this Jan 20, 2026
@lauraluebbert lauraluebbert deleted the branch scverse:dev February 8, 2026 19:23
@lauraluebbert lauraluebbert reopened this Feb 8, 2026
@lauraluebbert lauraluebbert deleted the branch scverse:dev May 24, 2026 01:11
@lauraluebbert lauraluebbert reopened this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants