Skip to content

Commit 84ec9a0

Browse files
committed
fix column names
1 parent 2b15568 commit 84ec9a0

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

notebooks/getting_started/part2_searching_basics.ipynb

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
"\n",
3030
"In this notebook you will be introduced into how IDC organizes the metadata accompanying images available in IDC, and how that metadata can be used to define subsets of data.\n",
3131
"\n",
32-
"This documentation page can be used as a complement if you would like to learn more about how IDC metadata is organized: https://learn.canceridc.dev/data/organization-of-data/files-and-metadata.\n",
33-
"\n",
3432
"---\n",
3533
"Initial version: Nov 2022\n",
3634
"\n",
37-
"Updated: Oct 2023\n"
35+
"Updated:\n"
3836
]
3937
},
4038
{
@@ -233,7 +231,7 @@
233231
"\n",
234232
"![portal_filters](https://www.dropbox.com/s/qt3dhzara1ap7s3/portal_filters.png?raw=1)\n",
235233
"\n",
236-
"* \"Primary site location\" maps to the `tcia_tumorLocation` column\n",
234+
"* \"Primary site location\" maps to the `collection_tumorLocation` column\n",
237235
"* \"Body Part Examined\" -> `BodyPartExamined`\n",
238236
"* \"Modality\" -> `Modality`\n",
239237
"\n"
@@ -245,7 +243,7 @@
245243
"id": "3kkHUgqaP2tl"
246244
},
247245
"source": [
248-
"### Exercise 1: Write the query to list all values for `tcia_tumorLocation`\n",
246+
"### Exercise 1: Write the query to list all values for `collection_tumorLocation`\n",
249247
"\n",
250248
"In the cell below, we pre-filled the code by copying the previous cell. All you need to do is write the query!\n",
251249
"\n",
@@ -308,8 +306,8 @@
308306
"SELECT\n",
309307
" collection_id,\n",
310308
" STRING_AGG(DISTINCT(Modality)) as modalities,\n",
311-
" STRING_AGG(DISTINCT(tcia_tumorLocation)) as tumor_locations,\n",
312-
" STRING_AGG(DISTINCT(tcia_species)) as species\n",
309+
" STRING_AGG(DISTINCT(collection_tumorLocation)) as tumor_locations,\n",
310+
" STRING_AGG(DISTINCT(collection_species)) as species\n",
313311
"FROM\n",
314312
" bigquery-public-data.idc_current.dicom_all\n",
315313
"GROUP BY\n",
@@ -371,7 +369,7 @@
371369
"WHERE\n",
372370
" # write the selection criteria under this line!\n",
373371
" # Use AND operator to combine the filter values for the\n",
374-
" # Modality and tcia_tumorLocation to select collections that\n",
372+
" # Modality and collection_tumorLocation to select collections that\n",
375373
" # include MR images for Lung cancer locations\n",
376374
" # Note that SQL uses single = for comparison, and strings should\n",
377375
" # be enclosed in \"\"\n",
@@ -467,8 +465,8 @@
467465
"SELECT\n",
468466
" collection_id,\n",
469467
" STRING_AGG(DISTINCT(Modality)) as modalities,\n",
470-
" STRING_AGG(DISTINCT(tcia_tumorLocation)) as tumor_locations,\n",
471-
" STRING_AGG(DISTINCT(tcia_species)) as species\n",
468+
" STRING_AGG(DISTINCT(collection_tumorLocation)) as tumor_locations,\n",
469+
" STRING_AGG(DISTINCT(collection_species)) as species\n",
472470
" # count number of distinct patients\n",
473471
" # count number of distinct studies\n",
474472
" # count number of distinct series\n",
@@ -521,7 +519,7 @@
521519
"FROM\n",
522520
" bigquery-public-data.idc_current.dicom_all\n",
523521
"WHERE\n",
524-
" Modality = \"MR\" AND tcia_tumorLocation = \"Liver\"\n",
522+
" Modality = \"MR\" AND collection_tumorLocation = \"Liver\"\n",
525523
"\n",
526524
"# note the use of this new operator that makes the query\n",
527525
"# return just the first one of the matching rows\n",
@@ -577,7 +575,7 @@
577575
" SELECT\n",
578576
" StudyInstanceUID,\n",
579577
" STRING_AGG(DISTINCT(collection_id)) AS collection_id,\n",
580-
" STRING_AGG(DISTINCT(tcia_tumorLocation)) AS tcia_tumorLocation,\n",
578+
" STRING_AGG(DISTINCT(collection_tumorLocation)) AS collection_tumorLocation,\n",
581579
" ARRAY_AGG(DISTINCT(Modality)) AS modalities\n",
582580
" FROM\n",
583581
" bigquery-public-data.idc_current.dicom_all\n",
@@ -592,7 +590,7 @@
592590
"WHERE\n",
593591
" \"CT\" IN UNNEST(modalities)\n",
594592
" AND \"SEG\" IN UNNEST(modalities)\n",
595-
" AND tcia_tumorLocation = \"Lung\"\n",
593+
" AND collection_tumorLocation = \"Lung\"\n",
596594
"LIMIT\n",
597595
" 1\n",
598596
"\"\"\"\n",

0 commit comments

Comments
 (0)