extract_cancer_response: Convenience function for extracting cancer (response)...

View source: R/extract_cancer_response.R

extract_cancer_responseR Documentation

Convenience function for extracting cancer (response) categories corresponding to all tumors in a maf file for use in a hidden genome classifier

Description

Convenience function for extracting cancer (response) categories corresponding to all tumors in a maf file for use in a hidden genome classifier

Usage

extract_cancer_response(
  maf,
  cancer_col = "cancer",
  sample_id_col = "sample",
  ...
)

Arguments

maf

mutation annotation file – a data frame-like object with at least two columns – one providing sample ids of tumor and one providing the associated cancer categories

cancer_col

name of the column in maf that corresponds to cancer sites for the tumor samples.

sample_id_col

name of the column in maf containing tumor sample IDs.

...

Unused.

Value

Returns a character vector containing cancer sites as determined from cancer_col in maf, and named according to sample_id_col in maf.

Examples

data("impact")
cancer_resp <- extract_cancer_response(
  maf = impact,
  cancer_col = "CANCER_SITE",
  sample_id_col = "patient_id"
)
head(cancer_resp)


c7rishi/hidgenclassifier documentation built on June 14, 2024, 11:10 a.m.