quality_control: Experiment quality control

Description Usage Arguments Details Value See Also Examples

View source: R/quality_control.R

Description

Checks how the uncertainty changes in a function of 'out_time'.

Usage

1
quality_control(dat, state_first, state_second, chosen_time, in_time)

Arguments

dat

data read by read_hdx

state_first

state of the first peptide

state_second

state of the second peptide

chosen_time

chosen time point

in_time

'in' time

Details

The function calculates mean uncertainty of all peptides and its uncertainty (standard error) based on given 'in_time' and 'chosen_time' as a function of 'out_time'. Both theoretical and experimental results for each state and their difference are supplied for comparison but only experimental calculations depends on 'out_time' variable. The results are either in form of relative or absolute values depending on the 'relative' parameter supplied by the user. This data can be useful for general overview of the experiment and analyse of the chosen time parameters.

Value

data.frame with mean uncertainty per different 'out_time' value

See Also

read_hdx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load example data
dat <- read_hdx(system.file(package = "HaDeX", "HaDeX/data/KD_180110_CD160_HVEM.csv"))

# calculate mean uncertainty 
(result <- quality_control(dat = dat,
                           state_first = "CD160",
                           state_second = "CD160_HVEM", 
                           chosen_time = 1, 
                           in_time = 0.001))    
                           
# load extra libraries
library(ggplot2)
library(tidyr)
library(dplyr)

# example of data visualization 
gather(result, 2:7, key = 'type', value = 'value') %>%
filter(startsWith(type, "avg")) %>%
  ggplot(aes(x = factor(out_time), y = value, group = type)) +
  geom_line(aes(color = type)) +
  labs(x = "Out time", 
       y = "Mean uncertainty")

HaDeX documentation built on July 8, 2020, 6:04 p.m.