readBSA_vcf: Read vcf file

Description Usage Arguments Details Value Examples

View source: R/readBSA_vcf.r

Description

This function allows to read a vcf file, converting it into a data frame. Format fields get separated as follows: AD, DP, GQ, GT and GT_alleles.

Allelic depths (AD) get split into reference and alterate AD values ("AD_ref" and "AD_alt").

Usage

1

Arguments

file

VCF file containing wild-type and mutant pools as samples, which must include the AD column.

Details

Using the vcf R package, a VCF file is read and convertedinto a data frame containing the followingc olumns: chromosome, position, individual (sample ID in the VCF file), reference AD, alternate AD, DP, GQ, GT, and GT_alleles. The meta information of the VCF file is also extracted. The output is a list containing two elements: meta information and the mentioned dataframe '

Value

a list containing a character vector (with meta information) and a data frame (with variant information).

Examples

1
2
## Read vcf file
vcf_list <- readBSA_vcf("dataset1_pools.vcf")

EG-lisy/BSAvis documentation built on Dec. 17, 2021, 5:38 p.m.