Q (sonnet-5.5): For patients with the EML4-ALK fusion gene in lung cancer how do the different fusion variants affect their long-term quality of life and risk of developing a secondary cancer? ▶ read_guide { "uri": "cbioportal://clinical-data-guide" } ◀ result # Clinical Data Query Guide ## Overview Clinical data in cBioPortal is stored at both patient and sample levels. Understanding the distinction is crucial for accurate analysis. ## Data Organization ### Patient-Level vs Sample-Level Data - **Patient-level**: Demographics, overall survival, disease stage (stored once per patient) - **Sample-level**: Sample type, sequencing platform, purity (can have multiple per patient) ### Key Tables - `clinical_patient`: Patient-level clinical attributes - `clinical_sample`: Sample-level clinical attributes - `clinical_data_derived`: Pre-joined view combining both levels - `clinical_attribute_meta`: Metadata about available clinical attributes ## Recommended Approach: Use clinical_data_derived The `clinical_data_derived` table is pre-joined and optimized for most queries: ```sql -- Get clinical data for specific attributes SELECT sample_unique_id, patient_unique_id, attribute_name, attribute_value FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name IN ('CANCER_TYPE', 'SAMPLE_TYPE', 'TMB_NONSYNONYMOUS'); ``` ## Clinical Attribute Discovery ### Use clinical_attribute_meta for Discovering Available Attributes **Always start here** to see what clinical attributes are available for a specific study: ```sql -- Discover available clinical attributes for a study SELECT attr_id, description, patient_attribute, cancer_study_id FROM clinical_attribute_meta WHERE cancer_study_id = ( SELECT cancer_study_id FROM cancer_study WHERE cancer_study_identifier = 'your_study_id' ) ORDER BY patient_attribute, attr_id; ``` **Key Fields:** - **attr_id**: matches attr_id in clinical_sample/clinical_patient tables - **description**: human-readable description of the attribute - **patient_attribute**: true = patient attribute, false = sample attribute - **cancer_study_id**: links to cancer_study table (filter by study) ## Attribute Semantics and Matching ### Case-Insensitive Matching for Attribute Values Clinical values are free text across studies and may differ only by case. For example, a controlled-looking value such as germline mutation status may appear as `GERMLINE`, `Germline`, or another case variant. When filtering `clinical_data_derived.attribute_value`, use case-insensitive matching unless you have already profiled the exact values in the target study: ```sql -- Correct: case-insensitive clinical value filter SELECT DISTINCT sample_unique_id, patient_unique_id FROM clinical_data_derived WHERE cancer_study_identifier = 'your_study_id' AND attribute_name = 'MUTATION_STATUS' AND upper(attribute_value) = 'GERMLINE'; ``` Do not write `attribute_value = 'GERMLINE'` without first checking all distinct values for that attribute in the study. ### Query the Requested Attribute, Not a Proxy Do not infer one clinical attribute from a related subtype or marker. Query the actual requested attribute when it … (17073 more chars) ▶ clickhouse_run_select_query { "query": "SELECT attr_id, count() AS n_studies FROM clinical_attribute_meta WHERE upper(attr_id) LIKE '%QUALITY%' OR upper(attr_id) LIKE '%QOL%' OR upper(attr_id) LIKE '%SECOND%' OR upper(attr_id) LIKE '%SUBSEQUENT%' OR upper(attr_id) LIKE '%MULTIPLE_PRIMARY%' OR upper(attr_id) LIKE '%ECOG%' OR upper(attr_id) LIKE '%KARNOFSKY%' OR upper(attr_id) LIKE '%SECONDARY%' OR upper(attr_id) LIKE '%SYNCHRONOUS%' GROUP BY attr_id ORDER BY n_studies DESC LIMIT 50" } ▶ clickhouse_list_tables {} ◀ result {"rows":[{"attr_id":"SPECIMEN_SECOND_LONGEST_DIMENSION","n_studies":34},{"attr_id":"KARNOFSKY_PERFORMANCE_SCORE","n_studies":19},{"attr_id":"ECOG_SCORE","n_studies":19},{"attr_id":"ECOG","n_studies":7},{"attr_id":"CRDB_ECOG","n_studies":4},{"attr_id":"ECOG_KPS","n_studies":3},{"attr_id":"SECONDHAND_SMOKE","n_studies":2},{"attr_id":"IPI_ECOG","n_studies":2},{"attr_id":"GLEASON_PATTERN_SECONDARY","n_studies":2},{"attr_id":"ECOG_STATUS","n_studies":2},{"attr_id":"BASELINE_ECOG","n_studies":2},{"attr_id":"METHYLATION_QUALITY","n_studies":1},{"attr_id":"ECOG_GT_2","n_studies":1},{"attr_id":"SECOND_LINE","n_studies":1},{"attr_id":"NF1_SECOND_HIT_2","n_studies":1},{"attr_id":"TX_START_ECOG","n_studies":1},{"attr_id":"ECOG_AT_STAGE_4_DX","n_studies":1},{"attr_id":"SUBSEQUENT_RX","n_studies":1},{"attr_id":"HALO_TUMOR_QUALITY","n_studies":1},{"attr_id":"PRIMARY_VS_SECONDARY","n_studies":1},{"attr_id":"SUBSEQUENT_CANCERS","n_studies":1},{"attr_id":"BX_GLEASON_SECONDARY","n_studies":1},{"attr_id":"ECOG_PERFORMANCE_SCORE","n_studies":1},{"attr_id":"ECOG_PERFORMANCE_STATUS","n_studies":1},{"attr_id":"SECOND_PRIMARY_CANCER","n_studies":1},{"attr_id":"SECONDARY_PLATFORM","n_studies":1},{"attr_id":"SECONDARY_PATHOLOGICAL_REVIEW","n_studies":1},{"attr_id":"LIFETIME_MULTIPLE_PRIMARY_PCPG","n_studies":1},{"attr_id":"SECONDHAND_SMOKE_EXPOSURE","n_studies":1},{"attr_id":"SYNCHRONOUS_TUMOR_HISTOLOGY_PCT","n_studies":1},{"attr_id":"NF1_SECOND_HIT_1","n_studies":1},{"attr_id":"LIFETIME_MULTIPLE_PRIMARY_PCPG_TIMING","n_studies":1},{"attr_id":"ECOG_BIN","n_studies":1},{"attr_id":"ECOG_PS","n_studies":1}]} ◀ result {"tables":[{"name":"allele_specific_copy_number"},{"name":"alteration_driver_annotation"},{"name":"cancer_study"},{"name":"cancer_study_query_preferences"},{"name":"cancer_study_tags"},{"name":"cbioportal_sequence_state"},{"name":"clinical_attribute_counts"},{"name":"clinical_attribute_meta"},{"name":"clinical_data_derived"},{"name":"clinical_event"},{"name":"clinical_event_data"},{"name":"clinical_event_data_derived"},{"name":"clinical_event_derived"},{"name":"clinical_patient"},{"name":"clinical_sample"},{"name":"cna_event"},{"name":"cna_panel_gene_coverage"},{"name":"cna_wes_coverage"},{"name":"co_altered_genes_in_study"},{"name":"copy_number_seg"},{"name":"copy_number_seg_file"},{"name":"gene"},{"name":"gene_alias"},{"name":"gene_alteration_frequency_by_cancer_type"},{"name":"gene_cna_distribution_in_study"},{"name":"gene_mutation_frequency_by_cancer_type"},{"name":"gene_mutation_frequency_in_studies"},{"name":"gene_mutation_frequency_in_study"},{"name":"gene_mutation_variants_in_study"},{"name":"gene_pair_coexpression"},{"name":"gene_panel"},{"name":"gene_panel_list"},{"name":"gene_panel_to_gene_derived"},{"name":"generic_assay_data_derived"},{"name":"generic_assay_meta_derived"},{"name":"generic_assay_profile_entity_derived"},{"name":"generic_entity_properties"},{"name":"geneset"},{"name":"geneset_gene"},{"name":"geneset_hierarchy_leaf"},{"name":"geneset_hierarchy_node"},{"name":"genetic_alteration"},{"name":"genetic_alteration_derived"},{"name":"genetic_entity"},{"name":"genetic_profile"},{"name":"genetic_profile_link"},{"name":"genetic_profile_samples"},{"name":"genomic_event_derived"},{"name":"gistic"},{"name":"gistic_to_gene"},{"name":"info"},{"name":"mut_sig"},{"name":"mutation"},{"name":"mutation_count_by_keyword"},{"name":"mutation_derived"},{"name":"mutation_event"},{"name":"mutation_panel_gene_coverage"},{"name":"mutation_wes_coverage"},{"name":"patient"},{"name":"reference_genome"},{"name":"reference_genome_gene"},{"name":"resource_definition"},{"name":"resource_patient"},{"name":"resource_sample"},{"name":"resource_study"},{"name":"sample"},{"name":"sample_cna_event"},{"name":"sample_derived"},{"name":"sample_list"},{"name":"sample_list_list"},{"name":"sample_profile"},{"name":"sample_to_gene_panel_derived"},{"name":"structural_variant"},{"name":"sv_panel_gene_coverage"},{"name":"sv_wes_coverage"},{"name":"top_cna_genes_in_study"},{"name":"top_mutated_genes_in_cohort"},{"name":"top_mutated_genes_in_study"},{"name":"top_sv_genes_in_study"},{"name":"treatment_counts_in_study"},{"name":"treatment_regimens_in_study"},{"name":"type_of_cancer"}]} ▶ clickhouse_run_select_query { "query": "SELECT cs.cancer_study_identifier, m.attr_id FROM clinical_attribute_meta m JOIN cancer_study cs ON cs.cancer_study_id = m.cancer_study_id WHERE m.attr_id IN ('SECOND_PRIMARY_CANCER','SUBSEQUENT_CANCERS')" } ▶ clickhouse_list_table_columns { "table": "structural_variant" } ◀ result {"rows":[{"cancer_study_identifier":"cscc_dfarber_2015","attr_id":"SECOND_PRIMARY_CANCER"},{"cancer_study_identifier":"cscc_hgsc_bcm_2014","attr_id":"SUBSEQUENT_CANCERS"}]} ◀ result {"columns":[{"name":"internal_id","type":"Int64"},{"name":"genetic_profile_id","type":"Int64"},{"name":"sample_id","type":"Int64"},{"name":"site1_entrez_gene_id","type":"Nullable(Int64)"},{"name":"site1_ensembl_transcript_id","type":"Nullable(String)"},{"name":"site1_chromosome","type":"Nullable(String)"},{"name":"site1_region","type":"Nullable(String)"},{"name":"site1_region_number","type":"Nullable(Int64)"},{"name":"site1_contig","type":"Nullable(String)"},{"name":"site1_position","type":"Nullable(Int64)"},{"name":"site1_description","type":"Nullable(String)"},{"name":"site2_entrez_gene_id","type":"Nullable(Int64)"},{"name":"site2_ensembl_transcript_id","type":"Nullable(String)"},{"name":"site2_chromosome","type":"Nullable(String)"},{"name":"site2_region","type":"Nullable(String)"},{"name":"site2_region_number","type":"Nullable(Int64)"},{"name":"site2_contig","type":"Nullable(String)"},{"name":"site2_position","type":"Nullable(Int64)"},{"name":"site2_description","type":"Nullable(String)"},{"name":"site2_effect_on_frame","type":"Nullable(String)"},{"name":"ncbi_build","type":"Nullable(String)"},{"name":"dna_support","type":"Nullable(String)"},{"name":"rna_support","type":"Nullable(String)"},{"name":"normal_read_count","type":"Nullable(Int64)"},{"name":"tumor_read_count","type":"Nullable(Int64)"},{"name":"normal_variant_count","type":"Nullable(Int64)"},{"name":"tumor_variant_count","type":"Nullable(Int64)"},{"name":"normal_paired_end_read_count","type":"Nullable(Int64)"},{"name":"tumor_paired_end_read_count","type":"Nullable(Int64)"},{"name":"normal_split_read_count","type":"Nullable(Int64)"},{"name":"tumor_split_read_count","type":"Nullable(Int64)"},{"name":"annotation","type":"Nullable(String)"},{"name":"breakpoint_type","type":"Nullable(String)"},{"name":"connection_type","type":"Nullable(String)"},{"name":"event_info","type":"Nullable(String)"},{"name":"class","type":"Nullable(String)"},{"name":"length","type":"Nullable(Int64)"},{"name":"comments","type":"Nullable(String)"},{"name":"sv_status","type":"String"},{"name":"annotation_json","type":"Nullable(String)"}]} ═ answer (success) cBioPortal can't answer this question. It has no data on how EML4-ALK fusion variants relate to long-term quality of life or to secondary cancers. - **Quality of life:** I found no quality-of-life or patient-reported outcome fields in any study. The closest measures are performance status scores such as ECOG and Karnofsky. They are recorded in only a subset of studies and describe function at a single point in time, not long-term quality of life. - **Secondary cancers:** Only two studies have a second-cancer field (`SECOND_PRIMARY_CANCER` and `SUBSEQUENT_CANCERS`). Both are cutaneous squamous cell carcinoma studies (`cscc_dfarber_2015` and `cscc_hgsc_bcm_2014`), not lung cancer. Lung cancer cohorts don't record second primaries in a form that can be linked to fusion variant. - **Variant-level data:** Fusion breakpoints are stored per sample, which would let you group tumors by variant (for example V1 or V3, if the breakpoint annotation supports it). But there is no outcome data beyond overall survival to compare them on. I didn't run that grouping. What you can do in cBioPortal is compare overall survival, treatment history and co-occurring alterations between fusion-positive and fusion-negative lung cancers. Survival and treatment data are recorded in only some studies. If you'd like, I can pull the EML4-ALK-positive lung cohorts with survival data and open a Group Comparison. That would show how many patients have survival follow-up, but not quality of life or secondary cancer risk. Outside cBioPortal, this question is usually addressed with clinical follow-up cohorts or the published literature on variant-specific outcomes. I haven't reviewed either here, and none of this is clinical guidance.