-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextract_design_mdesign_mcat.Rd
More file actions
56 lines (50 loc) · 1.65 KB
/
extract_design_mdesign_mcat.Rd
File metadata and controls
56 lines (50 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_design_mdesign_mcat.R
\name{extract_design_mdesign_mcat}
\alias{extract_design_mdesign_mcat}
\title{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{
\item{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.}
\item{variant_col}{name of the column in \code{maf} containing variant labels.}
\item{mfeat_col}{name of the column in \code{maf} containing categorical
meta-feature labels.}
\item{sample_id_col}{name of the column in \code{maf} containing tumor sample IDs.}
\item{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 \code{mfeat}_col in
\code{maf} is considered.}
\item{...}{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 \code{mfeat_col} of \code{maf}.
}
\description{
Extract Design-Metadesign (XU) matrix for a categorical
meta-feature from a maf file
}
\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)
}