Learn R Programming

ICAMS (version 2.2.4)

ReadVCFs: Read VCF files

Description

Read VCF files

Usage

ReadVCFs(
  files,
  variant.caller = NULL,
  names.of.VCFs = NULL,
  tumor.col.names = NA
)

Arguments

files

Character vector of file paths to the VCF files.

variant.caller

Name of the variant caller that produces all the VCFs specified by files, 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 VCFs.

names.of.VCFs

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) and file paths without extensions (and the leading dot) will be used as the names of the VCF files.

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 tumor.col.names should match the order of Mutect VCFs specified in files. If tumor.col.names is equal to NA(default), this function will use the 10th column in all the Mutect VCFs to calculate VAFs. See GetMutectVAF for more details.

Value

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