VCFsToCatalogsAndPlotToPdf | R Documentation |
Create 3 SBS catalogs (96, 192, 1536), 3 DBS catalogs (78, 136, 144) and
Indel catalog from the VCFs specified by files
and plot them to
PDF
VCFsToCatalogsAndPlotToPdf(
files,
output.dir,
ref.genome,
variant.caller = "unknown",
num.of.cores = 1,
trans.ranges = NULL,
region = "unknown",
names.of.VCFs = NULL,
tumor.col.names = NA,
filter.status = NULL,
get.vaf.function = NULL,
...,
max.vaf.diff = 0.02,
base.filename = "",
return.annotated.vcfs = FALSE,
suppress.discarded.variants.warnings = TRUE
)
files |
Character vector of file paths to the VCF files. |
output.dir |
The directory where the PDF files will be saved. |
ref.genome |
A |
variant.caller |
Name of the variant caller that produces the VCF, can
be either |
num.of.cores |
The number of cores to use. Not available on Windows
unless |
trans.ranges |
Optional. If
then the function will infer |
region |
A character string designating a genomic region;
see |
names.of.VCFs |
Optional. Character vector of names of the VCF files.
The order of names in |
tumor.col.names |
Optional. Only applicable to Mutect VCFs.
Character vector of column names in Mutect VCFs which contain the
tumor sample information. The order of names in |
filter.status |
The status indicating a variant has passed all filters.
An example would be |
get.vaf.function |
Optional. Only applicable when |
... |
Optional arguments to |
max.vaf.diff |
Not applicable if |
base.filename |
Optional. The base name of the PDF files to be produced;
multiple files will be generated, each ending in |
return.annotated.vcfs |
Logical. Whether to return the annotated VCFs with additional columns showing mutation class for each variant. Default is FALSE. |
suppress.discarded.variants.warnings |
Logical. Whether to suppress warning messages showing information about the discarded variants. Default is TRUE. |
This function calls VCFsToCatalogs
and
PlotCatalogToPdf
A list containing the following objects:
catSBS96
, catSBS192
, catSBS1536
: Matrix of
3 SBS catalogs (one each for 96, 192, and 1536).
catDBS78
, catDBS136
, catDBS144
: Matrix of
3 DBS catalogs (one each for 78, 136, and 144).
catID
: Matrix of ID (small insertion and deletion) catalog.
discarded.variants
: Non-NULL only if there are variants
that were excluded from the analysis. See the added extra column
discarded.reason
for more details.
annotated.vcfs
:
Non-NULL only if return.annotated.vcfs
= TRUE.
A list of elements:
SBS
: SBS VCF annotated by AnnotateSBSVCF
with
three new columns SBS96.class
, SBS192.class
and
SBS1536.class
showing the mutation class for each SBS variant.
DBS
: DBS VCF annotated by AnnotateDBSVCF
with
three new columns DBS78.class
, DBS136.class
and
DBS144.class
showing the mutation class for each DBS variant.
ID
: ID VCF annotated by AnnotateIDVCF
with one
new column ID.class
showing the mutation class for each
ID variant.
If trans.ranges
is not provided by user and cannot be inferred by
ICAMS, SBS 192 and DBS 144 catalog will not be generated. Each catalog has
attributes added. See as.catalog
for more details.
See https://github.com/steverozen/ICAMS/blob/master/data-raw/PCAWG7_indel_classification_2021_09_03.xlsx for additional information on ID (small insertion and deletion) mutation classification.
See the documentation for Canonicalize1Del
which first handles
deletions in homopolymers, then handles deletions in simple repeats with
longer repeat units, (e.g. CACACACA
, see
FindMaxRepeatDel
), and if the deletion is not in a simple
repeat, looks for microhomology (see FindDelMH
).
See the code for unexported function CanonicalizeID
and the functions it calls for handling of insertions.
SBS 192 and DBS 144 catalogs include only mutations in transcribed regions. In ID (small insertion and deletion) catalogs, deletion repeat sizes range from 0 to 5+, but for plotting and end-user documentation deletion repeat sizes range from 1 to 6+.
To add or change attributes of the catalog, you can use function
attr
.
For example, attr(catalog, "abundance")
<- custom.abundance
.
file <- c(system.file("extdata/Mutect-vcf",
"Mutect.GRCh37.s1.vcf",
package = "ICAMS"))
if (requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5", quietly = TRUE)) {
catalogs <-
VCFsToCatalogsAndPlotToPdf(file, ref.genome = "hg19",
output.dir = tempdir(),
variant.caller = "mutect",
region = "genome",
base.filename = "Mutect")}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.