Q (haiku): Do ovarian cancer patients with BRCA1 or BRCA2 alterations have significantly different overall survival compared to wild-type patients? ▶ read_guide { "uri": "cbioportal://statistical-tests-guide" } ▶ resolve_and_route { "studyKeywords": [ "ovarian" ] } ◀ result Statistical Test Selection Guide ================================ Purpose ------- This guide ensures the correct statistical test is selected before performing any group comparison, matching cBioPortal's own Group Comparison defaults. HARD RULES — NEVER FABRICATE A STATISTIC ---------------------------------------- ClickHouse cannot run statistical tests. The agent therefore must NEVER produce a derived statistic that is not a literal column value from a SQL result. Specifically: 1. **Never invent a p-value.** Not "p < 0.001", not "p ≈ 0.05", not any p-value. If the user asks "what is the p-value?", the answer is *"I can't compute that — here is the 2x2 contingency table (or group statistics). Run it in cBioPortal's Group Comparison tab, in R with `fisher.test(...)` / `wilcox.test(...)`, or in Python with `scipy.stats.fisher_exact(...)` / `mannwhitneyu(...)`."* 2. **Never claim mutual exclusivity (or co-occurrence) from a contingency table alone.** A 2x2 table is not a test. The shape "altered/not altered × group A/group B" needs Fisher's exact + a defined direction (odds ratio < 1 with significant p). Without that test, the agent presents the table and stops. Descriptive phrasing is also a claim: "largely/mostly mutually exclusive", "rarely co-occur", "tend to co-occur" are forbidden without the test — point to cBioPortal's Mutual Exclusivity tab instead. 3. **Never report a "median" that came from `AVG(...)` or any non-median aggregate.** "Median" and "mean" are different statistics; for skewed clinical distributions (especially survival) they differ substantially. Use ClickHouse's `quantile(0.5)(...)` for actual median, and label arithmetic averages as "mean", never "median". 4. **Never report a hazard ratio, odds ratio, risk ratio, or relative risk** that wasn't computed by an external tool. These require regression / model fitting that ClickHouse does not do. 5. **Never report median overall survival from `AVG(OS_MONTHS)` or even `quantile(0.5)(OS_MONTHS)`.** Median OS requires Kaplan-Meier estimation, which handles censoring (`OS_STATUS = 0:LIVING` means the event hasn't happened yet). Naive medians/means over `OS_MONTHS` ignore censoring and are systematically wrong. The correct handoff: return the raw `(OS_MONTHS, OS_STATUS)` pairs (or descriptive counts: N events, N censored, follow-up range) and tell the user to run KM in R (`survival::survfit`) or Python (`lifelines.KaplanMeierFitter`), or use cBioPortal's Survival comparison. If asked to do any of (1)–(5), respond with the appropriate handoff template from the "Approved Response Templates" section below — do not produce the number. Ambiguous-Term Clarification (before any analysis) -------------------------------------------------- If the user's question uses an ambiguous term, ask before computing anything. Examples: - **"aggressive"** → could mean shorter overall survival, higher metastasis rate, higher grade/stage, higher TMB, or specific molecular features. Ask which definit … (9984 more chars) ◀ result {"success":true,"message":"Found 13 matching studies (top 5 with full metadata, rest with basic info). Pick the best match (prefer TCGA → prefer PanCancer Atlas), use its metadata to call the appropriate navigation tool(s) and generate URLs immediately. Present other studies as alternatives.","data":{"totalCount":13,"studiesWithMetadata":[{"studyId":"msk_met_2021","name":"MSK MetTropism (MSK, Cell 2021)","sampleCount":25775,"studyViewUrl":"https://www.cbioportal.org/study?id=msk_met_2021","metadata":{"clinicalAttributeIds":["AGE_AT_DEATH","AGE_AT_EVIDENCE_OF_METS","AGE_AT_LAST_CONTACT","AGE_AT_SEQUENCING","AGE_AT_SURGERY","CANCER_TYPE","CANCER_TYPE_DETAILED","DMETS_DX_ADRENAL_GLAND","DMETS_DX_BILIARY_TRACT","DMETS_DX_BLADDER_UT","DMETS_DX_BONE","DMETS_DX_BOWEL","DMETS_DX_BREAST","DMETS_DX_CNS_BRAIN","DMETS_DX_DIST_LN","DMETS_DX_FEMALE_GENITAL","DMETS_DX_HEAD_NECK","DMETS_DX_INTRA_ABDOMINAL","DMETS_DX_KIDNEY","DMETS_DX_LIVER","DMETS_DX_LUNG","DMETS_DX_MALE_GENITAL","DMETS_DX_MEDIASTINUM","DMETS_DX_OVARY","DMETS_DX_PLEURA","DMETS_DX_PNS","DMETS_DX_SKIN","DMETS_DX_UNSPECIFIED","FGA","FRACTION_GENOME_ALTERED","GENE_PANEL","IS_DIST_MET_MAPPED","METASTATIC_SITE","MET_COUNT","MET_SITE_COUNT","MSI_SCORE","MSI_TYPE","MUTATION_COUNT","ONCOTREE_CODE","ORGAN_SYSTEM","OS_MONTHS","OS_STATUS","PRIMARY_SITE","RACE","SAMPLE_COUNT","SAMPLE_COVERAGE","SAMPLE_TYPE","SEX","SUBTYPE","SUBTYPE_ABBREVIATION","TMB_NONSYNONYMOUS","TUMOR_PURITY"],"molecularProfileIds":["msk_met_2021_cna","msk_met_2021_mutations","msk_met_2021_structural_variants"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations"]}},{"studyId":"ov_tcga","name":"Ovarian Serous Cystadenocarcinoma (TCGA, Firehose Legacy)","sampleCount":617,"studyViewUrl":"https://www.cbioportal.org/study?id=ov_tcga","metadata":{"clinicalAttributeIds":["AGE","AJCC_PATHOLOGIC_TUMOR_STAGE","AJCC_STAGING_EDITION","CANCER_TYPE","CANCER_TYPE_DETAILED","CLINICAL_STAGE","CLIN_M_STAGE","CLIN_N_STAGE","CLIN_T_STAGE","DAYS_TO_COLLECTION","DAYS_TO_INITIAL_PATHOLOGIC_DIAGNOSIS","DAYS_TO_PATIENT_PROGRESSION_FREE","DAYS_TO_SPECIMEN_COLLECTION","DAYS_TO_TUMOR_PROGRESSION","DFS_MONTHS","DFS_STATUS","DISEASE_CODE","ECOG_SCORE","ETHNICITY","EXTRANODAL_INVOLVEMENT","FORM_COMPLETION_DATE","FRACTION_GENOME_ALTERED","GRADE","HISTOLOGICAL_DIAGNOSIS","HISTORY_NEOADJUVANT_TRTYN","HISTORY_OTHER_MALIGNANCY","ICD_10","ICD_O_3_HISTOLOGY","ICD_O_3_SITE","INFORMED_CONSENT_VERIFIED","INITIAL_PATHOLOGIC_DX_YEAR","IS_FFPE","JEWISH_RELIGION_HERITAGE_INDICATOR","KARNOFSKY_PERFORMANCE_SCORE","LONGEST_DIMENSION","LYMPHOVASCULAR_INVASION_INDICATOR","METHOD_OF_INITIAL_SAMPLE_PROCUREMENT","METHOD_OF_INITIAL_SAMPLE_PROCUREMENT_OTHER","METHOD_OF_SAMPLE_PROCUREMENT","MUTATION_COUNT","NEW_TUMOR_EVENT_AFTER_INITIAL_TREATMENT","OCT_EMBEDDED","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER_METHOD_OF_SAMPLE_PROCUREMENT","OTHER_PATIENT_ID","OTHER_SAMPLE_ID","PATHOLOGY_REPORT_FILE_NAME","PATHOLOGY_REPORT_UUID","PATH_M_STAGE","PATH_N_STAGE","PAT … (8944 more chars) ▶ clickhouse_run_select_query { "query": " -- BRCA1/BRCA2 altered vs wild-type ovarian cancer: OS summary SELECT CASE WHEN hugo_gene_symbol IN ('BRCA1', 'BRCA2') AND variant_type IN ('mutation', 'deletion', 'DELETION') AND mutation_status NOT IN ('GERMLINE', 'Unknown') THEN 'BRCA1/2 Altered' ELSE 'Wild-type' END AS brca_status, COUNT(DISTINCT patient_id) AS n_patients, COUNT(DISTINCT CASE WHEN os_status = '1:DECEASED' THEN patient_id END) AS n_events, COUNT(DISTINCT CASE WHEN os_status = '0:LIVING' THEN patient_id END) AS n_censored, ROUND(COUNT(DISTINCT CASE WHEN os_status = '1:DECEASED' THEN patient_id END) * 100.0 / COUNT(DISTINCT patient_id), 1) AS event_pct, ROUND(MIN(os_months), 1) AS follow_up_min, ROUND(MAX(os_months), 1) AS follow_up_max, ROUND(AVG(os_months), 1) AS follow_up_mean FROM genomic_event_derived WHERE cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc') AND os_months IS NOT NULL AND os_status IS NOT NULL GROUP BY brca_status ORDER BY brca_status ", "max_rows": 100 } ◀ result {"error_message":"Query execution failed: HTTPDriver for https://dl96orhu96.us-east-1.aws.clickhouse.cloud:8443 received ClickHouse error code 47\n Code: 47. DB::Exception: Unknown expression or function identifier `patient_id` in scope SELECT multiIf((hugo_gene_symbol IN ('BRCA1', 'BRCA2')) AND (variant_type IN ('mutation', 'deletion', 'DELETION')) AND (mutation_status NOT IN ('GERMLINE', 'Unknown')), 'BRCA1/2 Altered', 'Wild-type') AS brca_status, COUNTDistinct(patient_id) AS n_patients, COUNTDistinct(multiIf(os_status = '1:DECEASED', patient_id, NULL)) AS n_events, COUNTDistinct(multiIf(os_status = '0:LIVING', patient_id, NULL)) AS n_censored, ROUND((COUNTDistinct(multiIf(os_status = '1:DECEASED', patient_id, NULL)) * 100.) / COUNTDistinct(patient_id), 1) AS event_pct, ROUND(MIN(os_months), 1) AS follow_up_min, ROUND(MAX(os_months), 1) AS follow_up_max, ROUND(AVG(os_months), 1) AS follow_up_mean FROM genomic_event_derived WHERE (cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc')) AND (os_months IS NOT NULL) AND (os_status IS NOT NULL) GROUP BY brca_status ORDER BY brca_status ASC. (UNKNOWN_IDENTIFIER) (version 26.4.1.2359 (official build))\n"} ▶ clickhouse_list_table_columns { "table": "genomic_event_derived" } ◀ result {"columns":[{"name":"sample_unique_id","type":"String"},{"name":"hugo_gene_symbol","type":"String","comment":"HUGO gene symbol (e.g., TP53, KRAS, BRAF). Use for gene-specific queries."},{"name":"entrez_gene_id","type":"Int32"},{"name":"gene_panel_stable_id","type":"LowCardinality(String)"},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"genetic_profile_stable_id","type":"LowCardinality(String)"},{"name":"variant_type","type":"LowCardinality(String)","comment":"Type of genomic event: \"mutation\" for SNVs/indels, \"cna\" for copy number alterations, \"structural_variant\" for SVs. Always filter by this."},{"name":"mutation_variant","type":"String","comment":"Protein change notation (e.g., p.V600E, p.R175H). Use for specific variant queries. \"NA\" for non-mutation events."},{"name":"mutation_type","type":"LowCardinality(String)"},{"name":"mutation_status","type":"LowCardinality(String)","comment":"For mutations: Somatic, Germline, UNKNOWN, or UNCALLED. Filter mutation_status != \"UNCALLED\" to exclude uncertain calls. Include all other statuses."},{"name":"driver_filter","type":"LowCardinality(String)"},{"name":"driver_filter_annotation","type":"String"},{"name":"driver_tiers_filter","type":"LowCardinality(String)"},{"name":"driver_tiers_filter_annotation","type":"String"},{"name":"cna_alteration","type":"Nullable(Int8)","comment":"Copy number alteration: only 2 = amplification (AMP) and -2 = deep deletion (HOMDEL) are stored. Shallow deletion (-1), diploid (0) and gain (1) are not in this table; query genetic_alteration_derived WHERE profile_type = 'gistic' (alteration_value is a String, e.g. '-1'). NULL for non-CNA events."},{"name":"cna_cytoband","type":"String"},{"name":"sv_event_info","type":"String"},{"name":"patient_unique_id","type":"String"},{"name":"off_panel","type":"Bool","comment":"Boolean: 1 = mutation outside gene panel coverage (off-panel), 0 = within panel (on-panel). Filter off_panel = 0 for reliable frequency calculations."}]} ▶ clickhouse_list_table_columns { "table": "clinical_data_derived" } ◀ result {"columns":[{"name":"internal_id","type":"Int32"},{"name":"sample_unique_id","type":"String","comment":"Globally unique sample ID: cancer_study_identifier + \"_\" + sample.stable_id. Empty for patient-level attributes. Use this for sample filtering and joins."},{"name":"patient_unique_id","type":"String","comment":"Globally unique patient ID: cancer_study_identifier + \"_\" + patient.stable_id. Present for both sample and patient-level attributes."},{"name":"attribute_name","type":"LowCardinality(String)","comment":"Clinical attribute name (e.g., SAMPLE_TYPE, CANCER_TYPE, AGE, OS_MONTHS). Use with attribute_value for filtering. AGE may be floored or capped for de-identification (e.g. all children recorded as 18, or everyone 89+ recorded as 89 or 90): before age statistics check for a pile-up at the min/max, and if present compute age from DAYS_TO_BIRTH (-days / 365.25)."},{"name":"attribute_value","type":"String","comment":"Value of the clinical attribute (String). For SAMPLE_TYPE: Primary, Metastasis, Local Recurrence, Unknown. Missing values are empty strings, so use toFloat64OrNull(attribute_value) for numeric comparisons — CAST fails on them."},{"name":"cancer_study_identifier","type":"LowCardinality(String)"},{"name":"type","type":"LowCardinality(String)","comment":"Data level: \"sample\" for sample-level attributes (e.g., SAMPLE_TYPE), \"patient\" for patient-level attributes (e.g., AGE, OS_MONTHS)."}]} ▶ clickhouse_run_select_query { "query": " -- BRCA1/BRCA2 altered vs wild-type ovarian cancer: OS summary WITH brca_status_per_patient AS ( SELECT patient_unique_id, cancer_study_identifier, MAX(CASE WHEN hugo_gene_symbol IN ('BRCA1', 'BRCA2') AND variant_type = 'mutation' AND mutation_status NOT IN ('GERMLINE', 'Unknown') AND off_panel = 0 THEN 1 ELSE 0 END) AS has_brca_alt FROM genomic_event_derived WHERE cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc') GROUP BY patient_unique_id, cancer_study_identifier ), os_data AS ( SELECT patient_unique_id, cancer_study_identifier, toFloat64OrNull(attribute_value) AS os_months, attribute_value AS os_status_str FROM clinical_data_derived WHERE cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc') AND attribute_name IN ('OS_MONTHS', 'OS_STATUS') AND type = 'patient' ) SELECT CASE WHEN brca.has_brca_alt = 1 THEN 'BRCA1/2 Altered' ELSE 'Wild-type' END AS brca_status, COUNT(DISTINCT brca.patient_unique_id) AS n_patients, COUNT(DISTINCT CASE WHEN os.os_status_str LIKE '1:%' THEN brca.patient_unique_id END) AS n_events, COUNT(DISTINCT CASE WHEN os.os_status_str LIKE '0:%' THEN brca.patient_unique_id END) AS n_censored, ROUND(COUNT(DISTINCT CASE WHEN os.os_status_str LIKE '1:%' THEN brca.patient_unique_id END) * 100.0 / COUNT(DISTINCT brca.patient_unique_id), 1) AS event_pct, ROUND(MIN(os.os_months), 1) AS follow_up_min_months, ROUND(MAX(os.os_months), 1) AS follow_up_max_months, ROUND(AVG(os.os_months), 1) AS follow_up_mean_months FROM brca_status_per_patient AS brca LEFT JOIN os_data AS os ON brca.patient_unique_id = os.patient_unique_id AND brca.cancer_study_identifier = os.cancer_study_identifier WHERE os.os_months IS NOT NULL GROUP BY brca_status ORDER BY brca_status ", "max_rows": 100 } ◀ result {"rows":[{"brca_status":"BRCA1/2 Altered","n_patients":60,"n_events":0,"n_censored":0,"event_pct":0,"follow_up_min_months":0.3,"follow_up_max_months":145.4,"follow_up_mean_months":45.3},{"brca_status":"Wild-type","n_patients":1071,"n_events":0,"n_censored":0,"event_pct":0,"follow_up_min_months":0,"follow_up_max_months":180.2,"follow_up_mean_months":38.2}]} ▶ clickhouse_run_select_query { "query": " -- BRCA1/BRCA2 altered vs wild-type ovarian cancer: OS summary WITH brca_status_per_patient AS ( SELECT patient_unique_id, cancer_study_identifier, MAX(CASE WHEN hugo_gene_symbol IN ('BRCA1', 'BRCA2') AND variant_type = 'mutation' AND off_panel = 0 THEN 1 ELSE 0 END) AS has_brca_alt FROM genomic_event_derived WHERE cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc') GROUP BY patient_unique_id, cancer_study_identifier ), os_data_pivot AS ( SELECT patient_unique_id, cancer_study_identifier, MAX(CASE WHEN attribute_name = 'OS_MONTHS' THEN toFloat64OrNull(attribute_value) END) AS os_months, MAX(CASE WHEN attribute_name = 'OS_STATUS' THEN attribute_value END) AS os_status FROM clinical_data_derived WHERE cancer_study_identifier IN ('ov_tcga_pan_can_atlas_2018', 'hgsoc_tcga_gdc') AND attribute_name IN ('OS_MONTHS', 'OS_STATUS') AND type = 'patient' GROUP BY patient_unique_id, cancer_study_identifier ) SELECT CASE WHEN brca.has_brca_alt = 1 THEN 'BRCA1/2 Altered' ELSE 'Wild-type' END AS brca_status, COUNT(DISTINCT brca.patient_unique_id) AS n_patients, COUNT(DISTINCT CASE WHEN os.os_status LIKE '1:%' THEN brca.patient_unique_id END) AS n_events_deceased, COUNT(DISTINCT CASE WHEN os.os_status LIKE '0:%' THEN brca.patient_unique_id END) AS n_censored_living, COUNT(DISTINCT CASE WHEN os.os_status IS NULL THEN brca.patient_unique_id END) AS n_missing_os_status, ROUND(COUNT(DISTINCT CASE WHEN os.os_status LIKE '1:%' THEN brca.patient_unique_id END) * 100.0 / COUNT(DISTINCT brca.patient_unique_id), 1) AS event_pct, ROUND(MIN(os.os_months), 1) AS follow_up_min_months, ROUND(MAX(os.os_months), 1) AS follow_up_max_months, ROUND(AVG(os.os_months), 1) AS follow_up_mean_months FROM brca_status_per_patient AS brca LEFT JOIN os_data_pivot AS os ON brca.patient_unique_id = os.patient_unique_id AND brca.cancer_study_identifier = os.cancer_study_identifier GROUP BY brca_status ORDER BY brca_status ", "max_rows": 100 } ◀ result {"rows":[{"brca_status":"BRCA1/2 Altered","n_patients":62,"n_events_deceased":20,"n_censored_living":42,"n_missing_os_status":0,"event_pct":32.3,"follow_up_min_months":0.3,"follow_up_max_months":145.4,"follow_up_mean_months":45.3},{"brca_status":"Wild-type","n_patients":1085,"n_events_deceased":656,"n_censored_living":417,"n_missing_os_status":0,"event_pct":60.5,"follow_up_min_months":0,"follow_up_max_months":180.2,"follow_up_mean_months":38.2}]} ▶ resolve_and_route { "studyIds": [ "ov_tcga_pan_can_atlas_2018", "hgsoc_tcga_gdc" ] } ◀ result {"success":true,"message":"Found 2 matching studies. Pick the best match (prefer TCGA → prefer PanCancer Atlas), use its metadata to call the appropriate navigation tool(s) and generate URLs immediately. Present other studies as alternatives.","data":{"totalCount":2,"studiesWithMetadata":[{"studyId":"ov_tcga_pan_can_atlas_2018","name":"Ovarian Serous Cystadenocarcinoma (TCGA, PanCancer Atlas)","sampleCount":585,"studyViewUrl":"https://www.cbioportal.org/study?id=ov_tcga_pan_can_atlas_2018","metadata":{"clinicalAttributeIds":["AGE","AJCC_PATHOLOGIC_TUMOR_STAGE","AJCC_STAGING_EDITION","ANEUPLOIDY_SCORE","BUFFA_HYPOXIA_SCORE","CANCER_TYPE","CANCER_TYPE_ACRONYM","CANCER_TYPE_DETAILED","DAYS_LAST_FOLLOWUP","DAYS_TO_BIRTH","DAYS_TO_INITIAL_PATHOLOGIC_DIAGNOSIS","DFS_MONTHS","DFS_STATUS","DSS_MONTHS","DSS_STATUS","ETHNICITY","FORM_COMPLETION_DATE","FRACTION_GENOME_ALTERED","GENETIC_ANCESTRY_LABEL","GRADE","HISTORY_NEOADJUVANT_TRTYN","ICD_10","ICD_O_3_HISTOLOGY","ICD_O_3_SITE","INFORMED_CONSENT_VERIFIED","IN_PANCANPATHWAYS_FREEZE","MSI_SCORE_MANTIS","MSI_SENSOR_SCORE","MUTATION_COUNT","NEW_TUMOR_EVENT_AFTER_INITIAL_TREATMENT","ONCOTREE_CODE","OS_MONTHS","OS_STATUS","OTHER_PATIENT_ID","PATH_M_STAGE","PATH_N_STAGE","PATH_T_STAGE","PERSON_NEOPLASM_CANCER_STATUS","PFS_MONTHS","PFS_STATUS","PRIMARY_LYMPH_NODE_PRESENTATION_ASSESSMENT","PRIOR_DX","RACE","RADIATION_THERAPY","RAGNUM_HYPOXIA_SCORE","SAMPLE_COUNT","SAMPLE_TYPE","SEX","SOMATIC_STATUS","SUBTYPE","TBL_SCORE","TISSUE_PROSPECTIVE_COLLECTION_INDICATOR","TISSUE_RETROSPECTIVE_COLLECTION_INDICATOR","TISSUE_SOURCE_SITE","TISSUE_SOURCE_SITE_CODE","TMB_NONSYNONYMOUS","TUMOR_TISSUE_SITE","TUMOR_TYPE","WEIGHT","WINTER_HYPOXIA_SCORE"],"molecularProfileIds":["ov_tcga_pan_can_atlas_2018_gistic","ov_tcga_pan_can_atlas_2018_log2CNA","ov_tcga_pan_can_atlas_2018_mutations","ov_tcga_pan_can_atlas_2018_protein_quantification","ov_tcga_pan_can_atlas_2018_protein_quantification_zscores","ov_tcga_pan_can_atlas_2018_rna_seq_v2_mrna","ov_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","ov_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","ov_tcga_pan_can_atlas_2018_rppa","ov_tcga_pan_can_atlas_2018_rppa_Zscores","ov_tcga_pan_can_atlas_2018_structural_variants"],"genericAssayProfiles":["ov_tcga_pan_can_atlas_2018_armlevel_cna","ov_tcga_pan_can_atlas_2018_genetic_ancestry","ov_tcga_pan_can_atlas_2018_methylation_hm27_hm450_merge","ov_tcga_pan_can_atlas_2018_methylation_hm450","ov_tcga_pan_can_atlas_2018_phosphoprotein_quantification"],"heatmapProfileIds":["ov_tcga_pan_can_atlas_2018_protein_quantification_zscores","ov_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_Zscores","ov_tcga_pan_can_atlas_2018_rna_seq_v2_mrna_median_all_sample_Zscores","ov_tcga_pan_can_atlas_2018_rppa_Zscores"],"availableComparisonTabs":["overlap","clinical","survival","alterations","mutations","mrna","protein","generic_assay_armlevel_cna","generic_assay_genetic_ancestry","generic_assay_methylation","generic_assay_phosphosite_qua … (1320 more chars) ▶ navigate_to_group_comparison { "studyIds": [ "ov_tcga_pan_can_atlas_2018", "hgsoc_tcga_gdc" ], "groups": [ { "name": "BRCA1/2 Altered", "studyViewFilter": { "geneFilters": [ { "molecularProfileIds": [ "ov_tcga_pan_can_atlas_2018_mutations", "hgsoc_tcga_gdc_mutations" ], "geneQueries": [ [ { "hugoGeneSymbol": "BRCA1" }, { "hugoGeneSymbol": "BRCA2" } ] ] } ] } }, { "name": "BRCA1/2 Wild-type", "isUnselected": true } ], "tab": "survival" } ◀ result {"success":true,"message":"Navigating to https://www.cbioportal.org/comparison/survival?comparisonId=6ab5ba27c2115c492d884de9","url":"https://www.cbioportal.org/comparison/survival?comparisonId=6ab5ba27c2115c492d884de9","data":{"description":"Group comparison (2 custom groups)","studies":["ov_tcga_pan_can_atlas_2018","hgsoc_tcga_gdc"],"totalGroups":2,"groups":[{"name":"BRCA1/2 Altered","sampleCount":62},{"name":"BRCA1/2 Wild-type","sampleCount":1127}],"studyViewUrl":"https://www.cbioportal.org/study?id=ov_tcga_pan_can_atlas_2018%2Chgsoc_tcga_gdc","groupUrls":[{"groupName":"BRCA1/2 Altered","url":"https://www.cbioportal.org/study?id=ov_tcga_pan_can_atlas_2018%2Chgsoc_tcga_gdc#filterJson=%7B%22geneFilters%22%3A%5B%7B%22molecularProfileIds%22%3A%5B%22hgsoc_tcga_gdc_mutations%22%2C%22ov_tcga_pan_can_atlas_2018_mutations%22%5D%2C%22geneQueries%22%3A%5B%5B%7B%22hugoGeneSymbol%22%3A%22BRCA1%22%7D%2C%7B%22hugoGeneSymbol%22%3A%22BRCA2%22%7D%5D%5D%7D%5D%7D"}],"pageDescription":"Kaplan-Meier survival analysis comparing BRCA1/2 Altered (62) vs BRCA1/2 Wild-type (1127)."}} ═ answer (success) Perfect. Now let me present the complete answer with data and interactive link: --- ## Summary **Important:** This is a **survival comparison that requires Kaplan-Meier + log-rank testing**, which ClickHouse cannot perform. I've extracted the raw OS data below; you'll need to run the test in cBioPortal, R, or Python to assess statistical significance. ### OS Data: BRCA1/2 Altered vs Wild-type Across the **TCGA PanCancer Atlas** and **TCGA GDC HGSOC** ovarian cohorts (1,147 patients with OS data): | Group | N Patients | Events (Deceased) | Censored (Living) | Event % | Follow-up (months) | |-------|------------|-------------------|-------------------|---------|-------------------| | **BRCA1/2 Altered** | 62 | 20 | 42 | **32.3%** | 0.3–145.4 (mean: 45.3) | | **Wild-type** | 1,085 | 656 | 417 | **60.5%** | 0.0–180.2 (mean: 38.2) | **Key observations:** - BRCA-altered patients have a **lower event rate** (32.3% vs 60.5% deceased), suggesting **potentially better OS**. - BRCA-altered patients have **longer mean follow-up** (45.3 vs 38.2 months). - Sample sizes are imbalanced (62 vs 1,085), which is expected given BRCA mutations occur in ~10–15% of ovarian cancer. --- ## Run the Kaplan-Meier Test **→ [Open cBioPortal Group Comparison: Survival](https://www.cbioportal.org/comparison/survival?comparisonId=6ab5ba27c2115c492d884de9)** This link displays the Kaplan-Meier curves side-by-side with log-rank p-value (computed by cBioPortal). You can also: **In R:** ```r library(survival) km <- survfit(Surv(OS_MONTHS, OS_STATUS == "1:DECEASED") ~ group, data = your_data) survdiff(Surv(OS_MONTHS, OS_STATUS == "1:DECEASED") ~ group, data = your_data) # Log-rank ``` **In Python:** ```python from lifelines import KaplanMeierFitter, logrank_test kmf = KaplanMeierFitter() kmf.fit(durations=your_data['OS_MONTHS'], event_observed=your_data['OS_STATUS'] == '1:DECEASED') kmf.plot_survival_function() results = logrank_test(durations_A, durations_B, event_observed_A, event_observed_B) ``` --- ## Interpretation Note The **descriptive difference** (32% vs 61% deceased) suggests BRCA-mutant patients may have better OS, but this **requires formal KM + log-rank testing to confirm statistical significance**. Confounders like age, stage, treatment, and primary tumor site should also be examined in the Group Comparison → Clinical tab.