From 1ce1ff9367268d251e46ebfb720e9455f015c8c8 Mon Sep 17 00:00:00 2001 From: rmanaem <rmanaem@protonmail.ch> Date: Thu, 12 Oct 2023 10:51:25 -0400 Subject: [PATCH 1/4] Added a subsection documenting participant-level results tsv in aggregate mode --- docs/query_tool.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/query_tool.md b/docs/query_tool.md index 1f501c19..f5648443 100644 --- a/docs/query_tool.md +++ b/docs/query_tool.md @@ -126,3 +126,10 @@ This number will be the same across rows corresponding to the same subject. Example: {{ read_table('./repos/neurobagel_examples/query-tool-results/participant-level-results.tsv') }} + +#### Participant-level results in aggregate mode +When `NB_RETURN_AGG` environment variable for the neurobagel API is set to `true` (see related section of the documentation [here](https://neurobagel.org/infrastructure/#set-the-environment-variables)), the value for all columns except for `DatasetID` and `SessionPath` in the Participant-level results is set to `protected`. + +Example: + +{{ read_table('./repos/neurobagel_examples/query-tool-results/participant-level-results-agg.tsv') }} From bdf12569a3353372638bba1167d05d16ed7d47d7 Mon Sep 17 00:00:00 2001 From: Arman Jahanpour <77515879+rmanaem@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:18:21 -0400 Subject: [PATCH 2/4] Updated docs/query_tool.md Co-authored-by: Alyssa Dai <alyssa.ydai@gmail.com> --- docs/query_tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/query_tool.md b/docs/query_tool.md index f5648443..e3143f27 100644 --- a/docs/query_tool.md +++ b/docs/query_tool.md @@ -127,7 +127,7 @@ Example: {{ read_table('./repos/neurobagel_examples/query-tool-results/participant-level-results.tsv') }} -#### Participant-level results in aggregate mode +#### `protected` participant-level results in aggregate mode When `NB_RETURN_AGG` environment variable for the neurobagel API is set to `true` (see related section of the documentation [here](https://neurobagel.org/infrastructure/#set-the-environment-variables)), the value for all columns except for `DatasetID` and `SessionPath` in the Participant-level results is set to `protected`. Example: From 176f94af2ffb971f0bd1768eb4dea7ed605c709d Mon Sep 17 00:00:00 2001 From: rmanaem <rmanaem@protonmail.ch> Date: Fri, 20 Oct 2023 13:29:44 -0400 Subject: [PATCH 3/4] Reworked the participant-level subsection --- docs/query_tool.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/query_tool.md b/docs/query_tool.md index e3143f27..e9048397 100644 --- a/docs/query_tool.md +++ b/docs/query_tool.md @@ -128,7 +128,8 @@ Example: {{ read_table('./repos/neurobagel_examples/query-tool-results/participant-level-results.tsv') }} #### `protected` participant-level results in aggregate mode -When `NB_RETURN_AGG` environment variable for the neurobagel API is set to `true` (see related section of the documentation [here](https://neurobagel.org/infrastructure/#set-the-environment-variables)), the value for all columns except for `DatasetID` and `SessionPath` in the Participant-level results is set to `protected`. + +If the values for all columns except for `DatasetID` and `SessionPath` in the participant-level results tsv are set to `protected`, this indicates the graph being queried has been configured (via its corresponding API) to return only aggregate information about matches (due to data privacy reasons). This configuration can be modified by setting the `NB_RETURN_AGG` environment variable to `false` (the value is by default `true`). see related section of the documentation [here](https://neurobagel.org/infrastructure/#set-the-environment-variables). Example: From 5fa291b5bce16084e508dffd33712ab93ba9dc99 Mon Sep 17 00:00:00 2001 From: rmanaem <rmanaem@protonmail.ch> Date: Fri, 20 Oct 2023 13:38:16 -0400 Subject: [PATCH 4/4] Updated docs/infrastructure.md --- docs/infrastructure.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/infrastructure.md b/docs/infrastructure.md index c84857bd..4f9f223b 100644 --- a/docs/infrastructure.md +++ b/docs/infrastructure.md @@ -144,7 +144,8 @@ For a local deployment, we recommend to **explicitly set** at least the followin The `NB_API_ALLOWED_ORIGINS` variable defaults to an empty string (`""`) when unset, meaning that your deployed API will only be accessible via direct `curl` requests to the URL where the API is hosted (see [this section](#test-the-new-deployment) for an example `curl` request). However, in many cases you may want to make the API accessible by a frontend tool such as our [browser query tool](https://github.com/neurobagel/query-tool). -To do so, you must explicitly specify the origin(s) for the frontend using `NB_API_ALLOWED_ORIGINS` in `.env`. +To do so, you must explicitly specify the origin(s) for the frontend using `NB_API_ALLOWED_ORIGINS` in `.env`. +For detailed instructions regarding the query tool see [Running cohort queries](query_tool.md). For example, the [`.template-env`](https://github.com/neurobagel/api/blob/main/.template-env) file in the Neurobagel API repo assumes you want to allow API requests from a query tool hosted at a specific port on `localhost` (see the [Docker Compose section](#docker-compose)).