phenotype_boxplots: Create colour-coded boxplots for each feature across every...

Description Usage Arguments Value Examples

View source: R/phenotype_boxplots.R

Description

Plot individual boxplots for each feature, with color codes corresponding to the output of the plasticity_phenotype function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
phenotype_boxplots(
  feature_df = feature_df,
  phenotype_cols = phenotype.cols,
  first_index_column = first_index_column,
  group_label = group_label,
  max_sum = max_sum,
  point_size = point_size,
  point_alpha = point_alpha,
  aspect_ratio = aspect_ratio,
  text_size = text_size
)

Arguments

feature_df

The dataframe of features used to create phenotypes, containing group identifiers and the values of each feature.

phenotype_cols

Taken from the plasticity_phenotype function; dataframe containing hexadecimal color-code for each feature.

first_index_column

A numeric value that indicates which column number contains the first index feature (column number -1). All subsequent feature columns are assumed to be indices. All preceding feature columns are assumed to be sums.

group_label

X-axis title.

max_sum

A vector that indicates the y-axis maximum value for each feature sum.

point_size

A numeric value that indicates the size of data points (Default value = 0.5 pt)

point_alpha

A numeric value that indicates the transparency (alpha) of data points (Default value = 0.5 pt)

aspect_ratio

A numeric value that indicates the aspect ratio of each plot (Default value= 5/7 or 0.714)

text_size

A numeric value indicating text size

Value

A series of individual boxplots depicting the expression of each feature across groups, colour-code can optionally be set to match phenotypes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
phenotype_boxplots(
     feature_df = merged.data2[,c("Condition",ordered_nf_colnames2)],
     phenotype_cols = phenotype.cols,
     max_sum = c(1.5,
          max(merged.data2$'VGLUT\n'),
          max(merged.data2$'Receptors Sum\n'),
          max(merged.data2$'Scaffolding Sum\n'),
          2),
     group_label = "\nRearing Conditions",
     first_index_column = 6,
     point_size = 1.5,
     point_alpha = 1,
     aspect_ratio = 5/7,
     text_size = 8
     )

visualneurosciencelab/PlasticityPhenotypes documentation built on Sept. 7, 2020, 2:18 p.m.