pyhealth.tasks.MutationPathogenicityPrediction#
- class pyhealth.tasks.MutationPathogenicityPrediction(code_mapping=None)[source]#
Bases:
BaseTaskTask for predicting mutation pathogenicity using COSMIC data.
This task predicts whether a somatic mutation is pathogenic or neutral based on FATHMM predictions and mutation features from the COSMIC database.
Note
Only mutations with valid FATHMM predictions (PATHOGENIC or NEUTRAL) are included in the output samples.
Examples
>>> from pyhealth.datasets import COSMICDataset >>> from pyhealth.tasks import MutationPathogenicityPrediction >>> dataset = COSMICDataset(root="/path/to/cosmic") >>> task = MutationPathogenicityPrediction() >>> samples = dataset.set_task(task)
- input_schema: Dict[str, str] = {'gene_name': 'text', 'mutation_description': 'text', 'primary_site': 'text'}#
- pre_filter(df)#
- Return type:
LazyFrame