Get mean value of a variant annotation field
# S3 method for field.value
mean(variants, field = c("TUMOUR.DP", "NORMAL.DP",
"NORMAL.AF", "TUMOUR.AF", "QUAL"), caller = c("consensus", "vardict",
"pgm", "mutect", "isis", "varscan", "lofreq"))Data frame with variants
String giving field of interest.
String giving caller to calculate values from
Vector of mean values.
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.