Skip to contents

Save processed experiment, plots and tables of a glysmith result object to a directory. A README.md file will also be generated to describe the saved outputs.

Usage

quench_result(
  x,
  dir,
  plot_ext = "pdf",
  table_ext = "csv",
  plot_width = 5,
  plot_height = 5
)

Arguments

x

A glysmith result object.

dir

The directory to save the result.

plot_ext

The extension of the plot files. Either "pdf", "png" or "svg". Default is "pdf".

table_ext

The extension of the table files. Either "csv" or "tsv". Default is "csv".

plot_width

The width of the plot in inches. Default is 5.

plot_height

The height of the plot in inches. Default is 5.

Examples

library(glyexp)
exp <- real_experiment2
result <- forge_analysis(exp)
#>  Identification overview
#>  Identification overview [101ms]
#> 
#>  Preprocessing
#> 
#>  Preprocessing

#> ── Removing variables with too many missing values ──
#>  Preprocessing

#> 
#>  Preprocessing

#>  No QC samples found. Using all samples.
#>  Preprocessing

#>  Applying preset "discovery"...
#>  Preprocessing

#>  Total removed: 10 (14.93%) variables.
#>  Preprocessing

#>  Variable removal completed.
#>  Preprocessing

#> 
#>  Preprocessing

#> ── Normalizing data ──
#>  Preprocessing

#> 
#>  Preprocessing

#>  No QC samples found. Using default normalization method based on experiment type.
#>  Preprocessing

#>  Experiment type is "glycomics". Using `normalize_median_quotient()` + `normalize_total_area()`.
#>  Preprocessing

#>  Normalization completed.
#>  Preprocessing

#> 
#>  Preprocessing

#> ── Normalizing data (Total Area) ──
#>  Preprocessing

#> 
#>  Preprocessing

#>  Total area normalization completed.
#>  Preprocessing

#> 
#>  Preprocessing

#> ── Imputing missing values ──
#>  Preprocessing

#> 
#>  Preprocessing

#>  No QC samples found. Using default imputation method based on sample size.
#>  Preprocessing

#>  Sample size > 100, using `impute_miss_forest()`.
#>  Preprocessing

#>  Imputation completed.
#>  Preprocessing

#> 
#>  Preprocessing

#> ── Correcting batch effects ──
#>  Preprocessing

#> 
#>  Preprocessing

#>  Batch column  not found in sample_info. Skipping batch correction.
#>  Preprocessing

#>  Batch correction completed.
#>  Preprocessing

#>  Preprocessing [5.6s]
#> 
#>  QC (post-preprocessing)
#>  QC (post-preprocessing) [96ms]
#> 
#>  Principal component analysis
#>  Principal component analysis [304ms]
#> 
#>  Differential expression analysis (limma)
#>  Number of groups: 4
#>  Differential expression analysis (limma)

#>  Groups: "H", "M", "Y", and "C"
#>  Differential expression analysis (limma)

#>  Pairwise comparisons will be performed, with levels coming first as reference groups.
#>  Differential expression analysis (limma)

#>  Differential expression analysis (limma) [57ms]
#> 
#>  Volcano plot
#>  Volcano plot [516ms]
#> 
#>  Heatmap of significant variables
#>  Heatmap of significant variables [42ms]
#> 
#>  Skipping `step_sig_enrich_go()` because input is not a glycoproteomics experiment and input has more than 2 groups.
#>  Skipping `step_sig_enrich_kegg()` because input is not a glycoproteomics experiment and input has more than 2 groups.
#>  Skipping `step_sig_enrich_reactome()` because input is not a glycoproteomics experiment and input has more than 2 groups.
#>  Derived trait calculation
#>  Derived trait calculation [2s]
#> 
#>  Differential trait analysis (limma)
#>  Number of groups: 4
#>  Differential trait analysis (limma)

#>  Groups: "H", "M", "Y", and "C"
#>  Differential trait analysis (limma)

#>  Pairwise comparisons will be performed, with levels coming first as reference groups.
#>  Differential trait analysis (limma)

#>  Differential trait analysis (limma) [94ms]
#> 
#>  Heatmap of significant traits
#>  Heatmap of significant traits [42ms]
#> 
quench_result(result, tempdir())
#> ℹ Directory already exists. Overwrite? [y/N] 
#> Warning: Ignoring empty aesthetic: `width`.
#>  Result saved to /tmp/RtmpBgHsNs