Quick Reference
To see help pages while you work type:
help(function)
example:
help(fetch_rows)
Import available cdapython
functions¶
In [2]:
Copied!
from cdapython import tables, columns, column_values, fetch_rows, summary_counts
from cdapython import tables, columns, column_values, fetch_rows, summary_counts
Get a list of searchable CDA tables¶
In [3]:
Copied!
tables()
tables()
Out[3]:
['diagnosis', 'file', 'researchsubject', 'somatic_mutation', 'specimen', 'subject', 'treatment']
Explore CDA tables' columns in detail¶
In [4]:
Copied!
columns()
columns()
Out[4]:
table | column | data_type | nullable | description |
---|---|---|---|---|
Loading... (need help?) |
See what values are populated in a given column¶
In [5]:
Copied!
column_values( 'primary_diagnosis_site' )
column_values( 'primary_diagnosis_site' )
Out[5]:
primary_diagnosis_site | count |
---|---|
Loading... (need help?) |
Fetch subject row summary information for a column value¶
In [6]:
Copied!
summary_counts( table= 'subject', match_all = 'primary_diagnosis_site = kid*')
summary_counts( table= 'subject', match_all = 'primary_diagnosis_site = kid*')
Out[6]:
[ total_subject_matches 0 2731, total_related_files 0 527032, system count 0 GDC 2427 1 IDC 1380 2 PDC 228 3 CDS 216, sex count 0 male 1482 1 female 949 2 M 122 3 F 89 4 Male 49 5 Female 35 6 5, race count 0 White 1597 1 812 2 Black or African American 277 3 Asian 42 4 American Indian or Alaska Native 2 5 Native Hawaiian or Other Pacific Islander 1, ethnicity count 0 1344 1 Not Hispanic or Latino 1343 2 White 44, cause_of_death count 0 2564 1 Cancer Related 154 2 Infection 7 3 Not Cancer Related 4 4 Cardiovascular Disorder 1 5 Surgical Complication 1]
Fetch rows from any table for a column value¶
1 |
|
1 |
|
1 |
|
1 |
|
1 |
|
1 |
|
Fetch subject rows for a column value¶
In [7]:
Copied!
fetch_rows( table= 'somatic_mutation', match_all = 'subject_id = TCGA.TCGA-04-1369')
fetch_rows( table= 'somatic_mutation', match_all = 'subject_id = TCGA.TCGA-04-1369')
Out[7]:
case_id | cda_subject_id | entrez_gene_id | file_gdc_id | hgnc_id | transcript_id | aliquot_barcode_normal | aliquot_barcode_tumor | all_effects | allele | amino_acids | appris | bam_file | biotype | callers | canonical | case_barcode | ccds | cdna_position | cds_position | center | chromosome | clin_sig | codons | consequence | context | cosmic | dbsnp_rs | dbsnp_val_status | distance | domains | end_position | ensp | esp_aa_af | esp_ea_af | existing_variation | exon | exon_number | feature | feature_type | flags | gdc_filter | gene | gene_pheno | gnomad_af | gnomad_afr_af | gnomad_amr_af | gnomad_asj_af | gnomad_eas_af | gnomad_fin_af | gnomad_nfe_af | gnomad_non_cancer_af | gnomad_non_cancer_afr_af | gnomad_non_cancer_ami_af | gnomad_non_cancer_amr_af | gnomad_non_cancer_asj_af | gnomad_non_cancer_eas_af | gnomad_non_cancer_fin_af | gnomad_non_cancer_max_af_adj | gnomad_non_cancer_max_af_pops_adj | gnomad_non_cancer_mid_af | gnomad_non_cancer_nfe_af | gnomad_non_cancer_oth_af | gnomad_non_cancer_sas_af | gnomad_oth_af | gnomad_sas_af | hgvs_offset | hgvsc | hgvsp | hgvsp_short | high_inf_pos | hotspot | hugo_symbol | impact | intron | mane | match_norm_seq_allele1 | match_norm_seq_allele2 | match_norm_validation_allele1 | match_norm_validation_allele2 | matched_norm_aliquot_barcode | matched_norm_aliquot_uuid | max_af | max_af_pops | mirna | motif_name | motif_pos | motif_score_change | muse | mutation_status | mutect2 | n_alt_count | n_depth | n_ref_count | ncbi_build | normal_submitter_uuid | one_consequence | pheno | pick | pindel | polyphen | primary_site | project_short_name | protein_position | pubmed | reference_allele | refseq | rna_alt_count | rna_depth | rna_ref_count | rna_support | sample_barcode_normal | sample_barcode_tumor | score | sequence_source | sequencer | sequencing_phase | sift | somatic | start_position | strand | swissprot | symbol | symbol_source | t_alt_count | t_depth | t_ref_count | thousg_af | thousg_afr_af | thousg_amr_af | thousg_eas_af | thousg_eur_af | thousg_sas_af | transcript_strand | transcription_factors | trembl | tsl | tumor_aliquot_barcode | tumor_aliquot_uuid | tumor_seq_allele1 | tumor_seq_allele2 | tumor_submitter_uuid | tumor_validation_allele1 | tumor_validation_allele2 | uniparc | uniprot_isoform | validation_method | validation_status | variant_class | variant_classification | variant_type | varscan2 | verification_status |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Loading... (need help?) |