Patterning: Extract variants with user-specified variant pattern

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Patterning.R

Description

To prioritize variants in user-specified frequency pattern.

Usage

1
Patterning(x, pattern, paired=FALSE, not.covered=NULL, var.PL=NULL)

Arguments

x

A varlist class data from the function LoadFiltering.

pattern

The variant frequency matrix. Each column of the matrix is defined as the minimum and maximum value of variant frequency for each group of interest.

paired

Logical value. Whether cases and controls are paired. If paired is TRUE, control group label in index file should be marked as control. Sample names should be matched between case and its matched control.

not.covered

Logical value for the position with sequence coverage less than specified depth. If TRUE, such low-coverage positions will be considered as variant. If FALSE, such low-coverage positions will be considered as reference. If it's NULL (default), such low-coverage positions will be filtered.

var.PL

A TRUE or FALSE vector for each group in the order of pattern. PL is used to label possible variant when alter.PL is not NULL in the function LoadFiltering. When filtering variants with specified frequency pattern, possible variants are considered as variants if TRUE. If FALSE, possible variants are considered as non-variants. If NULL, possible variants are considered as non-variants in all groups.

Details

This function is used to extract variant with user-specified frequency pattern across study subjects. The pattern matrix is specified by users in advance. The column names should be matched with sample group names.

Value

The value returned is a varlist, including VarVCF, VarFrequency, Pattern and Samples.

VarVCF

A list variants with user-specified frequency pattern in each sample.

VarFrequency

Variant frequencies for input positions.

Sample

Samples annotation from input file.

Author(s)

Qiang Hu

See Also

LoadFiltering

Examples

1
2
3
4
5
#setwd(system.file("extdata", package="VPA"))
#varflt <- LoadFiltering(file="index1.txt", filtering=TRUE, alter.PL=20,
#alter.AD=3)
#pattern <- cbind(A=c(1/4,1), B=c(0,0))
#varRes1 <- Patterning(varflt, pattern, var.PL=c(FALSE, TRUE))

VPA documentation built on May 2, 2019, 4:45 p.m.