designSampleSizePCAplot: PCA plot for each simulation

Description Usage Arguments Details Value Author(s) Examples

View source: R/designSampleSizePCAplot.R

Description

PCA plot for each simulation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
designSampleSizePCAplot(
  simulations,
  which.PCA = "all",
  x.axis.size = 10,
  y.axis.size = 10,
  dot.size = 3,
  legend.size = 7,
  width = 6,
  height = 5,
  address = ""
)

Arguments

simulations

A list of simulated datasets. It should be the output of simulateDataset function.

which.PCA

Select one PCA plot to show. It can be "all", "allonly", or "simulationX". X should be index of simulation, such as "simulation1" or "simulation5". Default is "all", which generates all the plots. "allonly" generates the PCA plot for the whole input dataset. "simulationX" generates the PCA plot for a specific simulated dataset (given by index).

x.axis.size

size of x-axis labeling in PCA Plot. Default is 10.

y.axis.size

size of y-axis labels. Default is 10.

dot.size

size of dots in PCA plot. Default is 3.

legend.size

size of legend above Profile plot. Default is 7.

width

width of the saved pdf file. Default is 6.

height

height of the saved pdf file. Default is 5.

address

the name of folder that will store the results. Default folder is the current working directory. The other assigned folder has to be existed under the current working directory. An output pdf file is automatically created with the default name of ‘PCAPlot.pdf’. The command address can help to specify where to store the file as well as how to modify the beginning of the file name. If address=FALSE, plot will be not saved as pdf file but showed in window.

Details

This function draws PCA plot for the whole input dataset and each simulated dataset in ‘simulations’ (input for this function). It outputs the number of simulations plus 1 of PCA plots. The first page shows a PCA plot for the input preliminary dataset. Each of the following pages shows a PCA plot under one simulation. x-axis of PCA plot is the first component and y-axis is the second component. This function can be used to validate whether the simulated dataset looks consistent with the input dataset.

Value

PCA plot : x-axis of PCA plot is the first component and y-axis is the second component.

Author(s)

Ting Huang, Meena Choi, Olga Vitek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data(OV_SRM_train)
data(OV_SRM_train_annotation)

# num_simulations = 10: simulate 10 times
# expected_FC = "data": fold change estimated from OV_SRM_train
# select_simulated_proteins = "proportion":
# select the simulated proteins based on the proportion of total proteins
# simulate_valid = FALSE: use input OV_SRM_train as validation set
# valid_samples_per_group = 50: 50 samples per condition
simulated_datasets <- simulateDataset(data = OV_SRM_train,
                                      annotation = OV_SRM_train_annotation,
                                      num_simulations = 10,
                                      expected_FC = "data",
                                      list_diff_proteins =  NULL,
                                      select_simulated_proteins = "proportion",
                                      protein_proportion = 1.0,
                                      protein_number = 1000,
                                      samples_per_group = 50,
                                      simulate_valid = FALSE,
                                      valid_samples_per_group = 50)

# output a PDF file with multiple PCA plots
designSampleSizePCAplot(simulated_datasets)

MSstatsSampleSize documentation built on Nov. 8, 2020, 4:53 p.m.