VCFfile: Prepare VCF file for filtering.

Description Usage Arguments Details Author(s) Examples

View source: R/code.R

Description

VCFfile should be used to process VCF files prior downstream analysis with any other function.

Usage

1
VCFfile(x, sample, filter, value)

Arguments

x

the VCF file to be processed.

sample

specify the column name containing the variant info for the sample of interest.

filter

logical, should the variants have a certain quality value in the 7th mandatory column of the VCF format?

value

optional, which variants should be retained? (e.g. PASS)

Details

This function should be used to process VCF files to make them compatible for further filtering. If wanted, a preliminary filtering can be performed by specifiying filter = TRUE and a value in "value". As VCF files can contain variant information from >1 sample, the column name of the sample of interest should be specified.

Author(s)

Bart Broeckx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# test 1: filter = TRUE
  x <- test
  sample <- "V10"
  filter <- TRUE
  value <- "PASS"
  VCFfile(x,sample, filter, value)

  # test 2: filter = FALSE
  x <- test
  sample <- "V10"
  filter <- FALSE
  VCFfile(x,sample, filter)

BartBroeckx/Mendelian documentation built on May 5, 2019, 10:27 a.m.