extract_design_mdesign_mcat: Extract Design-Metadesign (XU) matrix for a categorical...

View source: R/extract_design_mdesign_mcat.R

extract_design_mdesign_mcatR Documentation

Extract Design-Metadesign (XU) matrix for a categorical meta-feature from a maf file

Description

Extract Design-Metadesign (XU) matrix for a categorical meta-feature from a maf file

Usage

extract_design_mdesign_mcat(
  maf,
  variant_col = "variant",
  mfeat_col = "gene",
  sample_id_col = "sample",
  mfeat_subset = NULL,
  ...
)

Arguments

maf

mutation annotation file – a data frame-like object with at least three columns containing variant labels, sample IDs and (categorical) meta-feature labels. NOTE: uniqueness of rows of maf is assumed.

variant_col

name of the column in maf containing variant labels.

mfeat_col

name of the column in maf containing categorical meta-feature labels.

sample_id_col

name of the column in maf containing tumor sample IDs.

mfeat_subset

character vector providing the subset of categories of the meta-feature for which the design matrix is to be created. If NULL (default), all unique categories present in the mfeat_col in maf is considered.

...

Unused.

Value

An n_tumor x n_gene sparse dgCMatrix, with (i, j)th entry providing the total number of variants in tumor i associated with j-th meta-feature category, as determined by mfeat_col of maf.

Examples

data("impact")
gene_mdesign <- extract_design_mdesign_mcat(
  maf = impact,
  variant_col = "Variant",
  mfeat_col = "Hugo_Symbol",
  sample_id_col = "patient_id"
)
dim(gene_mdesign)


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