vcfToSNV: Convert vcf file to snv dataframe

Description Usage Arguments Details Value See Also Examples

View source: R/vcfToSNV.R

Description

Read vcf formatted file to catalog mutations in a data frame of class snv for downstream analysis. A snv dataframe consists of sample, chr, pos, ref, alt and/or freq columns.

Usage

1
vcfToSNV(vcf, allelefreq = FALSE)

Arguments

vcf

The path of a standard vcf file.

allelefreq

A logical input, TRUE if mutation or variant allele frequency is required in output object. Default : FALSE

Details

Read vcf formatted file to catalog mutations in a data frame of class snv for downstream analysis foreach input sample.

Value

A snv dataframe having datframe with column names as sample, chr, pos, ref, alt, freq. Where, filename will be considered as sample name. Note: vcf file name with no extension is the sample name.

See Also

VCF file format.

Examples

1
2
3
4
5
vcf_file=system.file("extdata", "test.vcf", package = "MutSigTools", mustWork = TRUE)

snv=vcfToSNV(vcf=vcf_file, allelefreq=TRUE)

head(snv)

sjdlabgroup/MutSigTools documentation built on Oct. 5, 2019, 3:31 a.m.