StrelkaIDVCFFilesToCatalogAndPlotToPdf {ICAMS} | R Documentation |
Create ID (small insertion and deletion) catalog from Strelka ID VCF files and plot them to PDF
Description
Create ID (small insertion and deletion) catalog from the Strelka ID VCFs
specified by files
and plot them to PDF
Usage
StrelkaIDVCFFilesToCatalogAndPlotToPdf(
files,
ref.genome,
region = "unknown",
names.of.VCFs = NULL,
output.file = "",
flag.mismatches = 0,
return.annotated.vcfs = FALSE,
suppress.discarded.variants.warnings = TRUE
)
Arguments
files |
Character vector of file paths to the Strelka ID VCF files. |
ref.genome |
A |
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 |
output.file |
Optional. The base name of the PDF file to be produced;
the file is ending in |
flag.mismatches |
Deprecated. If there are ID variants whose |
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. |
Details
This function calls StrelkaIDVCFFilesToCatalog
and
PlotCatalogToPdf
Value
A list of elements:
-
catalog
: The ID (small insertion and deletion) catalog with attributes added. Seeas.catalog
for more details. -
discarded.variants
: Non-NULL only if there are variants that were excluded from the analysis. See the added extra columndiscarded.reason
for more details. -
annotated.vcfs
: Non-NULL only ifreturn.annotated.vcfs
= TRUE. A list of data frames which contain the original VCF's ID mutation rows with three additional columnsseq.context.width
,seq.context
andID.class
added. The category assignment of each ID mutation in VCF can be obtained fromID.class
column.
ID classification
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.
Note
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+.
Examples
file <- c(system.file("extdata/Strelka-ID-vcf",
"Strelka.ID.GRCh37.s1.vcf",
package = "ICAMS"))
if (requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5", quietly = TRUE)) {
catID <-
StrelkaIDVCFFilesToCatalogAndPlotToPdf(file, ref.genome = "hg19",
region = "genome",
output.file =
file.path(tempdir(), "StrelkaID"))}