| p_adj_f | R Documentation |
Correct p-value with independent filtering
p_adj_f(pval, filter.stat, alpha = 0.1, method = "BH")
pval |
an vector of p-values |
filter.stat |
A vector of stage-one filter statistics, or a function
which is able to compute this vector from data, if data is supplied. See
|
alpha |
p-values threshold for selection |
method |
p-value correction method |
This function is modified from some code segments from
a list.
## data set from R package 'pasilla'
dn <- system.file("extdata/pasilla_gene_counts.tsv", package = "rnaseqdea")
data <- read.table(dn, header = TRUE, row.names = 1, quote = "", comment.char = "")
keep <- rowSums(data) > 6000
data <- data[keep, ]
cls <- c("untreated", "untreated", "untreated", "untreated",
"treated", "treated", "treated")
cls <- as.factor(cls)
## use limma's voom
res <- stats_voom(data, cls, com = levels(cls), norm.method = "TMM")
names(res) # "stats", "rej.num", "data", "cls", "padjf"
res$rej.num
head(res$stats)
## independent filtering for adjusted p-values
stats <- res$stats
pval <- stats$pval
names(pval) <- rownames(stats)
padj <- p_adj_f(pval, stats$mean, alpha = 0.1, method = "BH")
names(padj)
padj$rej
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.