plot_volcano: Volcano plot

Description Usage Arguments Value Examples

Description

Function plots fold changes and p-values as a volcano plot. Two lines are plotted for the p-value cutoff at p = PV_cutoff (solid line) and p = 0.1 (dashed line).

Usage

1
plot_volcano(FC, PV, FC_cutoff = 2, PV_cutoff = 0.05, figtitle = "")

Arguments

FC

vector of fold changes

PV

vctor of p-values, same lenght as FC

FC_cutoff

fold change cutoff where to draw vertical cutoff lines, default = 2

PV_cutoff

p-value cutoff where to draw a horisontal cutoff line, default ==.05

figtitle

title to display at the top of the figure, default = ”

Value

Nil

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
data(mm_peptides)
head(mm_peptides)
intsCols = 8:13 # different from parameter names as
                # R uses outer name spaces if variable is undefined
metaCols = 1:7
m_logInts = make_intencities(mm_peptides, intsCols)
m_prot.info = make_meta(mm_peptides, metaCols)
m_logInts = convert_log2(m_logInts)

# Normalize data
grps = as.factor(c('CG','CG','CG', 'mCG','mCG','mCG'))
mm_m_ints_eig1 = eig_norm1(m=m_logInts,treatment=grps,prot.info=m_prot.info)
mm_m_ints_eig1$h.c # check the number of bias trends detected

# Impute missing values
mm_m_ints_norm = eig_norm2(rv=mm_m_ints_eig1)
mm_prot.info = mm_m_ints_norm$normalized[,1:7]
mm_norm_m =  mm_m_ints_norm$normalized[,8:13]
imp_mm = MBimpute(mm_norm_m, grps, prot.info=mm_prot.info,
                  pr_ppos=2, my.pi=0.05,
                  compute_pi=FALSE, sseed=131)
DE_res = peptideLevel_DE(imp_mm$y_imputed, grps, imp_mm$imp_prot.info,
                         pr_ppos=2)
plot_volcano(DE_res$FC, DE_res$BH_P_val, FC_cutoff=1.5,
             PV_cutoff=.05, figtitle='Mouse DE')

yuliya8k/MultiMat documentation built on May 18, 2019, 5:50 a.m.