Skip to content

Commit

Permalink
feature/g3t-update (#23)
Browse files Browse the repository at this point in the history
* update for latest g3t making use of git

* restructure page ordering and content structure for clarity

* improve quickstart guide to cover data upload and data download use case

* deprecate any mentions to `g3t utilities`

* consolidate requirements page

* incorporate initial user feedback

---------

Co-authored-by: matthewpeterkort <[email protected]>
Co-authored-by: quinnwai <[email protected]>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent 2da6405 commit 50187ac
Show file tree
Hide file tree
Showing 14 changed files with 410 additions and 133 deletions.
18 changes: 9 additions & 9 deletions docs/data-model/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ The process of integrating your data into the graph involves several steps:
* Normalize Data: Split the spreadsheet data into FHIR-compliant resources.

* Step 4: Utilize provided FHIR Tooling or Libraries
* FHIR Tooling: Use `g3t utilities meta to_tabular, from_tabular ` and associated libraries to support data conversion and validation.
* Validation: Use `g3t utilities meta validate` to validate the transformed data against FHIR specifications to ensure compliance and accuracy.
* FHIR Tooling: Use `g3t meta dataframe ` and associated libraries to support data conversion and validation.
* Validation: Use `g3t meta validate` to validate the transformed data against FHIR specifications to ensure compliance and accuracy.

* Step 5: Import into FHIR-Compatible System
* Load Data: Use `g3t commit` to load the transformed data into the aced system.
Expand Down Expand Up @@ -72,7 +72,7 @@ The mapping process typically involves several steps:

## Identifiers

Identifiers in FHIR references typically include the following components: [see](https://hl7.org/fhir/datatypes.html#Identifier)
Identifiers in FHIR references typically include the following components: [see more](https://hl7.org/fhir/datatypes.html#Identifier)

> A string, typically numeric or alphanumeric, that is associated with a single object or entity within a given system. Typically, identifiers are used to connect content in resources to external content available in other frameworks or protocols.
Expand All @@ -84,29 +84,29 @@ Value: The actual value of the identifier within the specified system. For insta

## References

By using identifiers in references, FHIR ensures that data can be accurately linked, retrieved, and interpreted across different systems and contexts within the healthcare domain, promoting interoperability and consistency in data exchange. [see](https://hl7.org/fhir/references.html)
By using identifiers in references, FHIR ensures that data can be accurately linked, retrieved, and interpreted across different systems and contexts within the healthcare domain, promoting interoperability and consistency in data exchange. [see more](https://hl7.org/fhir/references.html)

> Many of the defined elements in a resource are references to other resources. Using these references, the resources combine to build a web of information about healthcare.

## Key resources

### ResearchStudy
> A scientific study of nature that sometimes includes processes involved in health and disease. [see](https://hl7.org/fhir/researchstudy.html)
> A scientific study of nature that sometimes includes processes involved in health and disease. [see more](https://hl7.org/fhir/researchstudy.html)
### ResearchSubject
> A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study. [see](https://hl7.org/fhir/researchsubject.html)
> A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study. [see more](https://hl7.org/fhir/researchsubject.html)

### Patient
> Demographics and other administrative information about an individual or animal receiving care or other health-related services. [see](https://hl7.org/fhir/patient.html)
> Demographics and other administrative information about an individual or animal receiving care or other health-related services. [see more](https://hl7.org/fhir/patient.html)
### Specimen

> A sample to be used for analysis. [see](https://hl7.org/fhir/specimen.html)
> A sample to be used for analysis. [see more](https://hl7.org/fhir/specimen.html)
### DocumentReference
> A reference to a document of any kind for any purpose. [see](https://hl7.org/fhir/documentreference.html)
> A reference to a document of any kind for any purpose. [see more](https://hl7.org/fhir/documentreference.html)

See the <a href="/workflows/metadata/">metadata workflow section</a> for more information on how to create and upload metadata.
2 changes: 1 addition & 1 deletion docs/data-model/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Examine [resource](https://www.hl7.org/fhir/resource.html) definitions [here](ht
* Can simply point to the [ResearchStudy](https://hl7.org/fhir/researchstudy.html), to indicate the file is part of the study
* Can point to [Patient](https://hl7.org/fhir/patient.html), or [Specimen](https://hl7.org/fhir/specimen.html), to indicate the file is based on them
* An [Observation](https://hl7.org/fhir/observation.html) can point to any entity
* A [Task](https://hl7.org/fhir/task.html), or [DiagnosticReport](https://hl7.org/fhir/diagnosticreport.html) can provide [provenance](https://en.wikipedia.org/wiki/Provenance#Data_provenance) on how the file was created
* A [Task](https://hl7.org/fhir/task.html) can provide [provenance](https://en.wikipedia.org/wiki/Provenance#Data_provenance) on how the file was created

Each resource has at least one study controlled [official](https://hl7.org/fhir/codesystem-identifier-use.html#identifier-use-official) [Identifier](https://hl7.org/fhir/datatypes.html#Identifier). Child resources have [Reference](http://www.hl7.org/fhir/references.html) fields to point to their parent.

Expand Down
13 changes: 11 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@

<a href="https://www.cancerresearchuk.org/funding-for-researchers/research-opportunities-in-early-detection-and-diagnosis/international-alliance-for-cancer-early-detection">![ACED logo](./images/aced_website_header.jpg)</a>

This is the documentation for the [ACED-IDP Data Commons](https://aced-idp.org), serving the [International Alliance for Cancer Early Detection](https://www.cancerresearchuk.org/funding-for-researchers/research-opportunities-in-early-detection-and-diagnosis/international-alliance-for-cancer-early-detection)
This documentation will walk you through the steps for submitting data to the [ACED-IDP Data Commons](https://aced-idp.org).

For more on ACED, ie the [International Alliance for Cancer Early Detection](https://www.cancerresearchuk.org/funding-for-researchers/research-opportunities-in-early-detection-and-diagnosis/international-alliance-for-cancer-early-detection)

> The International Alliance for Cancer Early Detection (ACED) is a new £55 million partnership between Cancer Research UK, the Canary Center at Stanford University, the University of Cambridge, the Knight Cancer Institute at OHSU, University College London and the University of Manchester.
> We are uniting world leading researchers to tackle the biggest challenges in early detection, an important area of unmet clinical need. Scientists in the Alliance are working together at the forefront of technological innovation to translate research into realistic ways to improve cancer diagnosis, which can be implemented into health systems and meaningfully benefit people with cancer.
## About
The [gen3-tracker](https://github.com/ACED-IDP/gen3_util/) (g3t) command line utility is a combination of tools that facilitate data sharing on the ACED platform. Its goal is to address the following use case:

_As an analyst, I need a way to create a project, upload files and associate those files with metadata in an incremental manner._

The following guide details the steps a data contributor must take to submit a project to the ACED data commons.

## Getting Started

Please see the [Getting Started](./getting-started.md) page for instructions on how to installing the required tools needed to create a project, add authorized users, and upload and download files.
To navigate through each page, use pages list in the top left or using the navigation arrow on the bottom left and right! Otherwise, check out our [requirements](requirements) page to get started.

<a href="https://aced-idp.org">![Main landing page for ACED IDP](./images/main-page.png)</a>
167 changes: 167 additions & 0 deletions docs/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: Requirements
---

# Requirements


{% include '/note.md' %}

## 1. Download gen3-client

A binary executable of the latest version of the gen3-client should be downloaded from the following Table or from the [Release page on Github](https://github.com/ACED-IDP/cdis-data-client/releases). Choose the file that matches your operating system (Windows, Linux, or macOS).

| Operating System | Gen3 Client | Checksum |
|------------------|------------------------------------------|----------------------------|
| macOS | [gen3-client-macos.pkg][macos] | [checksums.txt][checksums] |
| Linux (amd64) | [gen3-client-linux-amd64.zip][linux] | [checksums.txt][checksums] |
| Windows (amd64) | [gen3-client-windows-amd64.zip][windows] | [checksums.txt][checksums] |


[macos]: https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-macos.pkg
[linux]: https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-linux-amd64.zip
[windows]: https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-windows-amd64.zip
[checksums]: https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/checksums.txt

### Checksum Verification

In order to verify that the downloaded file can be trusted checksums are provided in [`checksums.txt`][checksums]. See below for examples of how to use this file.

<details>
<summary>Successful Verification</summary>

To verify the integrity of the binaries on macOS run the following command in the same directory as the downloaded file:

```sh
$ shasum -c checksums.txt --ignore-missing
gen3-client-macos.pkg: OK
```

If the `shasum` command outputs `OK` than the verification was successful and the executable can be trusted.

</details>

<details>
<summary>Unsuccessful Verification</summary>

Alternatively if the command outputs `FAILED` than the checksum did not match and the binary should not be run.

```sh
$ shasum -c checksums.txt --ignore-missing
shasum: WARNING: 1 computed checksum did NOT match
shasum: checksums.txt: no file was verified
```

In such a case please reach out to the ACED development team for assistance.

</details>

### Installation Instructions

??? "macOS Installation Instructions"
1. Download the latest macOS version ([dataclient_osx.pkg][macos]).
2. Follow the instructions in the installer
3. Open a terminal window.
4. Move the executable to the default directory: `mv /Applications/gen3-client ~/.gen3/gen3-client`
5. Add the directory containing the executable to your Path environment variable by entering this command in the terminal: `echo 'export PATH=$PATH:~/.gen3' >> ~/.bash_profile`
6. Run `source ~/.bash_profile` or restart your terminal.
7. Now you can execute the program by opening a terminal window and entering the command `gen3-client`

??? "Linux Installation Instructions"
1. Download the latest Linux version of the gen3-client.
2. Unzip the archive.
3. Add the unzipped executable to a directory, for example: `~/.gen3/gen3-client`
4. Open a terminal window.
5. Add the directory containing the executable to your Path environment variable by entering this command in the terminal: `echo 'export PATH=$PATH:~/.gen3' >> ~/.bash_profile`
6. Run `source ~/.bash_profile` or restart your terminal.
7. Now you can execute the program by opening a terminal window and entering the command `gen3-client`

??? "Windows Installation Instructions"
1. Download the Windows version of the gen3-client.
2. Unzip the archive.
3. Add the unzipped executable to a directory, for example: `C:\Program Files\gen3-client\gen3-client.exe`
4. Open the Start Menu and type "edit environment variables".
5. Open the option "Edit the system environment variables".
6. In the "System Properties" window that opens up, on the "Advanced" tab, click on the "Environment Variables" button.
7. In the box labeled "System Variables", find the "Path" variable and click "Edit".
8. In the window that pops up, click "New".
9. Type in the full directory path of the executable file, for example: `C:\Program Files\gen3-client`
10. Click "Ok" on all the open windows and restart the command prompt if it is already open by entering cmd into the start menu and hitting enter.

## 2. Configure a Profile with Credentials

Before using the gen3-client to upload or download data, the `gen3-client` needs to be configured with API credentials downloaded from the [Profile page](https://aced-idp.org/identity).

![Gen3 Profile page](profile.png)

Download the access key from the portal and save it in the standard location `~/.gen3/credentials.json`

![Gen3 Credentials](credentials.png)

From the command-line, run the gen3-client configure command:

```sh
gen3-client configure --profile=<profile_name> --cred=<credentials.json> --apiendpoint=https://aced-idp.org

# Mac/Linux Example:
gen3-client configure --profile=demo --cred=~/Downloads/credentials.json --apiendpoint=https://aced-idp.org

# Windows Example:
gen3-client configure --profile=demo --cred=C:\Users\demo\Downloads\credentials.json --apiendpoint=https://aced-idp.org
```

To confirm you successfully configured a profile with the correct authorization privileges, you can run the `gen3-client auth` command, which should list your access privileges for each project in the commons you have access to:

```sh
gen3-client auth --profile=aced

# 2023/12/05 15:07:12
# You have access to the following resource(s) at https://aced-idp.org:
# 2023/12/05 15:07:12 /programs/aced/projects/myproject...
```

## 3. Install gen3-tracker (g3t)

The `gen3-tracker (g3t)` tool requires a working [Python 3](https://www.python.org/downloads/) installation no older than Python 3.10. Run the following in your working directory to install the latest version of g3t from the Python Package Index:

```sh
# Optionally create a virtual environment
python3 -m venv venv; source venv/bin/activate

pip install gen3-tracker
```

You can verify the installation was successful by then running the `g3t` command with the expected output being the [latest version](https://pypi.org/project/gen3-tracker/#history):

```sh
g3t version
```

### Upgrading g3t

This version should match the latest version on the [PyPi page](https://pypi.org/project/gen3-tracker/). If it is out of date, simply run the following to upgrade your local version:

```sh
pip install -U gen3-tracker
```

### Configuration

g3t uses the [gen3-client](https://gen3.org/resources/user/gen3-client/#2-configure-a-profile-with-credentials) configuration flow.

After configuration, you can either specify the `--profile` or set the `G3T_PROFILE=profile-name` environmental variable.

### Testing the configuration

The command `g3t ping` will confirm that the access key and gen3-client have been configured correctly

```sh
g3t ping

msg: 'Configuration OK: Connected using profile:production'
endpoint: https://aced-idp.org
username: [email protected]
```

Now that gen3-client and gen3-tracker are set up, see the [Quickstart Guide](/workflows/quick-start-guide) on how to upload data to a project.

15 changes: 8 additions & 7 deletions docs/requirements/gen3-tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ pip install -U gen3-tracker

g3t uses the [gen3-client](https://gen3.org/resources/user/gen3-client/#2-configure-a-profile-with-credentials) configuration flow.

After configuration, you can either specify the `--profile` option or set the `G3T_PROFILE=profile-name` environmental variable.

After configuration, you can either specify the `--profile` or set the `G3T_PROFILE=profile-name` environmental variable.

### Testing the configuration

Expand All @@ -54,11 +53,13 @@ username: [email protected]

The following options and environmental variables are synonymous, you may set them as environmental variables or pass them as parameters to the command line.

| option | environment | comment | example |
|--------------|-----------------| ------------------- | ------------------------------ |
| --project_id | G3T_PROJECT_ID | authorization | |
| --profile | G3T_PROFILE | gen3-client profile | |
| --format | G3T_FORMAT | Output format. | yaml |
| option | environment | comment | example |
| ------------ | -------------- | ------------------- | ------- |
| --project_id | G3T_PROJECT_ID | authorization | |
| --profile | G3T_PROFILE | gen3-client profile | |
| --format | G3T_FORMAT | Output format. | yaml |

For example, a `ping` command using the `aced` profile we be `g3t --profile aced ping`

Alternatively, you can set the environmental variables using the `EXPORT` function e.g.:

Expand Down
19 changes: 11 additions & 8 deletions docs/workflows/add-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@

## Granting user access to a project

Once a project has been created you will have full access to it. There are two ways to request the addition additional users to the project:
Once a project has been created you will have full access to it.
The project owner can add additional users to the project using the `g3t collaborator` commands.

There are two ways to request the addition additional users to the project:

## 1. Read and Write Access

To give another user full access to the project, run the following:

```sh
g3t utilities users add --username [email protected] --write --project_id aced-myproject
g3t collaborator add --write user-can-write@example.com
```

## 2. Read Only Access

Alternatively, to give another user read access only (without the ability to upload to the project), run the following:

In order to implement these requests, **an authorized user will need to sign** the request before the user can use the remote repository. See `g3t utilities access sign`

```sh
g3t utilities users add --username someone@example.com --project_id aced-myproject
g3t collaborator add user-read-only@example.com
```


## 2. Approvals
In order to implement these requests, **an authorized user will need to sign** the request before the user can use the remote repository. See `g3t collaborator approve --help
`
Loading

0 comments on commit 50187ac

Please sign in to comment.