boxplotsCompassSubsetBgCorrPropStratified: Create Stratified Boxplots of the Background Corrected...

Description Usage Arguments Details Examples

View source: R/CompassStratifiedBackgroundCorrectedProportionsBoxplots.R

Description

Subsets will be plotted in the order in which they appear in the cr_cats matrix. Only subsets which appear in compass.subset.comparisons.result will be plotted. Intended to be shown with the categories legend from the corresponding COMPASS heatmap displayed below.

Usage

1
2
3
4
5
6
7
8
9
  boxplotsCompassSubsetBgCorrPropStratified(compass.subset.comparisons.result,
  cr_cats, stratifyBy, sampleIDCol, parentSubset, themeBaseSize = 18,
  removeGridAndBg = FALSE, showSignificanceBracket = TRUE,
  pvalue_fontsize = NULL, axestitle_fontsize = NULL,
  axestick_fontsize = NULL, font = NULL, geom_jitter_width = 0.05,
  xaxis_title = stratifyBy, dot_size = 0.75, legend_position = c(1,
  1), show_points = F, padj_method = "bonferroni", ylim = NULL,
  p_alpha = 0.05, stratifyBy_colors = NULL, box_fill_alpha = 0.7,
  legend_fontsize = NULL)

Arguments

compass.subset.comparisons.result

The output from a run of COMPASSHelpers::compass.subset.comparisons(). Contains the p-values and background-corrected proportions for each subset.

cr_cats

a COMPASSResult categories matrix (cr$fit$categories) with rows defining the order in which you want the boxplots to appear. Can be obtained by a call to COMPASSHelpers::orderHeatmapColumnsByCytokinePresence(), for example.

stratifyBy

what metadata column to stratify the boxplots by, e.g. "Status"

sampleIDCol

e.g. "PATIENT ID"

parentSubset

e.g. "4+"

ylim

e.g. c(0,0.01)

p_alpha

The alpha level to use for choosing which subsets to plot p-values for

stratifyBy_colors

e.g. c("RSTR" = "white", "LTBI" = "black")

Details

This function is hacked together.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
compass.subset.comparisons.result <- compass.subset.comparisons(compassResultOrPath=CD4PP1CompassResult,
                                                             gsOrGsListOrPath=gs,
                                                             parentSubset="4+",
                                                             antigenCol="Antigen",
                                                             stimAntigen="Peptide Pool 1",
                                                             controlAntigen="DMSO",
                                                             stratifyBy="Status",
                                                             stratifyByValueMinuend = "LTBI",
                                                             stratifyByValueSubtrahend = "RSTR",
                                                             sampleIDCol="PATIENT ID")
cr_cats <- orderHeatmapColumnsByCytokinePresence(CD4PP1CompassResult, "IFNg",
                                      cats_df_cytokine_order_override = c("CD154", "IL2", "TNF", "CD107a", "IL4", "IL17a", "IFNg"))$fit$categories
boxplotsCompassSubsetBgCorrPropStratified(compass.subset.comparisons.result,
                                          cr_cats,
                                          stratifyBy="Status",
                                          sampleIDCol,
                                          parentSubset,
                                          removeGridAndBg=T,
                                          ylim=c(0, 0.01),
                                          stratifyBy_colors=c("RSTR" = "white", "LTBI" = "black"))

## End(Not run)

seshadrilab/flowHelpers documentation built on May 23, 2019, 4:05 a.m.