Description Usage Arguments Details Value Author(s) Examples
View source: R/designSampleSizePCAplot.R
PCA plot for each simulation
1 | designSampleSizePCAplot(simulations, which.PCA = "all", save.pdf = FALSE, ...)
|
simulations |
A list of simulated datasets. It should be the output of |
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). |
save.pdf |
A logical input, determines to save the plots as a pdf or not, the pdf plot is saved in the current working directory, name of the created file is displayed on the console and logged for easier access |
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. |
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.
PCA plot : x-axis of PCA plot is the first component and y-axis is the second component.
Ting Huang, Meena Choi, Sumedh Sankhe, Olga Vitek
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(OV_SRM_train)
data(OV_SRM_train_annotation)
# num_simulations = 10: simulate 10 times
# protein_rank = "mean", protein_select = "high", and protein_quantile_cutoff = 0.0:
# select the proteins with high mean abundance based on the protein_quantile_cutoff
# expected_FC = "data": fold change estimated from OV_SRM_train
# simulate_validation = 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,
log2Trans = FALSE,
num_simulations = 10,
samples_per_group = 50,
protein_rank = "mean",
protein_select = "high",
protein_quantile_cutoff = 0.0,
expected_FC = "data",
list_diff_proteins = NULL,
simulate_validation = FALSE,
valid_samples_per_group = 50)
# output a PDF file with multiple PCA plots
designSampleSizePCAplot(simulated_datasets)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.