AFD: Calculate AFD frow two sample allele frequency

Description Usage Arguments Details Value Examples

Description

Calculate Allele Frequency Deviation frow two sample allele frequency

Usage

1
2
AFD(FREQ_1.x, FREQ_1.y, power = 2, density = T,
  density_method = "xdensity", n = 256, filterAF = 0.2, filterDEV = 5)

Arguments

FREQ_1.x

allele frequency of normal sample to calculate AFD

FREQ_1.y

allele frequency of tumor sample to calculate AFD

power

d ^ power, d means deviation (abs(transposed y axis))

density

logical; if TRUE, use density of bin or each grid to multiply d ^ power

density_method

method to calculate density, include "xdensity" and "kde2d"

n

integer vector, bins number when calculate density.In "xdensity" method, only one bin number and in kde2d, you can give

filterAF

numeric, allele frequency cutoff, should between 1 and 100, if allele frequencies of both samples are less than it, then remove these position.

filterDEV

numeric, absolute deviation cutoff, should between 1 and 70, if deviation of a point is less than it, then remove the position.

Details

First, the x and y coordinates are transposed at 45 degrees, and the y coordinate after transposition is taken as the deviation of the point. Then absolute deviation I is taken to the power, then multiplied by the density. The density can be achieved by two alternative methods,"xdensity" and "kde2d".

Value

AFD value

Examples

1
2
data(afd_test_dt)
afd <- AFD(afd_test_dt$FREQ_1.x, afd_test_dt$FREQ_1.y)

DMU-lilab/CancerGenomics documentation built on May 17, 2019, 6:10 a.m.