-
-
Notifications
You must be signed in to change notification settings - Fork 138
Add imaging studies for all TCGA Pancan separated by modality #2260
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
base: master
Are you sure you want to change the base?
Conversation
dippindots
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
| ```bash | ||
| for f in $(cut -f2 ~/Downloads/idc_ohif.tsv | gsort | uniq | grep tcga_ | grep -v Filters | grep -v coad | grep -v read); do (head -1 coadread_tcga_pan_can_atlas_2018/data_resource_patient.txt; cut -f1,2,4 ~/Downloads/idc_ohif.tsv | tail -n +9 | grep $f | cut -f1,3 | awk -vFS='\t' -vOFS='\t' '{$1=substr($1,0,12); $3="https://viewer.imaging.datacommons.cancer.gov/viewer/"$2; $2="IDC_OHIF_V2"; print $0}' | gsort -k1,1 | uniq | rev | uniq -f2 | rev; ) > ${f/tcga_/}_tcga_pan_can_atlas_2018/*data_resource*patient*; done | ||
| ``` | ||
| **Note**: While a single study may contain multiple imaging modalities, data was extracted at the study level and then split by modality for cBioPortal integration. This modality-level organization allows users to selectively access specific imaging types (e.g., CT scans vs. H&E slides) for each patient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL patterns you provide at the bottom of this document are at the study level, so this paragraph is confusing.
| 1. Downloading TCGA imaging metadata from IDC using the idc-index package | ||
| 2. Linking patients to their imaging studies via OHIF and SLIM viewer URLs | ||
|
|
||
| **Script**: [generate_imaging_resources.py](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/generate_imaging_resources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script referenced uses custom code to generate viewer URLs. I recommend you use this function in IDCClient: https://idc-index.readthedocs.io/en/latest/api/idc_index.html#idc_index.index.IDCClient.get_viewer_URL. Note that your URLs point to the legacy OHIF Viewer v2, which will be deprecated. You should instead use OHIF Viewer v3. The function will generate OHIF v3 viewer links for radiology studies.
| ### Generate Resource Files | ||
|
|
||
| Patient-level resource files are generated for each TCGA Pan Cancer study by: | ||
| 1. Downloading TCGA imaging metadata from IDC using the idc-index package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should keep track of the version of IDC data you use for generating those links. You can get it with https://idc-index.readthedocs.io/en/latest/api/idc_index.html#idc_index.index.IDCClient.get_idc_version. It would also be best if you updated your links after each IDC release. Although data removal is rare, it can happen, and would lead to broken viewer links.
What?
Enhancement to the previous PR #2015
Details on how the data is generated:
https://github.com/cBioPortal/datahub/blob/2615fc6c90fb0e30994d43a09c13d1f2abb81122/docs/tcga_pan_can_atlas/ohif-viewer.md
Available Imaging Modalities:
Testing:
H&E Slide using SLIM viewer:

CT Scan using OHIF viewer:
