-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextract_design_mdesign_sbs96.Rd
More file actions
79 lines (74 loc) · 2.66 KB
/
extract_design_mdesign_sbs96.Rd
File metadata and controls
79 lines (74 loc) · 2.66 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_design_mdesign_sbs96.R
\name{extract_design_mdesign_sbs96}
\alias{extract_design_mdesign_sbs96}
\title{Extract Design-Metadesign (XU) matrix for SBS-96
meta-feature categories from a maf file}
\usage{
extract_design_mdesign_sbs96(
maf,
chromosome_col = "Chromosome",
start_position_col = "Start_Position",
end_position_col = "End_Position",
ref_col = "Reference_Allele",
alt_col = "Tumor_Seq_Allele2",
sample_id_col = "sample",
return_vranges_obj = FALSE,
...
)
}
\arguments{
\item{maf}{mutation annotation file --
a data frame-like object with at least six columns for:
Chromosome, Start_position, End_position,
Reference_Allele, Tumor_Seq_Allele2 and Sample ID.
NOTE: uniqueness of rows of maf is assumed.}
\item{sample_id_col}{name of the column in \code{maf} containing tumor sample IDs.}
\item{...}{Unused.}
\item{return_vranges_object}{logical. Should the intermediate
\code{'VRanges'} object from \code{{SomaticSignatures}} cataloging
SBS-96 contexts for all mutations in \code{maf} be returned as an
attribute named \code{VRanges} of the output? Defaults to FALSE.}
}
\value{
An n_tumor x 96 sparse dgCMatrix, with (i, j)th entry providing the total
number of variants in tumor i associated with j-th SBS-96 category.
}
\description{
Extract Design-Metadesign (XU) matrix for SBS-96
meta-feature categories from a maf file
}
\details{
This function calls uses functions
VariantAnnotation::VRanges(), IRanges::IRanges(),
SomaticSignatures::ucsc() and SomaticSignatures::mutationContext(),
together with the BSgenome.Hsapiens.UCSC.hg19 database to obtain
the 96 single base substitution contexts for each mutation in the
\code{maf} file in the form of a 'VRanges' object from {SomaticSignatures}.
Then using SomaticSignatures::motifMatrix a 96 x n_tumors is calculated,
which is subsequently transposed and converted into a sparseMatrix object
in the form of a n_patient x 96 design matrix
}
\note{
The bioconductor packages {SomaticSignatures} and {VariantAnnotation} are not
automatically installed with hidgenclassifier. Please install them separately.
Using any {SomaticSignatures} function triggers the loading of
{proxy} and {GGally} packages, which overwrites defaults S3 methods
of a few functions from {ggplot2} and {registry}.
}
\examples{
data("impact")
sbs96_mdesign <- extract_design_mdesign_sbs96(
maf = impact,
chromosome_col = "Chromosome",
start_position_col = "Start_Position",
end_position_col = "End_Position",
ref_col = "Reference_Allele",
alt_col = "Tumor_Seq_Allele2",
sample_id_col = "patient_id"
)
dim(sbs96_mdesign)
}
\author{
Ronglai Shen, Saptarshi Chakraborty
}