plot_multisnpnet: Make plots of the multisnpnet results

View source: R/functions.R

plot_multisnpnetR Documentation

Make plots of the multisnpnet results

Description

For 50th lambda, the reduced-rank results are saved at results_dir[i]/$rank_prefix[i]$rank[j]/$file_prefix50$file_suffix, and snpnet results are saved in $snpnet_dir/$phenotype/$snpnet_subdir/$snpnet_prefix50$snpnet_suffix

Usage

plot_multisnpnet(
  results_dir,
  rank_prefix,
  type,
  rank,
  file_prefix,
  file_suffix,
  snpnet_dir = NULL,
  snpnet_subdir = NULL,
  snpnet_prefix = NULL,
  snpnet_suffix = NULL,
  save_dir = NULL,
  train_name = "metric_train",
  val_name = "metric_val",
  test_name = NULL,
  metric_name = "R2",
  train_bin_name = "AUC_train",
  val_bin_name = "AUC_val",
  test_bin_name = "AUC_test",
  metric_bin_name = "AUC",
  xlim = c(NA, NA),
  ylim = c(NA, NA),
  mapping_phenotype = NULL
)

Arguments

results_dir

Character vector each specifies the parent directory of one type (e.g. exact, lazy) of results

rank_prefix

Character vector each specifies the prefix of the subdirectories holding per-rank results separately

type

Character vector each specifies the type of the results, e.g., exact, lazy

rank

Numeric vector of ranks for which the results are available

file_prefix

Character vector each specifies the prefix of the result file

file_suffix

Character vector each specifies the suffix of the result file

snpnet_dir

Parent directory the snpnet results

snpnet_subdir

Name of the subdirectory hosting snpnet results. The result files are saved in

save_dir

Directory to save the plots. If NULL, no plots are generated but the list of plot objects is returned

train_name

Name of the object storing the validation metric

xlim

The x limits (x1, x2) of the plots

ylim

The y limits (y1, y2) of the plots


junyangq/multiSnpnet documentation built on Oct. 19, 2023, 8:22 p.m.