mean.field.value {varitas} | R Documentation |
mean.field.value
Description
Get mean value of a variant annotation field
Usage
## 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.
[Package varitas version 0.0.2 Index]