extractCoverageFromVcf: Extract read counts from VCF

Description Usage Arguments Value Note Examples

View source: R/DEploidR.R

Description

Extract read counts from VCF file of a single sample.

Usage

1
extractCoverageFromVcf(vcfFileName, ADFieldIndex = 2)

Arguments

vcfFileName

Path of the VCF file.

ADFieldIndex

Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).

Value

A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.

Note

The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.

Examples

1
2
vcfFile = system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid")
PG0390 = extractCoverageFromVcf(vcfFile)

DEploid documentation built on April 22, 2020, 1:04 a.m.