## ----setup, include = FALSE--------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----load_data---------------------------------------------------------------- library(SMAD) data("TestDatInput") head(TestDatInput) ## ----compPASS----------------------------------------------------------------- scoreCompPASS <- CompPASS(TestDatInput) head(scoreCompPASS) ## ----HG----------------------------------------------------------------------- scoreHG <- HG(TestDatInput) head(scoreHG) ## ----DICE--------------------------------------------------------------------- scoreDICE <- DICE(TestDatInput) head(scoreDICE) ## ----Hart--------------------------------------------------------------------- scoreHart <- Hart(TestDatInput) head(scoreHart) ## ----PE----------------------------------------------------------------------- # PE might require data.table and RcppAlgos scorePE <- PE(TestDatInput) head(scorePE) ## ----SAINT_spc---------------------------------------------------------------- # Using example data from the package bait_path <- system.file("exdata", "TIP49", "bait.dat", package = "SMAD") prey_path <- system.file("exdata", "TIP49", "prey.dat", package = "SMAD") inter_path <- system.file("exdata", "TIP49", "inter.dat", package = "SMAD") bait <- read.table(bait_path, sep = "\t", header = FALSE, col.names = c("ip_id", "bait_id", "test_ctrl")) prey <- read.table(prey_path, sep = "\t", header = FALSE, col.names = c("prey_id", "prey_length")) inter <- read.table(inter_path, sep = "\t", header = FALSE, col.names = c("ip_id", "bait_id", "prey_id", "quant")) result_spc <- SAINTexpress_spc(inter, prey, bait) head(result_spc[, c("Bait", "Prey", "SaintScore", "BFDR")]) ## ----SAINT_int---------------------------------------------------------------- # Re-using the same example data for demonstration purposes result_int <- SAINTexpress_int(inter, prey, bait) head(result_int[, c("Bait", "Prey", "SaintScore", "BFDR")]) ## ----visualization, fig.width=10, fig.height=6-------------------------------- par(mfrow = c(2, 3)) hist(scoreCompPASS$scoreWD, main = "CompPASS WD-score", xlab = "WD-score", col = "skyblue") hist(scoreHG$HG, main = "HGScore", xlab = "HGScore", col = "salmon") hist(scoreDICE$DICE, main = "DICE Score", xlab = "DICE", col = "lightgreen") hist(scoreHart$Hart, main = "Hart Score", xlab = "Hart", col = "plum") hist(scorePE$PE, main = "PE Score", xlab = "PE", col = "orange") hist(result_spc$SaintScore, main = "SAINT Score (spc)", xlab = "SAINT Score", col = "gold") ## ----sessionInfo-------------------------------------------------------------- sessionInfo()