vcfsummary: summarize the various variant types at both variant level and...

View source: R/vcf-summary.R

vcfsummaryR Documentation

summarize the various variant types at both variant level and sample level.

Description

summarize the various variant types at both variant level and sample level.

Usage

vcfsummary(
  vcffile,
  region = "",
  samples = "-",
  pass = FALSE,
  qual = 0,
  svtype = FALSE
)

Arguments

vcffile

path to the VCF/BCF file

region

region to subset like bcftools

samples

samples to subset like bcftools

pass

restrict to variants with FILTER==PASS

qual

restrict to variants with QUAL > qual.

svtype

summarize the variants with SVTYPE

Details

bcftools view -s "id01,id02" input.bcf.gz chr1:100000-20000

Value

vcfsummary a list containing the following components:

summary

: named integer vector;
summarize the counts of each variant type

samples

: character vector;
the samples ids in the VCF file after subsetting

vartype

: integer vector;
the counts of the variant type at sample level in the same order as samples

Author(s)

Zilong Li zilong.dk@gmail.com

Examples

library('vcfppR')
svfile <- system.file("extdata", "sv.vcf.gz", package="vcfppR")
res <- vcfsummary(svfile, region = "chr21:1-10000000", svtype = TRUE)
str(res)

vcfppR documentation built on Sept. 30, 2024, 1:06 a.m.