prnGSEA: Protein GSEA

prnGSEAR Documentation

Protein GSEA

Description

prnGSEA prepares data for the analysis of GSEA against protein log2FC data.

Usage

prnGSEA(
  gset_nms = "go_sets",
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  df = NULL,
  filepath = NULL,
  filename = NULL,
  var_cutoff = 0.5,
  pval_cutoff = 0.05,
  logFC_cutoff = log2(1.2),
  fml_nms = NULL,
  ...
)

Arguments

gset_nms

Not currently used (to be chosen by users during online GSEA).

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

filepath

Use system default.

filename

A representative file name to outputs. By default, it will be determined automatically by the name of the current call.

var_cutoff

Numeric value or vector; the cut-off in the variance of protein log2FC across samples. Entries with variances less than the threshold will be removed for enrichment analysis. The default is 0.5.

pval_cutoff

Numeric value or vector; the cut-off in protein significance pVal. Entries with pVals less significant than the threshold will be excluded from enrichment analysis. The default is 0.05 for all formulas matched to or specified in argument fml_nms. Formula-specific threshold is allowed by supplying a vector of cut-off values.

logFC_cutoff

Numeric value or vector; the cut-off in protein log2FC. Entries with absolute log2FC smaller than the threshold will be excluded from enrichment analysis. The default magnitude is log2(1.2) for all formulas matched to or specified in argument fml_nms. Formula-specific threshold is allowed by supplying a vector of absolute values in log2FC.

fml_nms

Character string or vector; the formula name(s). By default, the formula(s) will match those used in pepSig or prnSig.

...

filter_: Variable argument statements for the row filtration against data in a primary file linked to df. See also normPSM for the format of filter_ statements.

arrange_: Variable argument statements for the row ordering against data in a primary file linked to df. See also prnHM for the format of arrange_ statements.

Details

The arguments var_cutoff, pval_cutoff and logFC_cutoff are used to filter out low influence genes. Additional subsetting of data via the vararg approach of filter_ is feasible.

The outputs include Protein_GSEA.gct and protein_GSEA.cls for samples indicated in file Protein_pVals.txt or Protein_impNA_pVals.txt. These outputs can be used with online GSEA.

The current GSEA may not support the comparisons between two grouped conditions, i.e., (grpA + grpB) versus (grpC + grpD). The prnGSEA utility further breaks the input data into pairs of groups according to the formulas and contrasts defined in pepSig or prnSig. The phenotype labels are then reformed in reflection of the original group names, weights and directions, i.e., 0.5xgrpA&0.5xgrpB -0.5xgrpC&-0.5xgrpD. The corresponding .gct and .cls files can be used with the online or the github version of R-GSEA.

See Also

Metadata
load_expts for metadata preparation and a reduced working example in data normalization

Data normalization
normPSM for extended examples in PSM data normalization
PSM2Pep for extended examples in PSM to peptide summarization
mergePep for extended examples in peptide data merging
standPep for extended examples in peptide data normalization
Pep2Prn for extended examples in peptide to protein summarization
standPrn for extended examples in protein data normalization.
purgePSM and purgePep for extended examples in data purging
pepHist and prnHist for extended examples in histogram visualization.
extract_raws and extract_psm_raws for extracting MS file names

Variable arguments of 'filter_...'
contain_str, contain_chars_in, not_contain_str, not_contain_chars_in, start_with_str, end_with_str, start_with_chars_in and ends_with_chars_in for data subsetting by character strings

Missing values
pepImp and prnImp for missing value imputation

Informatics
pepSig and prnSig for significance tests
pepVol and prnVol for volcano plot visualization
prnGSPA for gene set enrichment analysis by protein significance pVals
gspaMap for mapping GSPA to volcano plot visualization
prnGSPAHM for heat map and network visualization of GSPA results
prnGSVA for gene set variance analysis
prnGSEA for data preparation for online GSEA.
pepMDS and prnMDS for MDS visualization
pepPCA and prnPCA for PCA visualization
pepLDA and prnLDA for LDA visualization
pepHM and prnHM for heat map visualization
pepCorr_logFC, prnCorr_logFC, pepCorr_logInt and prnCorr_logInt for correlation plots
anal_prnTrend and plot_prnTrend for trend analysis and visualization
anal_pepNMF, anal_prnNMF, plot_pepNMFCon, plot_prnNMFCon, plot_pepNMFCoef, plot_prnNMFCoef and plot_metaNMF for NMF analysis and visualization

Custom databases
Uni2Entrez for lookups between UniProt accessions and Entrez IDs
Ref2Entrez for lookups among RefSeq accessions, gene names and Entrez IDs
prepGO for gene ontology
prepMSig for molecular signatures
prepString and anal_prnString for STRING-DB

Column keys in PSM, peptide and protein outputs
system.file("extdata", "psm_keys.txt", package = "proteoQ")
system.file("extdata", "peptide_keys.txt", package = "proteoQ")
system.file("extdata", "protein_keys.txt", package = "proteoQ")

Examples


# ===================================
# GSEA
# ===================================

## !!!require the brief working example in `?load_expts`

# global option
scale_log2r <- TRUE

## prerequisites in significance tests
# (see also ?prnSig)
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)"], # batch effects
  W2_loc = ~ Term_2["W2.BI-W2.JHU", 
                    "W2.BI-W2.PNNL", 
                    "W2.JHU-W2.PNNL"], # location effects
  W16_vs_W2 = ~ Term_3["W16-W2"], 
)

prnSig(impute_na = FALSE)

# all human proteins
prnGSEA(
  var_cutoff = 0, 
  pval_cutoff = 1, 
  logFC_cutoff = log2(1), 
  filter_by_sp = exprs(species == "human"), 
)

# prefiltration by variances, pVals and logFCs
prnGSEA(
  var_cutoff = 0.5,     
  pval_cutoff = 5E-2,
  logFC_cutoff = log2(1.2),
  filter_by_sp = exprs(species == "human"), 
  filename = hu_prefil.txt,
)

# cases that are complete with no missing values
prnGSEA(
  var_cutoff = 0.5,     
  pval_cutoff = 5E-2,
  logFC_cutoff = log2(1.2),
  complete_cases = TRUE, 
  filter_by_sp = exprs(species == "human"), 
  filename = cc.txt,
)

# customized thresholds for the corresponding formulae in `pepSig` or `prnSig()`
prnGSEA(
  fml_nms = c("W2_bat", "W2_loc", "W16_vs_W2"),
  var_cutoff = c(0, 0.2, 0.5), 
  pval_cutoff = c(5E-2, 5E-2, 1E-5),
  logFC_cutoff = c(log2(1.1), log2(1.1), log2(1.2)),
  filter_by_sp = exprs(species == "human"), 
  filename = custom_fil.txt,
)


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