Learn R Programming

ICAMS (version 2.2.4)

ReadVCF: Read in the data lines of a Variant Call Format (VCF) file

Description

Read in the data lines of a Variant Call Format (VCF) file

Usage

ReadVCF(file, variant.caller = NULL, name.of.VCF = NULL, tumor.col.name = NA)

Arguments

file

The name/path of the VCF file, or a complete URL.

variant.caller

Name of the variant caller that produces the VCF, can be either strelka, mutect or freebayes. This information is needed to calculate the VAFs (variant allele frequencies). If NULL(default), then VAF and read depth information will not be added to the original VCF.

name.of.VCF

Name of the VCF file. If NULL(default), this function will remove all of the path up to and including the last path separator (if any) in file and file path without extensions (and the leading dot) will be used as the name of the VCF file.

tumor.col.name

Optional. Only applicable to Mutect VCF. Name of the column in Mutect VCF which contains the tumor sample information. It must have quotation marks. If tumor.col.name is equal to NA(default), this function will use the 10th column to calculate VAFs. See GetMutectVAF for more details.

Value

A data frame storing data lines of the VCF file with two additional columns added which contain the VAF(variant allele frequency) and read depth information.