prepDM: Prepares data for analysis

View source: R/utils.R

prepDMR Documentation

Prepares data for analysis

Description

prepDM prepares a minimal adequate data frame for subsequent analysis.

Usage

prepDM(
  df = NULL,
  id = "pep_seq",
  scale_log2r = TRUE,
  sub_grp = NULL,
  type = "ratio",
  anal_type = NULL,
  rm_allna = FALSE
)

Arguments

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").

id

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

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.

sub_grp

Numeric. A list of sample IDs that will be used in subsequent analysis.

type

The type of data, for example ratio or intensity.

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", ...).

rm_allna

Logical; if TRUE, removes data rows that are exclusively NA across ratio columns of log2_R126 etc. The setting also applies to log2_R000 in LFQ.

Value

A data frame tailored for subsequent analysis.

Examples

tempData <- prepDM(df, entrez, scale_log2r, label_scheme_sub$Sample_ID)

qzhang503/proteoQ documentation built on Dec. 14, 2024, 12:27 p.m.