CBIIT / bento-icdc-interoperation

2 stars 0 forks source link

add query to get interop data for specific study (ICDC-3030) #10

Closed erm156 closed 1 year ago

erm156 commented 1 year ago

JIRA ticket: https://tracker.nci.nih.gov/browse/ICDC-3030

example query:

{
    studyLinks(study_code: "GLIOMA01") {
        repository,
        url,
        metadata {
            ... on IDCMetadata {
                    collection_id,
                    cancer_type,
                    date_updated,
                    description,
                    doi,
                    image_types,
                    location,
                    species,
                    subject_count,
                    supporting_data
                }
                ... on TCIAMetadata {
                    Collection,
                    total_patient_IDs,
                    unique_modalities,
                    unique_bodyparts_examined,
                    total_image_counts
                }
        }
    }
}

response:

{
    "data": {
        "studyLinks": [
            {
                "repository": "IDC",
                "url": "https://portal.imaging.datacommons.cancer.gov/explore/filters/?collection_id=icdc_glioma",
                "metadata": {
                    "collection_id": "icdc_glioma",
                    "cancer_type": "Glioma",
                    "date_updated": "2022-10-10",
                    "description": "ICDC-Glioma [https://doi.org/10.7937/TCIA.SVQT-Q016] contains treatment-naïve naturally-occurring canine glioma participants from the Integrated Canine Data Commons [https://caninecommons.cancer.gov/#/study/GLIOMA01]. Brain radiology (57/81 participant animals) and H&E-stained biopsy or necropsy pathology (76/81 participants) are classified by veterinary and physician neuropathologists.  Please see the wiki ICDC-Glioma [https://doi.org/10.7937/TCIA.SVQT-Q016] to learn more about the images and to obtain any supporting metadata for this collection.",
                    "doi": "10.7937/tcia.svqt-q016",
                    "image_types": "MR",
                    "location": "Head",
                    "species": "Canine",
                    "subject_count": 57,
                    "supporting_data": "Genomics"
                }
            },
            {
                "repository": "TCIA",
                "url": "https://nbia.cancerimagingarchive.net/nbia-search/?MinNumberOfStudiesCriteria=1&CollectionCriteria=ICDC-Glioma",
                "metadata": {
                    "Collection": "ICDC-Glioma",
                    "total_patient_IDs": 57,
                    "unique_modalities": [
                        "MR"
                    ],
                    "unique_bodyparts_examined": [
                        "HEAD"
                    ],
                    "total_image_counts": 17797
                }
            }
        ]
    }
}
erm156 commented 1 year ago

This will throw an error when a study code is not found (moved this conditional to before the API calls to IDC/TCIA).