getAdFromVcf: get the AD from vcf

Description Usage Arguments Value Author(s) Examples

View source: R/getAdFromVcf.R

Description

get the AD from vcf

Usage

1
getAdFromVcf(file, keep = NULL, chromosome = NULL)

Arguments

file

vcf file path

keep

a vector store high confidence site, format should be "chr_1"

chromosome

vector, which chromosome to use if it is NULL, all chromosome will be include in analysis

Value

a list with AD and CHROM

Author(s)

Zhougeng Xu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(vcfR)
data(vcfR_test)
orig_dir <- getwd()
temp_dir <- tempdir()
setwd( temp_dir )
write.vcf( vcfR_test, file = "test.vcf.gz" )
ad <- getAdFromVcf("test.vcf.gz")
ad
# return is full of NA, because the origin vcf don't have INFO/AD
setwd( orig_dir )

binmapr documentation built on Oct. 30, 2019, 12:14 p.m.