cosine.similarity.cutoff {OmicsQC} | R Documentation |
Calculate an outlier cutoff using cosine similarity
Description
This function takes quality.scores, trims it and fits it to the distribution given. It then simulates as many datasets as stated by no.simulations, and computes the cosine similarity of each dataset against theoretical distribution. It uses what would correspond to a significant value to then calculate what observed value this would correspond to. The function supports the following distributions:
'weibull'
'norm'
'gamma'
'exp'
'lnorm'
'cauchy'
'logis'
Usage
cosine.similarity.cutoff(
quality.scores,
no.simulations,
distribution = c("lnorm", "weibull", "norm", "gamma", "exp", "cauchy", "logis"),
trim.factor = 0.05,
alpha.significant = 0.05
)
Arguments
quality.scores |
A dataframe with columns 'Sum' (of scores) and 'Sample', i.e. the output of accumulate.zscores |
no.simulations |
The number of datasets to simulate |
distribution |
A distribution to test, will default to 'lnorm' |
trim.factor |
What fraction of values of each to trim to get parameters without using extremes |
alpha.significant |
Alpha value for significance |
Value
Results in the form of a named list
- cutoff
Computed cutoff for aggregated z-scores used as a threshold for nominating outliers
- no.outliers
Number of nominated outliers
- outlier.labels
Outlier IDs, corresponding to
Sample
column ofquality.scores