VCFsToDBSCatalogs {ICAMS} | R Documentation |
Create DBS catalogs from VCFs
Description
Create a list of 3 catalogs (one each for DBS78, DBS144 and DBS136) out of the contents in list.of.DBS.vcfs. The VCFs must not contain any type of mutation other then DBSs.
Usage
VCFsToDBSCatalogs(
list.of.DBS.vcfs,
ref.genome,
num.of.cores = 1,
trans.ranges = NULL,
region = "unknown",
return.annotated.vcfs = FALSE,
suppress.discarded.variants.warnings = TRUE
)
Arguments
list.of.DBS.vcfs |
List of in-memory data frames of pure DBS mutations – no SBS or 3+BS mutations. The list names will be the sample ids in the output catalog. |
ref.genome |
A |
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 |
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. |
Value
A list containing the following objects:
-
catDBS78
,catDBS136
,catDBS144
: Matrix of 3 DBS catalogs (one each for 78, 136, and 144). -
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. DBS VCF annotated byAnnotateDBSVCF
with three new columnsDBS78.class
,DBS136.class
andDBS144.class
showing the mutation class for each DBS variant.
If trans.ranges
is not provided by user and cannot be inferred by
ICAMS, DBS 144 catalog will not be generated. Each catalog has
attributes added. See as.catalog
for more details.
Comments
To add or change attributes of the catalog, you can use function
attr
.
For example, attr(catalog, "abundance")
<- custom.abundance
.
Note
DBS 144 catalog only contains mutations in transcribed regions.
Examples
file <- c(system.file("extdata/Mutect-vcf",
"Mutect.GRCh37.s1.vcf",
package = "ICAMS"))
list.of.DBS.vcfs <- ReadAndSplitMutectVCFs(file)$DBS
if (requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5", quietly = TRUE)) {
catalogs.DBS <- VCFsToDBSCatalogs(list.of.DBS.vcfs, ref.genome = "hg19",
trans.ranges = trans.ranges.GRCh37,
region = "genome")}