\donttest{
# ===================================
# Euclidean distance
# ===================================
## !!!require the brief working example in `?load_expts`
## global option
scale_log2r <- TRUE
pepEucDist(
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
)
prnEucDist(
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
# arguments for `pheatmap`
display_numbers = TRUE,
number_color = "grey30",
number_format = "%.1f",
clustering_distance_rows = "euclidean",
clustering_distance_cols = "euclidean",
fontsize = 16,
fontsize_row = 20,
fontsize_col = 20,
fontsize_number = 8,
cluster_rows = TRUE,
show_rownames = TRUE,
show_colnames = TRUE,
border_color = "grey60",
cellwidth = 24,
cellheight = 24,
filter_prots_by = exprs(prot_n_pep >= 5),
filename = "filter.png",
)
## additional row filtration by pVals (proteins, impute_na = FALSE)
# if not yet, run prerequisitive significance tests at `impute_na = FALSE`
pepSig(
impute_na = FALSE,
W2_bat = ~ Term["(W2.BI.TMT2-W2.BI.TMT1)",
"(W2.JHU.TMT2-W2.JHU.TMT1)",
"(W2.PNNL.TMT2-W2.PNNL.TMT1)"],
W2_loc = ~ Term_2["W2.BI-W2.JHU",
"W2.BI-W2.PNNL",
"W2.JHU-W2.PNNL"],
W16_vs_W2 = ~ Term_3["W16-W2"],
)
prnSig(impute_na = FALSE)
# (`W16_vs_W2.pVal (W16-W2)` now a column key)
prnEucDist(
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
filter_by = exprs(`W16_vs_W2.pVal (W16-W2)` <= 1e-6),
filename = pvalcutoff.png,
)
# analogous peptides
pepEucDist(
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
filter_by = exprs(`W16_vs_W2.pVal (W16-W2)` <= 1e-6),
filename = pvalcutoff.png,
)
## additional row filtration by pVals (proteins, impute_na = TRUE)
# if not yet, run prerequisitive NA imputation
pepImp(m = 2, maxit = 2)
prnImp(m = 5, maxit = 5)
# if not yet, run prerequisitive significance tests at `impute_na = TRUE`
pepSig(
impute_na = TRUE,
W2_bat = ~ Term["(W2.BI.TMT2-W2.BI.TMT1)",
"(W2.JHU.TMT2-W2.JHU.TMT1)",
"(W2.PNNL.TMT2-W2.PNNL.TMT1)"],
W2_loc = ~ Term_2["W2.BI-W2.JHU",
"W2.BI-W2.PNNL",
"W2.JHU-W2.PNNL"],
W16_vs_W2 = ~ Term_3["W16-W2"],
)
prnSig(impute_na = TRUE)
prnEucDist(
impute_na = TRUE,
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
filter_by = exprs(`W16_vs_W2.pVal (W16-W2)` <= 1e-6),
filename = filpvals_impna.png,
)
# analogous peptides
pepEucDist(
impute_na = TRUE,
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
filter_by = exprs(`W16_vs_W2.pVal (W16-W2)` <= 1e-6),
filename = filpvals_impna.png,
)
## custom color
pepEucDist(
impute_na = TRUE,
annot_cols = c("Group", "Color", "Alpha", "Shape"),
annot_colnames = c("Group", "Lab", "Batch", "WHIM"),
width = 14,
height = 12,
filter_by = exprs(`W16_vs_W2.pVal (W16-W2)` <= 1e-6),
color = colorRampPalette(c("blue", "white", "red"))(500),
filename = my_palette.png,
)
## Not run:
prnEucDist(
col_color = "column_key_not_existed",
col_shape = "another_missing_column_key",
annot_cols = c("bad_column_key", "yet_another_bad_column_key")
)
## End(Not run)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.