Learn R Programming

DEploid (version 0.5.4)

extractCoverageFromVcf: Extract read counts from VCF

Description

Extract read counts from VCF file of a single sample.

Usage

extractCoverageFromVcf(vcfFileName, ADFieldIndex = 2)

Value

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

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).

Examples

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

Run the code above in your browser using DataLab