prnCorr_logFC: Correlation plots

pepCorr_logFCR Documentation

Correlation plots

Description

pepCorr_logFC plots correlation for peptide logFC. data.

pepCorr_logInt plots correlation of the log10 intensity of ions for peptide data.

prnCorr_logFC plots correlation for protein logFC.

prnCorr_logInt plots correlation of the log10 intensity of ions for protein data.

Usage

pepCorr_logFC(
  col_select = NULL,
  col_order = NULL,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  df = NULL,
  filepath = NULL,
  filename = NULL,
  cor_method = "pearson",
  digits = 2L,
  ...
)

pepCorr_logInt(
  col_select = NULL,
  col_order = NULL,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  df = NULL,
  filepath = NULL,
  filename = NULL,
  cor_method = "pearson",
  digits = 2L,
  ...
)

prnCorr_logFC(
  col_select = NULL,
  col_order = NULL,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  df = NULL,
  filepath = NULL,
  filename = NULL,
  cor_method = "pearson",
  digits = 2L,
  ...
)

prnCorr_logInt(
  col_select = NULL,
  col_order = NULL,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  impute_na = FALSE,
  df = NULL,
  filepath = NULL,
  filename = NULL,
  cor_method = "pearson",
  digits = 2L,
  ...
)

Arguments

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_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.

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

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.

cor_method

A character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall", or "spearman".

digits

The number of decimal places in correlation values to be displayed.

...

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.

Additional parameters for plotting:
width, the width of plot
height, the height of plot
xmin, the minimum x of logFC or intensity
xmax, the maximum x of logFC data or intensity data
xbreaks, the breaks on x axis; the same breaks will be applied to y axis.

Details

With TMT experiments, the same polypeptide may be triggered for MS2 any where between the baseline and the apex levels during a peak elution. The direct comparison of reporter-ion intensities between plex-es might have little meaning.

Value

Correlation plots.

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


# ===================================
# Correlation
# ===================================

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

## global option
scale_log2r <- TRUE

# peptide log2FC with sample ID ordering
#(no more than 40 samples for visualization)
pepCorr_logFC(
  col_select = BI,
  col_order = Order, 
  width = 25,
  height = 25,
  filter_peps_by = exprs(pep_n_psm >= 3),
  filename = bi_npsm3.png,
)

# protein log2FC
prnCorr_logFC(
  col_select = W2,
  col_order = Order, 
  width = 40,
  height = 40,
  filter_prots = exprs(prot_n_pep >= 2),
  filename = w2_npep2.png,
)


## Not run: 
# at most 40 samples
pepCorr_logFC(
  col_order = Order, 
  width = 40,
  height = 40,
  filter_peps_by = exprs(pep_n_psm >= 3),
  filename = too_many_cols.png,
)

# interplex comparison of peptide intensity
# (modest correlation in interplex reporter-ion intensity at data-dependant acquistion)
pepCorr_logInt(
  width = 10,
  height = 10,
  filter_peps_by = exprs(pep_n_psm >= 3),
  filename = pepcorr_int_npsm3.png,
)

# protein intensity
prnCorr_logInt(
  width = 10,
  height = 10,
  filter_prots_by = exprs(prot_n_pep >= 5),
  filename = prncorr_int_npep5.png,
)
## End(Not run)



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