extractCoverageFromVcf {DEploid}R Documentation

Extract read counts from VCF

Description

Extract read counts from VCF file of a single sample.

Usage

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

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


[Package DEploid version 0.5.4 Index]