mean.field.value: mean.field.value

Description Usage Arguments Details Value

View source: R/helper_functions.R

Description

Get mean value of a variant annotation field

Usage

1
2
3
4
## S3 method for class 'field.value'
mean(variants, field = c("TUMOUR.DP", "NORMAL.DP",
  "NORMAL.AF", "TUMOUR.AF", "QUAL"), caller = c("consensus", "vardict",
  "pgm", "mutect", "isis", "varscan", "lofreq"))

Arguments

variants

Data frame with variants

field

String giving field of interest.

caller

String giving caller to calculate values from

Details

As part of the variant merging process, annotated variant data frames are merged into one, with the value from each caller prefixed by CALLER. For example, the VarDict normal allele freqeuncy will have header VARDICT.NORMAL.AF. This function takes the average of all callers' value for a given field, removing NA's. If only a single caller is present in the data frame, that value is returned.

Value

Vector of mean values.


varitas documentation built on Nov. 14, 2020, 1:07 a.m.