lcms_peak_table_pca: Principal Component Analysis (PCA)

Description Usage Arguments Value See Also Examples

Description

It performs PCA using on the annotated peak table obtained from a MAIT object.

Usage

1
2
3
4
5
6
7
lcms_peak_table_pca(
  MAIT.object = NULL,
  treatment_col,
  Log = FALSE,
  center = TRUE,
  scale = TRUE
)

Arguments

MAIT.object

MAIT object where it is found an annotated peak table.

treatment_col

Treatment for the samples.

Log

Set to TRUE if the data should be plotted using the logarithm of the intensity.

center

to TRUE if the data should be centered around its mean. See scale.

scale

Set to TRUE if the data should be scaled.

Value

A MAIT.object. Additionaly: Three different PCA scoreplots are printed in three png files. One using PC1 vs PC2, another with PC1 vs PC3 and the last one with PC2 vs PC3. The files will be stored in the directory /PCA_Scoreplots.

See Also

Other metabolite identification functions: lcms_identify_metabolites(), lcms_peak_annotation(), lcms_peak_table_boxplots(), lcms_raw_data(), lcms_sig_peaks_table(), lcms_spectral_sig_features(), lcms_to_mait(), lcms_write_parameter_table()

Other dataset_peak_table functions: lcms_dataset_load(), lcms_identify_metabolites(), lcms_peak_annotation(), lcms_peak_table_boxplots(), lcms_plot_tics(), lcms_raw_data(), lcms_sig_peaks_table(), lcms_spectral_sig_features(), lcms_tics(), lcms_to_mait()

Other statistical functions: lcms_peak_table_boxplots()

Other visualization functions: lcms_peak_table_boxplots(), lcms_plot_chrom_peak_image(), lcms_plot_chrom(), lcms_plot_tics(), lcms_retcorgroup_optimization(), lcms_retention_time_alignment_plot(), peakpicking_optimization()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
file_name_1 <-  system.file("extdata","peak_table_sig_ann.rds", package = "AlpsLCMS")
peak_table <- base::readRDS(file_name_1)
file_name_2 <-  system.file("extdata","dataset_pos_rt_rs.rds", package = "AlpsLCMS")
dataset <-  base::readRDS(file_name_2)
treatment_col <- scales::hue_pal()(length(unique(dataset$treatment)))

lcms_peak_table_pca(peak_table,
                   treatment_col = treatment_col,
                   Log = FALSE,
                   center = TRUE, scale = FALSE)

## End(Not run)

sipss/NIHSlcms documentation built on May 13, 2021, 6:19 p.m.