Commit 8f5d78d2 authored by Holger Brandl's avatar Holger Brandl

added score correlation plot to limma workflow

parent 4f2e78ef
......@@ -191,7 +191,24 @@ str(voomNorm)
## build contrasts
#' Corrleate normalized data with raw expression
# part of diffex_commons v1.50
expr_matrix_to_df = function(m, id="gene_id"){
m %>% as_df %>% tbl_df %>% rownames_to_column(id) %>% gather(replicate, expression, -one_of(id))
}
inner_join(expr_matrix_to_df(expMatrix) , expr_matrix_to_df(voomNorm$E), suffix=c("_raw", "_voom"), by=c("gene_id", "replicate")) %>%
sample_frac(0.1) %>%
ggplot(aes(expression_raw, expression_voom)) + geom_point() + scale_x_log10() + ggtitle("voom vs raw")
# export reference for later
voomNorm$E %>% as_df %>% tbl_df %>% rownames_to_column(id) %>%write_tsv(path=add_prefix("voom_norm_counts.txt"))
# voomNorm$E <- read_tsv("voomNorm$E.txt")
#' [voomNorm$E](voomNorm$E.txt)
#' build contrasts
#contr.matrix <- makeContrasts(
# BasalvsLP = Basal-LP,
# BasalvsML = Basal-ML,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment