-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextract_design.Rd
More file actions
58 lines (51 loc) · 1.5 KB
/
extract_design.Rd
File metadata and controls
58 lines (51 loc) · 1.5 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
57
58
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_design.R
\name{extract_design}
\alias{extract_design}
\title{Obtain design matrix (X) for variants from a mutation annotation file (maf)}
\usage{
extract_design(
maf,
variant_col = "variant",
sample_id_col = "sample",
variant_subset = NULL,
...
)
}
\arguments{
\item{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.}
\item{variant_col}{name of the column in \code{maf} containing variant labels.}
\item{sample_id_col}{name of the column in \code{maf} containing tumor sample IDs.}
\item{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.}
\item{...}{Unused.}
}
\value{
returns an n_tumor x n_variants design matrix for
variant indicators (in dgCMatrix format)
}
\description{
Obtain design matrix (X) for variants from a mutation annotation file (maf)
}
\examples{
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)
}