View source: R/extract_design.R
extract_design | R Documentation |
Obtain design matrix (X) for variants from a mutation annotation file (maf)
extract_design(
maf,
variant_col = "variant",
sample_id_col = "sample",
variant_subset = NULL,
...
)
maf |
mutation annotation file – a data frame-like object with at least two columns containing variant labels and sample IDs. NOTE: uniqueness of rows of maf is assumed. |
variant_col |
name of the column in |
sample_id_col |
name of the column in |
variant_subset |
The subset of variant for which the design matrix is to be constructed. Either NULL, in which case all variants present in the maf file will be considered, or a character vector which will constitute the column names of the output. |
... |
Unused. |
returns an n_tumor x n_variants design matrix for variant indicators (in dgCMatrix format)
data("impact")
top_v <- variant_screen_mi(
maf = impact,
variant_col = "Variant",
cancer_col = "CANCER_SITE",
sample_id_col = "patient_id",
mi_rank_thresh = 200,
return_prob_mi = FALSE
)
var_design <- extract_design(
maf = impact,
variant_col = "Variant",
sample_id_col = "patient_id",
variant_subset = top_v
)
dim(var_design)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.