test_q: estimate percentile data

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/Z2_check_BRICseq_data.r

Description

estimate percentile data

Usage

1
test_q(x, y)

Arguments

x

exp_data

y

hour_label

Details

estimate percentile data

Value

data_table

Note

2015-11-05

Author(s)

Naoto Imamachi

References

https://github.com/Naoto-Imamachi/BRIC-seq_data_analysis/tree/master/BridgeR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
#q_data <- test_q(log10(exp_data[[x]]),hour_label[x])

## The function is currently defined as
function (x, y) 
{
    q_99 <- as.vector(quantile(x, prob = 0.99, na.rm = T))
    q_95 <- as.vector(quantile(x, prob = 0.95, na.rm = T))
    q_90 <- as.vector(quantile(x, prob = 0.9, na.rm = T))
    q_80 <- as.vector(quantile(x, prob = 0.8, na.rm = T))
    q_70 <- as.vector(quantile(x, prob = 0.7, na.rm = T))
    q_60 <- as.vector(quantile(x, prob = 0.6, na.rm = T))
    q_50 <- as.vector(quantile(x, prob = 0.5, na.rm = T))
    q_40 <- as.vector(quantile(x, prob = 0.4, na.rm = T))
    q_30 <- as.vector(quantile(x, prob = 0.3, na.rm = T))
    q_20 <- as.vector(quantile(x, prob = 0.2, na.rm = T))
    q_10 <- as.vector(quantile(x, prob = 0.1, na.rm = T))
    q_5 <- as.vector(quantile(x, prob = 0.05, na.rm = T))
    q_1 <- as.vector(quantile(x, prob = 0.01, na.rm = T))
    vec <- c(q_99, q_95, q_90, q_80, q_70, q_60, q_50, q_40, 
        q_30, q_20, q_10, q_5, q_1)
    factor_label <- c("99%", "95%", "90%", "80%", "70%", "60%", 
        "50%", "40%", "30%", "20%", "10%", "05%", "01%")
    label <- rep(y, 13)
    q_table <- data.frame(name = label, q = vec, factor = factor_label)
    return(q_table)
  }

Naoto-Imamachi/BridgeR documentation built on May 7, 2019, 6:05 p.m.