getAdFromVcf: get the Allele depth from vcf

View source: R/getAdFromVcf.R

getAdFromVcfR Documentation

get the Allele depth from vcf

Description

get the Allele depth from vcf

Usage

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 binmapr object with AD and related information

Author(s)

Zhougeng Xu

Examples

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 )


xuzhougeng/binmapr documentation built on Aug. 25, 2023, 6:44 a.m.