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

DIG-1522: change references to "cohort" to "program" #875

Merged
merged 13 commits into from
Nov 25, 2024
8 changes: 4 additions & 4 deletions docs/src/content/docs/ingest/ingest-help.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Ingest can proceed with missing fields as long as there are identifiers that pro

## What if I don’t have a schema/field from the MoHCCN data model in my clinical data?

If the object is required for linking between objects that do exist in your model, or the missing schema is the Sample Registration you will still need to create these objects. The minimum amount of information you would need to provide is a `submitter_$SCHEMA_id`, which can be any text value as long as each id is unique within the program you are ingesting. Objects that are ‘leaves’ in the graph structure, that is, there is only one inward relationship to that object, can be left out of ingest, i.e. Comorbidity, Biomarker, Exposure, Follow up.
If the object is required for linking between objects that do exist in your model, or the missing schema is the Sample Registration you will still need to create these objects. The minimum amount of information you would need to provide is a `submitter_$SCHEMA_id`, which can be any text value as long as each id is unique within the program you are ingesting. Objects that are ‘leaves’ in the graph structure, that is, there is only one inward relationship to that object, can be left out of ingest, i.e. Comorbidity, Biomarker, Exposure, Follow up.

Treatment objects may be uploaded without a linked treatment specific object that describes the specific treatment (i.e. Systemic therapy, Radiation, Surgery), but the model does require these based on the field Treatment.treatment_type, so the Donor would be considered incomplete.

Expand Down Expand Up @@ -48,7 +48,7 @@ specimens, 524 were created', 'Of 169 systemic_therapies, 169 were created', 'Of
]}}
```

or
or

```bash
{
Expand Down Expand Up @@ -159,7 +159,7 @@ Once you get the token, call this command:

```bash
curl --request DELETE \
--url {CANDIG_URL}'/genomics/ga4gh/drs/v1/cohorts/{PROGRAM_ID}' \
--url {CANDIG_URL}'/genomics/ga4gh/drs/v1/programs/{PROGRAM_ID}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN
Expand All @@ -173,7 +173,7 @@ When attempting clinical data ingest into katsu, if you get a response such as b

```bash
{'errors': {
'SYNTH_01':
'SYNTH_01':
[{'not found': 'No program authorization exists'}]
}}
```
Expand Down
8 changes: 4 additions & 4 deletions etc/tests/endpoints.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/programs/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/donors/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/sidebar_list/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/cohort_count/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/patients_per_cohort/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/program_count/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/patients_per_program/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/individual_count/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/gender_count/
candig-dev.hpc4healthlocal:5080/katsu/v3/discovery/overview/primary_site_count/
Expand All @@ -26,8 +26,8 @@ candig-dev.hpc4healthlocal:5080/katsu/v3/explorer/donors/
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/service-info
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/objects
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/objects/multisample_2.vcf.gz
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/cohorts
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/cohorts/SYNTH_01
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/programs
candig-dev.hpc4healthlocal:5080/genomics/ga4gh/drs/v1/programs/SYNTH_01
candig-dev.hpc4healthlocal:5080/genomics/beacon/v2/service-info
candig-dev.hpc4healthlocal:5080/genomics/beacon/v2/g_variants?allele=NC_000021.9:g.5030847T%3EA
candig-dev.hpc4healthlocal:5080/genomics/htsget/v1/reads/service-info
Expand Down
10 changes: 5 additions & 5 deletions etc/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def clean_up_program_htsget(program_id):
"Content-Type": "application/json; charset=utf-8",
}
delete_response = requests.delete(
f"{ENV['CANDIG_URL']}/genomics/ga4gh/drs/v1/cohorts/{program_id}",
f"{ENV['CANDIG_URL']}/genomics/ga4gh/drs/v1/programs/{program_id}",
headers=headers
)
print(delete_response.text)
Expand Down Expand Up @@ -832,13 +832,13 @@ def test_verify_htsget(object_id, file_name, file_type, user, password):
assert response.json()["result"] == True


def test_cohort_status():
def test_program_status():
token = get_site_admin_token()
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json; charset=utf-8",
}
response = requests.get(f"{ENV['CANDIG_URL']}/genomics/ga4gh/drs/v1/cohorts/{ENV['CANDIG_ENV']['CANDIG_SITE_LOCATION']}-SYNTH_02/status", headers=headers)
response = requests.get(f"{ENV['CANDIG_URL']}/genomics/ga4gh/drs/v1/programs/{ENV['CANDIG_ENV']['CANDIG_SITE_LOCATION']}-SYNTH_02/status", headers=headers)
assert "index_complete" in response.json()
assert len(response.json()['index_complete']) > 0

Expand Down Expand Up @@ -999,7 +999,7 @@ def test_query_donors_all():
'None': 4,
'Skin': 4
},
'patients_per_cohort': {
'patients_per_program': {
f'{ENV['CANDIG_ENV']['CANDIG_SITE_LOCATION']}-SYNTH_02': 20
},
'treatment_type_count': {
Expand Down Expand Up @@ -1055,7 +1055,7 @@ def test_query_donor_search():
'None': 4,
'Skin': 4
},
'patients_per_cohort': {
'patients_per_program': {
f'{ENV['CANDIG_ENV']['CANDIG_SITE_LOCATION']}-SYNTH_02': 18
},
'treatment_type_count': {
Expand Down
2 changes: 1 addition & 1 deletion lib/candig-ingest/candigv2-ingest
2 changes: 1 addition & 1 deletion lib/opa/opa
2 changes: 1 addition & 1 deletion lib/query/query