Quick Reference
To see help pages while you work type:
help(function)
example:
help(get_subject_data)
Import available cdapython functions¶
Get a list of searchable CDA tables¶
In [2]:
Copied!
tables()
tables()
Out[2]:
['file', 'mutation', 'observation', 'project', 'subject', 'treatment', 'upstream_identifiers']
Explore CDA tables' columns in detail¶
In [3]:
Copied!
columns()
columns()
Out[3]:
Loading ITables v2.7.3 from the init_notebook_mode cell...
(need help?)
|
See what values are populated in a given column¶
In [4]:
Copied!
column_values( 'anatomic_site' )
column_values( 'anatomic_site' )
Out[4]:
Loading ITables v2.7.3 from the init_notebook_mode cell...
(need help?)
|
Fetch subject row summary information for a column value¶
In [5]:
Copied!
summarize_subjects( match_all = 'anatomic_site = kid*')
summarize_subjects( match_all = 'anatomic_site = kid*')
╔═══════════════════════════════╗ ║ number_of_matching_subjects ║ ╠═══════════════════════════════╣ ║ 1608 ║ ╚═══════════════════════════════╝ ╔════════════════════════════════════════════════╗ ║ number_of_files_related_to_matching_subjects ║ ╠════════════════════════════════════════════════╣ ║ 47411 ║ ╚════════════════════════════════════════════════╝ ╔════════════╦══════════════════════╗ ║ subjects ║ data_source ║ ╠════════════╬══════════════════════╣ ║ 922 ║ IDC + GDC ║ ║ 252 ║ IDC only ║ ║ 121 ║ IDC + GDC + PDC ║ ║ 110 ║ IDC + GDC + GC + PDC ║ ║ 63 ║ GC only ║ ║ 51 ║ GDC only ║ ║ 31 ║ IDC + GDC + GC ║ ║ 29 ║ GDC + PDC ║ ║ 25 ║ PDC only ║ ║ 3 ║ IDC + ICDC ║ ║ 1 ║ ICDC only ║ ╚════════════╩══════════════════════╝ ╔════════════════╦══════════════════════════╗ ║ count_result ║ cause_of_death ║ ╠════════════════╬══════════════════════════╣ ║ 1576 ║ <NA> ║ ║ 22 ║ Cancer-Related Death ║ ║ 5 ║ Non-Cancer Related Death ║ ║ 3 ║ Infection ║ ║ 1 ║ Cardiovascular Disorder ║ ║ 1 ║ Surgical Complication ║ ╚════════════════╩══════════════════════════╝ ╔════════════════╦═══════════╗ ║ count_result ║ species ║ ╠════════════════╬═══════════╣ ║ 1342 ║ human ║ ║ 262 ║ <NA> ║ ║ 4 ║ dog ║ ╚════════════════╩═══════════╝ ╔════════════════╦════════════════════╗ ║ count_result ║ ethnicity ║ ╠════════════════╬════════════════════╣ ║ 831 ║ Non-Hispanic ║ ║ 712 ║ <NA> ║ ║ 65 ║ Hispanic or Latino ║ ╚════════════════╩════════════════════╝ ╔════════════════╦══════════════════════════════════╗ ║ count_result ║ race ║ ╠════════════════╬══════════════════════════════════╣ ║ 1072 ║ White ║ ║ 340 ║ <NA> ║ ║ 153 ║ Black or African American ║ ║ 41 ║ Asian ║ ║ 2 ║ American Indian or Alaska Native ║ ╚════════════════╩══════════════════════════════════╝ ╔════════════════╦════════════════════════════╗ ║ count_result ║ anatomic_site ║ ╠════════════════╬════════════════════════════╣ ║ 47411 ║ kidney ║ ║ 16221 ║ blood ║ ║ 1450 ║ abdomen ║ ║ 220 ║ right kidney ║ ║ 206 ║ lung ║ ║ 146 ║ left kidney ║ ║ 121 ║ chest ║ ║ 96 ║ upper urinary tract ║ ║ 75 ║ liver ║ ║ 50 ║ abdominopelvic cavity ║ ║ 48 ║ left adrenal gland ║ ║ 30 ║ right adrenal gland ║ ║ 24 ║ retroperitoneal lymph node ║ ║ 24 ║ trunk ║ ║ 20 ║ right lung ║ ║ 18 ║ mediastinal lymph node ║ ║ 16 ║ paraaortic lymph node ║ ║ 10 ║ inferior vena cava ║ ║ 9 ║ ovary ║ ║ 8 ║ left lung ║ ║ 6 ║ hepatic lymph node ║ ║ 6 ║ pelvic region of trunk ║ ║ 6 ║ urinary bladder ║ ║ 4 ║ abdominal wall ║ ║ 4 ║ adrenal gland ║ ║ 4 ║ appendage ║ ║ 4 ║ craniocervical region ║ ║ 4 ║ humerus ║ ║ 4 ║ left renal vein ║ ║ 4 ║ paratracheal lymph node ║ ║ 4 ║ thyroid gland ║ ║ 2 ║ abdominal lymph node ║ ║ 2 ║ axillary lymph node ║ ║ 2 ║ spleen ║ ╚════════════════╩════════════════════════════╝ ╔════════════════╦═════════════════╗ ║ ║ year_of_death ║ ╠════════════════╬═════════════════╣ ║ mean ║ 2018 ║ ║ min ║ 2010 ║ ║ lower quartile ║ 2016 ║ ║ median ║ 2018 ║ ║ upper quartile ║ 2020 ║ ║ max ║ 2021 ║ ╚════════════════╩═════════════════╝ ╔════════════════╦═════════════════╗ ║ ║ year_of_birth ║ ╠════════════════╬═════════════════╣ ║ mean ║ 1963 ║ ║ min ║ 1926 ║ ║ lower quartile ║ 1949 ║ ║ median ║ 1958 ║ ║ upper quartile ║ 1969 ║ ║ max ║ 2017 ║ ╚════════════════╩═════════════════╝
Fetch subject rows for a column value¶
In [6]:
Copied!
get_subject_data( match_all = 'subject_id = TCGA.TCGA-04-1369')
get_subject_data( match_all = 'subject_id = TCGA.TCGA-04-1369')
Out[6]:
Loading ITables v2.7.3 from the init_notebook_mode cell...
(need help?)
|
Fetch subject rows for a column value¶
In [7]:
Copied!
get_file_data( match_all = 'subject_id = TCGA.TCGA-04-1369')
get_file_data( match_all = 'subject_id = TCGA.TCGA-04-1369')
Out[7]:
Loading ITables v2.7.3 from the init_notebook_mode cell...
(need help?)
|