pyhealth.tasks.CancerMutationBurden#
- class pyhealth.tasks.CancerMutationBurden(code_mapping=None)[source]#
Bases:
BaseTaskTask for predicting high vs low tumor mutation burden.
This task classifies patients based on their tumor mutation burden (TMB), which is associated with immunotherapy response. TMB is approximated by counting the number of mutated genes.
Note
This is a simplified TMB calculation based on gene count. Clinical TMB is typically measured as mutations per megabase of sequenced DNA.
Examples
>>> from pyhealth.datasets import TCGAPRADDataset >>> from pyhealth.tasks import CancerMutationBurden >>> dataset = TCGAPRADDataset(root="/path/to/tcga_prad") >>> task = CancerMutationBurden() >>> samples = dataset.set_task(task)
- pre_filter(df)#
- Return type:
LazyFrame