info_anal: Function factories for informatic analysis

info_analR Documentation

Function factories for informatic analysis

Description

info_anal produces functions for selected informatic analysis.

Usage

info_anal(
  id = gene,
  col_select = NULL,
  col_group = NULL,
  col_order = NULL,
  col_color = NULL,
  col_fill = NULL,
  col_shape = NULL,
  col_size = NULL,
  col_alpha = NULL,
  color_brewer = NULL,
  fill_brewer = NULL,
  size_manual = NULL,
  shape_manual = NULL,
  alpha_manual = NULL,
  col_benchmark = NULL,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  method_replace_na = "none",
  df = NULL,
  df2 = NULL,
  filepath = NULL,
  filename = NULL,
  anal_type = c("Corrplot", "Heatmap", "Histogram", "MA", "MDS", "Model", "NMF", "Trend")
)

Arguments

id

Character string; one of pep_seq, pep_seq_mod, prot_acc and gene.

col_select

Character string to a column key in expt_smry.xlsx. At the NULL default, the column key of Select in expt_smry.xlsx will be used. In the case of no samples being specified under Select, the column key of Sample_ID will be used. The non-empty entries under the ascribing column will be used in indicated analysis.

col_group

Character string to a column key in expt_smry.xlsx. Samples corresponding to non-empty entries under col_group will be used for sample grouping in the indicated analysis. At the NULL default, the column key Group will be used. No data annotation by groups will be performed if the fields under the indicated group column is empty.

col_order

Character string to a column key in expt_smry.xlsx. Numeric values under which will be used for the left-to-right arrangement of samples in graphic outputs or top-to-bottom arrangement in text outputs. At the NULL default, the column key Order will be used. If values under column Order are left blank, samples will be ordered by their names.

col_color

Character string to a column key in expt_smry.xlsx. Values under which will be used for the color aesthetics in plots. At the NULL default, the column key Color will be used. If NA, bypasses the aesthetics (a means to bypass the look-up of column Color and handle duplication in aesthetics).

col_fill

Character string to a column key in expt_smry.xlsx. Values under which will be used for the fill aesthetics in plots. At the NULL default, the column key Fill will be used. If NA, bypasses the aesthetics (a means to bypass the look-up of column Fill and handle duplication in aesthetics).

col_shape

Character string to a column key in expt_smry.xlsx. Values under which will be used for the shape aesthetics in plots. At the NULL default, the column key Shape will be used. If NA, bypasses the aesthetics (a means to bypass the look-up of column Shape and handle duplication in aesthetics).

col_size

Character string to a column key in expt_smry.xlsx. Values under which will be used for the size aesthetics in plots. At the NULL default, the column key Size will be used. If NA, bypasses the aesthetics (a means to bypass the look-up of column Size and handle duplication in aesthetics).

col_alpha

Character string to a column key in expt_smry.xlsx. Values under which will be used for the alpha (transparency) aesthetics in plots. At the NULL default, the column key Alpha will be used. If NA, bypasses the aesthetics (a means to bypass the look-up of column Alpha and handle duplication in aesthetics).

color_brewer

Character string to the name of a color brewer for use in ggplot2::scale_color_brewer, i.e., color_brewer = Set1. At the NULL default, the setting in ggplot2 will be used.

fill_brewer

Character string to the name of a color brewer for use in ggplot2::scale_fill_brewer, i.e., fill_brewer = Spectral. At the NULL default, the setting in ggplot2 will be used.

size_manual

Numeric vector to the scale of sizes for use in ggplot2::scale_size_manual, i.e., size_manual = c(8, 12). At the NULL default, the setting in ggplot2 will be used.

shape_manual

Numeric vector to the scale of shape IDs for use in ggplot2::scale_shape_manual, i.e., shape_manual = c(5, 15). At the NULL default, the setting in ggplot2 will be used.

alpha_manual

Numeric vector to the scale of transparency of objects for use in ggplot2::scale_alpha_manual , i.e., alpha_manual = c(.5, .9). At the NULL default, the setting in ggplot2 will be used.

col_benchmark

Not used.

scale_log2r

Logical; if TRUE, adjusts log2FC to the same scale of standard deviation across all samples. The default is TRUE. At scale_log2r = NA, the raw log2FC without normalization will be used.

complete_cases

Logical; if TRUE, only cases that are complete with no missing values will be used. The default is FALSE.

impute_na

Logical; if TRUE, data with the imputation of missing values will be used. The default is FALSE.

df

The name of a primary data file. By default, it will be determined automatically after matching the types of data and analysis with an id among c("pep_seq", "pep_seq_mod", "prot_acc", "gene"). A primary file contains normalized peptide or protein data and is among c("Peptide.txt", "Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt"). For analyses require the fields of significance p-values, the df will be one of c("Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt").

df2

Character vector or string; the name(s) of secondary data file(s). An informatic task, i.e. anal_prnTrend(...) against a primary df generates secondary files such as Protein_Trend_Z_nclust6.txt etc. See also prnHist for the description of a primary df; normPSM for the lists of df and df2.

filepath

A file path to output results. By default, it will be determined automatically by the name of the calling function and the value of id in the call.

filename

A representative file name to outputs. By default, the name(s) will be determined automatically. For text files, a typical file extension is .txt. For image files, they are typically saved via ggsave or pheatmap where the image type will be determined by the extension of the file name.

anal_type

Character string; the type of analysis that are preset for method dispatch in function factories. The value will be determined automatically. Exemplary values include anal_type = c("PCA", "Corrplot", "EucDist", "GSPA", "Heatmap", "Histogram", "MDS", "Model", "NMF", "Purge", "Trend", "LDA", ...).

Value

A function to the given anal_type.


qzhang503/proteoQ documentation built on March 16, 2024, 5:27 a.m.