plot2dTppVolcano: Plot Volcano plot of TPP2D results

Description Usage Arguments Value Examples

View source: R/plot_funcs.R

Description

Plot Volcano plot of TPP2D results

Usage

1
2
3
4
5
6
7
8
9
plot2dTppVolcano(
  fdr_df,
  hits_df,
  alpha = 0.5,
  title_string = "",
  x_lim = NULL,
  y_lim = NULL,
  facet_by_obs = FALSE
)

Arguments

fdr_df

data frame obtained from 'getFDR'

hits_df

hits_df data frame obtained from 'findHits'

alpha

transparency level of plotted points

title_string

character argument handed over to ggtitle

x_lim

vector with two numerics indicating the x axis limits

y_lim

vector with two numerics indicating the y axis limits

facet_by_obs

logical indicating whether plot should be facetted by number of observations, default: FALSE

Value

a ggplot displaying a volcano plot of the results obtained after a TPP2D analysis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("simulated_cell_extract_df")
temp_df <- simulated_cell_extract_df %>%
  filter(clustername %in% paste0("protein", 1:5)) %>%
  group_by(representative) %>%
  mutate(nObs = n()) %>%
  ungroup
example_params <- getModelParamsDf(temp_df)
example_fstat <- computeFStatFromParams(example_params)
example_null <- bootstrapNullAlternativeModel(
   df = temp_df, params_df = example_params,
   B = 2)
fdr_df <- getFDR(example_fstat, example_null)
hits_df <- findHits(fdr_df, 0.1)
plot2dTppVolcano(fdr_df = fdr_df, hits_df = hits_df)

TPP2D documentation built on Nov. 8, 2020, 4:54 p.m.