library(knitr) hook_output = knit_hooks$get('output') knit_hooks$set(output = function(x, options) { # this hook is used only when the linewidth option is not NULL if (!is.null(n <- options$linewidth)) { x = knitr:::split_lines(x) # any lines wider than n should be wrapped if (any(nchar(x) > n)) x = strwrap(x, width = n) x = paste(x, collapse = '\n') } hook_output(x, options) })
p1 <- designSampleSizeClassificationPlots(data = params$data, protein_importance_plot = F, predictive_accuracy_plot = T, use_h2o = params$use_h2o, alg = params$alg, save.pdf = F) p2 <- designSampleSizeClassificationPlots(data = params$data, protein_importance_plot = T, predictive_accuracy_plot = F, save.pdf = F, session = "") gridExtra::grid.arrange(p1$plot, p2$plot, ncol = 1)
\newpage
cat("Input Abundance File path:", params$count) cat("Input Annotation File path:", params$annot) cat("Data Transform type: ", params$transform) cat("Set Seed ?", params$set_seed) if(params$set_seed){ cat("Seed Value:", params$seed) } cat("Number of Simulations:", params$n_sim) cat("Expected Fold Change:", !params$fc) if(!params$fc){ cat("Basline group:", params$baseline) cat("List of Different Proteins:", params$list_diff_prots) cat("Fold Change values:", params$fc_values) } cat("Rank proteins by: ", params$rank) if(params$rank %in% c("Mean", "Combined")){ cat("Quantile cutoff for Proteins Abundance: ", params$mean_qq, "%\n") cat("Mean Abundance Region: ", params$mean_eq) } if(params$rank %in% c("Combined", "SD")){ cat("Quantile cutoff for Standard deviation: ", params$sd_qq, "%\n") cat("Standard DeviationRegion: ", params$sd_eq) } cat("Samples per group:", gsub("Sample","",params$sample)) cat("Simulate Validation Set:", params$valid) if(params$valid){ cat("Validations samples per group:", params$valid_sample) } cat("Classifier used to estimate sample size:", params$alg)
\newpage
#Need to install MsstatsSampleSize library from Bioconductor if it is not #installed library(MSstatsSampleSize) sim_data <- simulateDataset(data, annotation, num_simulations = 10, expected_FC = "data", list_diff_proteins = NULL, select_simulated_proteins = "proportion", protein_proportion = 1, protein_number = 1000, samples_per_group = 50, simulate_validation = FALSE, valid_samples_per_group = 50) model <- designSampleSizeClassification(simulations = sim_data, classifier = params$alg) designSampleSizeClassificationPlots(data = model)
\newpage
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.