Learn R Programming

ICAMS (version 2.1.2)

ReadAndSplitMutectVCFs: Read and split Mutect VCF files.

Description

Read and split Mutect VCF files.

Usage

ReadAndSplitMutectVCFs(files, names.of.VCFs = NULL, tumor.col.names = NA)

Arguments

files

Character vector of file paths to the Mutect VCF files.

names.of.VCFs

Optional. Character vector of names of the VCF files. The order of names in names.of.VCFs should match the order of VCF file paths in files. If NULL(default), this function will remove all of the path up to and including the last path separator (if any) in files and file paths without extensions (and the leading dot) will be used as the names of the VCF files.

tumor.col.names

Optional. Character vector of column names in VCFs which contain the tumor sample information. The order of names in tumor.col.names should match the order of VCFs specified in files. If tumor.col.names is equal to NA(default), this function will use the 10th column in all the VCFs to calculate VAFs. See GetMutectVAF for more details.

Value

A list with 3 in-memory VCFs and two left-over VCF-like data frames with rows that were not incorporated into the first 3 VCFs, as follows:

  1. SBS VCF with only single base substitutions.

  2. DBS VCF with only doublet base substitutions.

  3. ID VCF with only small insertions and deletions.

  4. other.subs VCF like data.frame with rows for coordinate substitutions involving 3 or more nucleotides (e.g. ACT > TGA or AACT > GGTA) and rows for complex indels.

  5. multiple.alt VCF like data.frame with rows for variants with multiple alternative alleles, for example ACT mutated to both AGT and ACT at the same position.

See Also

MutectVCFFilesToCatalog

Examples

Run this code
# NOT RUN {
file <- c(system.file("extdata/Mutect-vcf",
                      "Mutect.GRCh37.s1.vcf",
                      package = "ICAMS"))
list.of.vcfs <- ReadAndSplitMutectVCFs(file)
# }

Run the code above in your browser using DataLab