import React from 'react'; import _ from 'lodash'; import FlexAlignedCheckbox from 'shared/components/FlexAlignedCheckbox'; import { DefaultTooltip } from 'cbioportal-frontend-commons'; import { PatientSurvival } from 'shared/model/PatientSurvival'; import { calculateNumberOfPatients } from 'pages/resultsView/survival/SurvivalUtil'; export type LeftTruncationCheckboxProps = { className: string; onToggleSurvivalPlotLeftTruncation?: () => void; isLeftTruncationChecked?: boolean; patientSurvivalsWithoutLeftTruncation?: PatientSurvival[]; patientToAnalysisGroups: { [uniquePatientKey: string]: string[] }; sortedGroupedSurvivals: { [group: string]: PatientSurvival[] }; }; const LeftTruncationCheckbox: React.FunctionComponent = props => { return (
Adjust for left truncation {props.isLeftTruncationChecked && ( <> {' ('} {calculateNumberOfPatients( props.patientSurvivalsWithoutLeftTruncation!, props.patientToAnalysisGroups ) - calculateNumberOfPatients( _.flatMap( props.sortedGroupedSurvivals ), props.patientToAnalysisGroups )} {' '} patients excluded) )} Patients enter a study when they are profiled, which can be months or even years after the initial diagnosis. To mitigate the effects of left truncation one can enable the risk-set adjustment method as described in To mitigate the effects of left truncation one can enable the risk-set adjustment method as described in{' '} Brown et al (2022) {'. '} This involves adjusting patients at risk at time t to date of sequencing rather than date of diagnosis (xx patients are excluded because they passed away before their biopsies were sequenced). Please note that not all Kaplan-Meier estimates account for the lead time bias introduced by the inclusion criteria for the GENIE BPC Project.
} placement="bottom" > } style={{ marginTop: 1, marginBottom: -3 }} /> ); }; export default LeftTruncationCheckbox;