User friendly tools for downloading and manipulating gen3 metadata
Project description
gen3-metadata
User friendly tools for downloading and manipulating gen3 metadata
Python Installation
git clone https://github.com/AustralianBioCommons/gen3-metadata.git
bash build.sh
Usage Example
- Notebook can be found in the
example_notebook.ipynbfile - Make sure to select .venv as the kernel in the notebook
from gen3_metadata.gen3_metadata_parser import Gen3MetadataParser
# Initialise
key_file = "path/to/credentials.json"
gen3metadata = Gen3MetadataParser(key_file)
# Authenticate
gen3metadata.authenticate()
# Fetching data and returning as dataframe
program_name = "program1"
project_code = "project1"
node_label="medical_history"
pd_data = gen3metadata.fetch_data_pd(program_name, project_code, node_label=node_label)
pd_data
# Fetching data and returning as json
json_data = gen3metadata.fetch_data_json(program_name, project_code, node_label=node_label)
json_data
Running Tests
The tests are written using the pytest framework.
pytest -vv tests/
Installation of the R version of gen3-metadata
You can install the gen3metadata R tool from GitHub with:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("AustralianBioCommons/gen3-metadata", subdir = "gen3metadata-R")
The package depends on several other packages, which should hopefully be installed automatically. If case this doesn't happen, run:
install.packages(c("httr", "jsonlite", "jose", "glue"))
Then all you need to do is load the package.
library("gen3metadata")
Usage Example
This is a basic example to authenticate and load some data.
# Load the library
library("gen3metadata")
# Set the path to the credentials file
key_file_path <- "path/to/credentials.json"
# Create the Gen3 Metadata Parser object
gen3 <- Gen3MetadataParser(key_file_path)
# Authenticate the object
gen3 <- authenticate(gen3)
# Load some data
dat <- fetch_data(gen3,
program_name = "program1",
project_code = "AusDiab",
node_label = "subject")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gen3_metadata-1.1.0.tar.gz.
File metadata
- Download URL: gen3_metadata-1.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70370b72f43f35b8e83b1825566958395b715a54348ab12f774e7361722d6b4b
|
|
| MD5 |
3509ff6aab42dd39b9339a0843c16672
|
|
| BLAKE2b-256 |
8b7c3580ca0c9e82c182ca4dfa70f2157505b59921cd00dee89ef18aeacfc4f3
|
File details
Details for the file gen3_metadata-1.1.0-py3-none-any.whl.
File metadata
- Download URL: gen3_metadata-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5feb825c6de8c99edd08ad10a780bd2fc185066c8966e78ed014df27b570e548
|
|
| MD5 |
c68e24abe7fbb822da8eeeeb1a749a97
|
|
| BLAKE2b-256 |
59de04ca2bddc3b8f9f705f3c00b705c4cb4c955c757450104ae0d1055f81c01
|